diff --git a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json index c559ea8..e548308 100644 --- a/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json +++ b/SCADA_PERSPECTIVE_PARENT_PROJECT/com.inductiveautomation.perspective/views/Header/Header/view.json @@ -6,9 +6,9 @@ "$": [ "ts", 192, - 1747730947188 + 1750766217642 ], - "$ts": 1747730947187 + "$ts": 1750766217641 } } }, @@ -512,7 +512,7 @@ } }, "props": { - "color": "#FF0000", + "color": "#47FF47", "path": "material/table_chart" }, "type": "ia.display.icon" @@ -780,8 +780,23 @@ "position": { "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": { - "color": "#FFFFFF", "path": "material/notifications_active", "style": { "classes": "" @@ -800,17 +815,19 @@ "props.text": { "binding": { "config": { - "fallbackDelay": 2.5, - "mode": "direct", - "tagPath": "System/aws_data" + "polling": { + "enabled": true, + "rate": "3" + }, + "queryPath": "GetActiveAlarmsByLocationAndPriority" }, "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": "tag" + "type": "query" } } }, @@ -824,11 +841,24 @@ } ], "meta": { - "name": "FlexContainer" + "name": "FlexContainer", + "tooltip": { + "enabled": true + } }, "position": { "basis": "80px" }, + "propConfig": { + "meta.tooltip.text": { + "binding": { + "config": { + "expression": "{./Label.props.text} + \" active alarms in the system\"" + }, + "type": "expr" + } + } + }, "props": { "justify": "flex-end", "style": {