fixed the alarm in the header

This commit is contained in:
guga kakhadze 2025-06-24 16:18:26 +04:00
parent df315a30b3
commit 2633c2703f

View File

@ -6,9 +6,9 @@
"$": [ "$": [
"ts", "ts",
192, 192,
1747730947188 1750766217642
], ],
"$ts": 1747730947187 "$ts": 1750766217641
} }
} }
}, },
@ -512,7 +512,7 @@
} }
}, },
"props": { "props": {
"color": "#FF0000", "color": "#47FF47",
"path": "material/table_chart" "path": "material/table_chart"
}, },
"type": "ia.display.icon" "type": "ia.display.icon"
@ -780,8 +780,23 @@
"position": { "position": {
"basis": "30px" "basis": "30px"
}, },
"propConfig": {
"props.color": {
"binding": {
"config": {
"path": "../Label.props.text"
},
"transforms": [
{
"code": "\t\n\treturn \"red\" if value \u003e 0 else \"#fff\"",
"type": "script"
}
],
"type": "property"
}
}
},
"props": { "props": {
"color": "#FFFFFF",
"path": "material/notifications_active", "path": "material/notifications_active",
"style": { "style": {
"classes": "" "classes": ""
@ -800,17 +815,19 @@
"props.text": { "props.text": {
"binding": { "binding": {
"config": { "config": {
"fallbackDelay": 2.5, "polling": {
"mode": "direct", "enabled": true,
"tagPath": "System/aws_data" "rate": "3"
},
"queryPath": "GetActiveAlarmsByLocationAndPriority"
}, },
"transforms": [ "transforms": [
{ {
"code": "\tjson_decode \u003d system.util.jsonDecode(value)\n\treturn len(json_decode)", "code": "\tdata \u003d value\n\trows \u003d system.dataset.toPyDataSet(data)\n\t\n\ttotal \u003d sum(row[\"Count\"] for row in rows)\n\t\n\treturn total",
"type": "script" "type": "script"
} }
], ],
"type": "tag" "type": "query"
} }
} }
}, },
@ -824,11 +841,24 @@
} }
], ],
"meta": { "meta": {
"name": "FlexContainer" "name": "FlexContainer",
"tooltip": {
"enabled": true
}
}, },
"position": { "position": {
"basis": "80px" "basis": "80px"
}, },
"propConfig": {
"meta.tooltip.text": {
"binding": {
"config": {
"expression": "{./Label.props.text} + \" active alarms in the system\""
},
"type": "expr"
}
}
},
"props": { "props": {
"justify": "flex-end", "justify": "flex-end",
"style": { "style": {