433 lines
12 KiB
Plaintext
433 lines
12 KiB
Plaintext
{
|
|
"custom": {
|
|
"endDate": "2025-4-20 23:59:59",
|
|
"location": null,
|
|
"startDate": "2025-4-18 00:00:00"
|
|
},
|
|
"params": {
|
|
"endDate": "2025-4-20 23:59:59",
|
|
"location": null,
|
|
"startDate": "2025-4-18 00:00:00"
|
|
},
|
|
"propConfig": {
|
|
"custom.endDate": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.endDate"
|
|
},
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.location": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.location"
|
|
},
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"custom.startDate": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "view.params.startDate"
|
|
},
|
|
"type": "property"
|
|
},
|
|
"persistent": true
|
|
},
|
|
"params.endDate": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.location": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
},
|
|
"params.startDate": {
|
|
"paramDirection": "input",
|
|
"persistent": true
|
|
}
|
|
},
|
|
"props": {},
|
|
"root": {
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Label"
|
|
},
|
|
"position": {
|
|
"basis": "32px",
|
|
"display": false
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "parent.custom.calculated.ResultData"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn \"Daily Avgs: \" + str([round(v[1],2) for v in value])",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Label_1"
|
|
},
|
|
"position": {
|
|
"basis": "32px"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "concat(\"Min Avg: \", round({parent.custom.calculated.MinAvg},2))"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Label_2"
|
|
},
|
|
"position": {
|
|
"basis": "32px"
|
|
},
|
|
"propConfig": {
|
|
"props.text": {
|
|
"binding": {
|
|
"config": {
|
|
"expression": "concat(\"Max Avg: \", round({parent.custom.calculated.MaxAvg},2))"
|
|
},
|
|
"type": "expr"
|
|
}
|
|
}
|
|
},
|
|
"type": "ia.display.label"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "TotalLoad"
|
|
},
|
|
"position": {
|
|
"basis": "200px",
|
|
"display": false
|
|
},
|
|
"propConfig": {
|
|
"custom.calculated": {
|
|
"binding": {
|
|
"config": {
|
|
"path": ".../Table.custom.PUEData.TotalLoad"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"direction": "column"
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "CriticalLoad"
|
|
},
|
|
"position": {
|
|
"basis": "200px",
|
|
"display": false
|
|
},
|
|
"props": {
|
|
"direction": "column"
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Dropdown"
|
|
},
|
|
"position": {
|
|
"basis": "30px"
|
|
},
|
|
"props": {
|
|
"options": [
|
|
{
|
|
"label": "15 mins",
|
|
"value": 15
|
|
},
|
|
{
|
|
"label": "30 mins",
|
|
"value": 30
|
|
},
|
|
{
|
|
"label": "hourly",
|
|
"value": 60
|
|
}
|
|
],
|
|
"placeholder": {
|
|
"text": "Select Interval"
|
|
},
|
|
"value": 15
|
|
},
|
|
"type": "ia.input.dropdown"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Import"
|
|
},
|
|
"position": {
|
|
"basis": "34px",
|
|
"display": false
|
|
},
|
|
"props": {
|
|
"enabled": false,
|
|
"text": "Import"
|
|
},
|
|
"type": "ia.input.button"
|
|
},
|
|
{
|
|
"events": {
|
|
"component": {
|
|
"onActionPerformed": {
|
|
"config": {
|
|
"script": "\tdata \u003d [self.parent.parent.parent.getChild(\"Table\").props.data]\n\txlsBytes \u003d system.dataset.toExcel(True, data)\n\tsystem.perspective.download(\"Billing Data.xls\", xlsBytes)"
|
|
},
|
|
"scope": "G",
|
|
"type": "script"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"name": "Export"
|
|
},
|
|
"position": {
|
|
"basis": "34px"
|
|
},
|
|
"props": {
|
|
"text": "Export"
|
|
},
|
|
"type": "ia.input.button"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "Actions"
|
|
},
|
|
"position": {
|
|
"basis": "200px"
|
|
},
|
|
"props": {
|
|
"direction": "column",
|
|
"justify": "center"
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"children": [
|
|
{
|
|
"meta": {
|
|
"name": "Common"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"selected": true,
|
|
"text": "Common"
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "DH1"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"selected": true,
|
|
"text": "Datahall 1"
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "DH2"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"text": "Datahall 2"
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "DH3"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"text": "Datahall 3"
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "DH4"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"text": "Datahall 4"
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "DH5"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"text": "Datahall 5"
|
|
},
|
|
"type": "ia.input.checkbox"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "AreaFilter"
|
|
},
|
|
"position": {
|
|
"basis": "400px"
|
|
},
|
|
"propConfig": {
|
|
"custom.areaSelection": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"areas": [
|
|
"if({./Common.props.selected}, \"Common\", \"\")",
|
|
"if({./DH1.props.selected}, \"DH1\", \"\")",
|
|
"if({./DH2.props.selected}, \"DH2\", \"\")",
|
|
"if({./DH3.props.selected}, \"DH3\", \"\")",
|
|
"if({./DH4.props.selected}, \"DH4\", \"\")",
|
|
"if({./DH5.props.selected}, \"DH5\", \"\")"
|
|
]
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn [v for v in value[\"areas\"] if len(v.value) \u003e 0]\n\t",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
}
|
|
}
|
|
},
|
|
"props": {
|
|
"wrap": "wrap"
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "CalculatedFields"
|
|
},
|
|
"position": {
|
|
"basis": "150px"
|
|
},
|
|
"props": {
|
|
"style": {
|
|
"gap": 5
|
|
}
|
|
},
|
|
"type": "ia.container.flex"
|
|
},
|
|
{
|
|
"meta": {
|
|
"name": "Table"
|
|
},
|
|
"position": {
|
|
"basis": "400px",
|
|
"grow": 1
|
|
},
|
|
"propConfig": {
|
|
"custom.BillingData": {
|
|
"binding": {
|
|
"config": {
|
|
"struct": {
|
|
"areaLocations": "{../CalculatedFields/AreaFilter.custom.areaSelection}",
|
|
"endDate": "toDate({view.custom.endDate})",
|
|
"intervalMin": "{../CalculatedFields/Actions/Dropdown.props.value}",
|
|
"location": "{view.custom.location}",
|
|
"startDate": "toDate({view.custom.startDate})"
|
|
},
|
|
"waitOnAll": true
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\tstartDate \u003d value[\"startDate\"]\n\tendDate \u003d value[\"endDate\"]\n\tlocation\u003d value[\"areaLocations\"]\n\tintervalMin \u003d value[\"intervalMin\"]\n\treturn reports.MBR.billing.processRawData(startDate, endDate, location, intervalMin)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "expr-struct"
|
|
}
|
|
},
|
|
"props.columns": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "this.props.data"
|
|
},
|
|
"transforms": [
|
|
{
|
|
"code": "\treturn utils.helper.xformTableColumns(value)",
|
|
"type": "script"
|
|
}
|
|
],
|
|
"type": "property"
|
|
}
|
|
},
|
|
"props.data": {
|
|
"binding": {
|
|
"config": {
|
|
"path": "this.custom.BillingData"
|
|
},
|
|
"type": "property"
|
|
}
|
|
}
|
|
},
|
|
"type": "ia.display.table"
|
|
}
|
|
],
|
|
"meta": {
|
|
"name": "root"
|
|
},
|
|
"props": {
|
|
"direction": "column"
|
|
},
|
|
"type": "ia.container.flex"
|
|
}
|
|
} |