diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..598d2e28 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.resources/ +**/resource.json +**/thumbnail.png +com.inductiveautomation.perspective/session-props/props.json +conversion-report.txt diff --git a/.resources/01363de8e6f6a4d008f93b7b21283fae39a000f57b9f3ab975b48b9c765f08e3 b/.resources/01363de8e6f6a4d008f93b7b21283fae39a000f57b9f3ab975b48b9c765f08e3 deleted file mode 100644 index b77f6527..00000000 Binary files a/.resources/01363de8e6f6a4d008f93b7b21283fae39a000f57b9f3ab975b48b9c765f08e3 and /dev/null differ diff --git a/.resources/03b59282e77e1c9f22d81fcf44fd0769f0b58f80ad2cd422908b773eee24826f b/.resources/03b59282e77e1c9f22d81fcf44fd0769f0b58f80ad2cd422908b773eee24826f deleted file mode 100644 index da05491f..00000000 --- a/.resources/03b59282e77e1c9f22d81fcf44fd0769f0b58f80ad2cd422908b773eee24826f +++ /dev/null @@ -1,237 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "color": "#FFFFFF", - "priority": "No Active Alarms", - "state": "TagError" - }, - "params": { - "tagProps": [ - "Status/Chutes/Chute_0", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif data.get(\"bBeacon_Yellow\"):\n\t return \"#FF8C00\"\n\telif data.get(\"No_Container\"):\n\t return \"#FF0000\"\n\telif data.get(\"bBeacon_Green\"):\n\t return \"#008000\"\n\telif data.get(\"bBeacon_Blue\"):\n\t return \"#0000FF\"\n\t\n\treturn \"#FFFFFF\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif data.get(\"bBeacon_Yellow\"):\n\t return \"High\"\n\telif data.get(\"No_Container\"):\n\t return \"Low\"\n\telif data.get(\"bBeacon_Green\"):\n\t return \"No Active Alarms\"\n\telif data.get(\"bBeacon_Blue\"):\n\t return \"Low\"\n\t\n\treturn \"No Active Alarms\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif value is None or data.get(\"_quality\") \u003d\u003d \"Bad\" or data.get(\"error\"):\n\t return \"TagError\"\n\t\n\tif data.get(\"bBeacon_Yellow\"):\n\t return \"Jammed\"\n\telif data.get(\"No_Container\"):\n\t return \"No Container\"\n\telif data.get(\"bBeacon_Green\"):\n\t return \"Enabled\"\n\telif data.get(\"bBeacon_Blue\"):\n\t return \"Full/Half Full\"\n\t\n\treturn \"Inactive\"\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 20, - "width": 29 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "position.rotate.angle": { - "binding": { - "config": { - "path": "view.params.directionLeft" - }, - "transforms": [ - { - "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", - "type": "expression" - } - ], - "type": "property" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "path": "view.custom.color" - }, - "type": "property" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 0 0 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": 3 - }, - "type": "path" - } - ], - "style": { - "overflow": "hidden" - }, - "viewBox": "-1.5 -1.5 73 63" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-CH\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"TagError\",\n \"Source Id: \" + {view.params.tagProps[1]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - } - }, - "props": { - "justify": "center", - "style": { - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/07fc588b7701026c23f9a359da264f2dd14f9832447607fda4b375f6812bfa79 b/.resources/07fc588b7701026c23f9a359da264f2dd14f9832447607fda4b375f6812bfa79 deleted file mode 100644 index 188a8aea..00000000 --- a/.resources/07fc588b7701026c23f9a359da264f2dd14f9832447607fda4b375f6812bfa79 +++ /dev/null @@ -1,306 +0,0 @@ -{ - "custom": { - "State": "#FFFFFF", - "Status": "#808080", - "state_string": "Empty/Idle", - "status_string": "Unknown Status" - }, - "params": { - "tagProps": [ - "Status/Carriers/Carrier_100", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.State": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}" - }, - "transforms": [ - { - "code": "\tif value is None:\n\t\treturn \u0027#808080\u0027 # Grey - No Data\n\t\n\t# Priority 2 - Critical Faults - Red\n\tif (value.get(\u0027bCommonFault\u0027, False) or value.get(\u0027bTCBMCBError\u0027, False) or\n\t value.get(\u0027bNotCheckedCTBCRB\u0027, False) or value.get(\u0027bCommunicationError\u0027, False) or\n\t value.get(\u0027bCurrentLimitExceeded\u0027, False) or value.get(\u0027bCalibrationError\u0027, False) or\n\t value.get(\u0027bItemOverhangingBeltFault\u0027, False) or value.get(\u0027bCurrentCollectorFault\u0027, False) or\n\t value.get(\u0027bItemTooHigh\u0027, False) or value.get(\u0027bItemTooWide\u0027, False) or\n\t value.get(\u0027bItemOnActivatedCarrier\u0027, False) or value.get(\u0027bDeflectedBellowsFault\u0027, False) or\n\t value.get(\u0027bItemOnBellowsWarning\u0027, False) or value.get(\u0027bItemOnBellowsActive\u0027, False)):\n\t\treturn \u0027#FF0000\u0027 # Red - E-Stop/Unit Faulted\n\t\n\t# Critical State Faults - Red\n\tif value.get(\u0027bDisabledOrFaulted\u0027, False):\n\t\treturn \u0027#FF0000\u0027 # Red - E-Stop/Unit Faulted\n\t\n\t# Priority 5 - Test/Maintenance - Brown\n\tif (value.get(\u0027bNeedsUpdate\u0027, False) or value.get(\u0027bCCTCommunication\u0027, False) or\n\t value.get(\u0027bDefaultConfiguration\u0027, False) or value.get(\u0027bProgrammingMode\u0027, False) or\n\t value.get(\u0027bCCTDownloadDone\u0027, False) or value.get(\u0027bAssignedToTiltTest\u0027, False)):\n\t\treturn \u0027#AC5F00\u0027 # Brown - Manual/Maintenance Mode\n\t\n\t# Priority 8 - Occupied - Green\n\tif value.get(\u0027bOccupied\u0027, False):\n\t\treturn \u0027#008000\u0027 # Green - Running or ON\n\t\n\t# Priority 9 - Operational Status - Green or Light Green\n\tif value.get(\u0027bStatusOK\u0027, False):\n\t\treturn \u0027#008000\u0027 # Green - Running or ON\n\tif value.get(\u0027bItemDischarged\u0027, False):\n\t\treturn \u0027#CCFFCC\u0027 # Light green - Enabled, not running\n\tif value.get(\u0027bMotorNotRunning\u0027, False):\n\t\treturn \u0027#CCFFCC\u0027 # Light green - Enabled, not running\n\t\n\t# Priority 10 - Energy Management - Light Sky Blue\n\tif value.get(\u0027bDoubleMaxRecirculation\u0027, False):\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\t\n\t# Priority 11 - High Priority Issues\n\tif value.get(\u0027bDisabled\u0027, False):\n\t\treturn \u0027#D3D3D3\u0027 # Light grey - OFF/Inactive\n\tif value.get(\u0027bBlocked\u0027, False):\n\t\treturn \u0027#D900D9\u0027 # Purple - Gridlock Prevention Mode\n\t\n\t# Active Processing States - Yellow\n\tif (value.get(\u0027bItemBeingScannedBarcode\u0027, False) or value.get(\u0027bItemScannedWaitingRedirect\u0027, False) or\n\t value.get(\u0027bItemBeingScannedVolume\u0027, False) or value.get(\u0027bSPSCheckingCarrier\u0027, False)):\n\t\treturn \u0027#FFFF00\u0027 # Yellow - 75%/50%/25% Full\n\t\n\t# System/Communication States - Light Sky Blue\n\tif (value.get(\u0027bInfoReceivedFromCSC\u0027, False) or value.get(\u0027bReceivedFromCCB\u0027, False) or\n\t value.get(\u0027bReservedForInductionTakeover\u0027, False) or value.get(\u0027bNotActivatedForProfile\u0027, False)):\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\t\n\t# Multi-carrier Operations - Blue\n\tif (value.get(\u0027bSecondThirdCarrierInRow\u0027, False) or value.get(\u0027bPartOfMultiCarrierItem\u0027, False)):\n\t\treturn \u0027#0000FF\u0027 # Blue - 100% Full\n\t\n\t# Check distance data\n\tif value.get(\u0027iRelativeDistance\u0027, 0) \u003e 0:\n\t\treturn \u0027#FFA500\u0027 # Orange - JAM (item positioning)\n\t\n\t# Default state - White (Empty/Idle)\n\treturn \u0027#FFFFFF\u0027 # White - Gravity/not motorized MHE", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.Status": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}" - }, - "transforms": [ - { - "code": "\tif value is None:\n\t\treturn \u0027#808080\u0027\n\t\n\t# Priority-based status determination (lower number \u003d higher priority)\n\tactive_status \u003d \u0027default\u0027\n\t\n\t# Check in priority order (highest to lowest)\n\t# Priority 2 - Critical\n\tif (value.get(\u0027bCommonFault\u0027, False) or value.get(\u0027bTCBMCBError\u0027, False) or \n\t value.get(\u0027bNotCheckedCTBCRB\u0027, False) or value.get(\u0027bCommunicationError\u0027, False) or\n\t value.get(\u0027bCurrentLimitExceeded\u0027, False) or value.get(\u0027bCalibrationError\u0027, False) or\n\t value.get(\u0027bItemOverhangingBeltFault\u0027, False) or value.get(\u0027bCurrentCollectorFault\u0027, False) or\n\t value.get(\u0027bItemTooHigh\u0027, False) or value.get(\u0027bItemTooWide\u0027, False) or\n\t value.get(\u0027bItemOnActivatedCarrier\u0027, False) or value.get(\u0027bDeflectedBellowsFault\u0027, False) or\n\t value.get(\u0027bItemOnBellowsWarning\u0027, False) or value.get(\u0027bItemOnBellowsActive\u0027, False)):\n\t\tactive_status \u003d \u0027critical_fault\u0027\n\t# Priority 5 - Low/Maintenance\n\telif (value.get(\u0027bNeedsUpdate\u0027, False) or value.get(\u0027bCCTCommunication\u0027, False) or\n\t value.get(\u0027bDefaultConfiguration\u0027, False) or value.get(\u0027bProgrammingMode\u0027, False) or\n\t value.get(\u0027bCCTDownloadDone\u0027, False)):\n\t\tactive_status \u003d \u0027maintenance_mode\u0027\n\t# Priority 9 - Medium-High\n\telif value.get(\u0027bStatusOK\u0027, False):\n\t\tactive_status \u003d \u0027status_ok\u0027\n\telif value.get(\u0027bMotorNotRunning\u0027, False):\n\t\tactive_status \u003d \u0027motor_not_running\u0027\n\t# Priority 10 - Medium\n\telif value.get(\u0027bDoubleMaxRecirculation\u0027, False):\n\t\tactive_status \u003d \u0027recirculation\u0027\n\t# Priority 11 - High\n\telif value.get(\u0027bDisabled\u0027, False):\n\t\tactive_status \u003d \u0027disabled\u0027\n\telif value.get(\u0027bBlocked\u0027, False):\n\t\tactive_status \u003d \u0027blocked\u0027\n\t\n\t# Dictionary-based switch for color mapping\n\tcolor_map \u003d {\n\t\t\u0027critical_fault\u0027: \u0027#FF0000\u0027, # Red - Critical errors/faults\n\t\t\u0027maintenance_mode\u0027: \u0027#AC5F00\u0027, # Brown - Manual/Maintenance mode\n\t\t\u0027status_ok\u0027: \u0027#008000\u0027, # Green - Running or ON\n\t\t\u0027motor_not_running\u0027: \u0027#CCFFCC\u0027, # Light Green - Enabled, not running\n\t\t\u0027recirculation\u0027: \u0027#87CEFA\u0027, # Light Sky Blue - Energy management\n\t\t\u0027disabled\u0027: \u0027#D3D3D3\u0027, # Light Grey - OFF/Inactive\n\t\t\u0027blocked\u0027: \u0027#D900D9\u0027, # Purple - Gridlock Prevention\n\t\t\u0027default\u0027: \u0027#808080\u0027 # Grey - Default/Invalid\n\t}\n\t\n\t# Return color using dictionary lookup\n\treturn color_map.get(active_status, \u0027#808080\u0027)", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state_string": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/dwState" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "code": "\tif value is None:\n\t\treturn \u0027No Data\u0027\n\t\n\t# Check bits in priority order (highest priority first)\n\t\n\t# Priority 5 - Test/Maintenance\n\tif value \u0026 128: # Bit 7: Assigned to do a tilttest\n\t\treturn \u0027Tilt Test Mode\u0027\n\t\n\t# Priority 8 - Operational Status\n\tif value \u0026 256: # Bit 8: Occupied\n\t\treturn \u0027Occupied\u0027\n\t\n\t# Priority 9 - Discharge Status\n\tif value \u0026 8: # Bit 3: Item has been discharged\n\t\treturn \u0027Item Discharged\u0027\n\t\n\t# Other operational states (no specific priority)\n\tif value \u0026 1: # Bit 0: Disabled or faulted\n\t\treturn \u0027Disabled/Faulted\u0027\n\tif value \u0026 2: # Bit 1: Item being scanned by Barcode/OCR\n\t\treturn \u0027Barcode Scanning\u0027\n\tif value \u0026 4: # Bit 2: Scanned, waiting for redirect\n\t\treturn \u0027Awaiting Redirect\u0027\n\tif value \u0026 16: # Bit 4: Second or third carrier in row\n\t\treturn \u0027Multi-Carrier Row\u0027\n\tif value \u0026 32: # Bit 5: Used at flipper door chutes\n\t\treturn \u0027Flipper Door Mode\u0027\n\tif value \u0026 64: # Bit 6: Part of multi-carrier item\n\t\treturn \u0027Multi-Carrier Item\u0027\n\tif value \u0026 512: # Bit 9: Information received from CSC/host\n\t\treturn \u0027Host Data Received\u0027\n\tif value \u0026 1024: # Bit 10: Received from CCB\n\t\treturn \u0027CCB Received\u0027\n\tif value \u0026 2048: # Bit 11: Occupied but disabled\n\t\treturn \u0027Occupied/Disabled\u0027\n\tif value \u0026 4096: # Bit 12: Reserved for induction takeover\n\t\treturn \u0027Induction Reserved\u0027\n\tif value \u0026 8192: # Bit 13: Not activated for profile execution\n\t\treturn \u0027Profile Inactive\u0027\n\tif value \u0026 16384: # Bit 14: Item being scanned by volume scanner\n\t\treturn \u0027Volume Scanning\u0027\n\tif value \u0026 32768: # Bit 15: SPS checking carrier\n\t\treturn \u0027SPS Checking\u0027\n\t\n\t# Check if bits 16-31 contain distance data\n\tdistance_bits \u003d (value \u003e\u003e 16) \u0026 0xFFFF # Extract upper 16 bits\n\tif distance_bits \u003e 0:\n\t\treturn \u0027Item Distance: \u0027 + str(distance_bits)\n\t\n\t# Default state\n\tif value \u003d\u003d 0:\n\t\treturn \u0027Empty/Idle\u0027\n\telse:\n\t\treturn \u0027State: \u0027 + str(value)", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.status_string": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/dwStatus" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "code": "\tif value is None:\n\t\treturn \u0027No Data\u0027\n\t\n\t# Critical Priority (2) - Errors and Faults\n\tif value \u0026 8: # Bit 3: Common fault\n\t\treturn \u0027Common fault\u0027\n\tif value \u0026 32: # Bit 5: Possible TCB/MCB error\n\t\treturn \u0027Possible TCB/MCB error\u0027\n\tif value \u0026 64: # Bit 6: Not checked at last CTB/CRB\n\t\treturn \u0027Not checked at last CTB/CRB\u0027\n\tif value \u0026 128: # Bit 7: Communication error\n\t\treturn \u0027Communication error\u0027\n\tif value \u0026 512: # Bit 9: Current limit exceeded\n\t\treturn \u0027Current limit exceeded\u0027\n\tif value \u0026 2048: # Bit 11: Calibration error\n\t\treturn \u0027Calibration error\u0027\n\tif value \u0026 4194304: # Bit 22: Item overhanging belt fault\n\t\treturn \u0027Item overhanging belt fault\u0027\n\tif value \u0026 8388608: # Bit 23: Current collector fault\n\t\treturn \u0027Current collector fault\u0027\n\tif value \u0026 16777216: # Bit 24: Item too high\n\t\treturn \u0027Item too high\u0027\n\tif value \u0026 33554432: # Bit 25: Item too wide\n\t\treturn \u0027Item too wide\u0027\n\tif value \u0026 67108864: # Bit 26: Item on activated carrier\n\t\treturn \u0027Item on activated carrier\u0027\n\tif value \u0026 134217728: # Bit 27: Deflected bellows fault\n\t\treturn \u0027Deflected bellows fault\u0027\n\tif value \u0026 1073741824: # Bit 30: Item on bellows warning\n\t\treturn \u0027Item on bellows warning\u0027\n\tif value \u0026 2147483648: # Bit 31: Item on bellows is active\n\t\treturn \u0027Item on bellows is active\u0027\n\t\n\t# High Priority (11) - Disabled/Blocked States\n\tif value \u0026 1: # Bit 0: Disabled\n\t\treturn \u0027Disabled\u0027\n\tif value \u0026 4: # Bit 2: Blocked\n\t\treturn \u0027Blocked\u0027\n\t\n\t# Medium Priority (9-10) - Normal Operations\n\tif value \u0026 256: # Bit 8: Status OK\n\t\treturn \u0027Status OK\u0027\n\tif value \u0026 1024: # Bit 10: Motor not running\n\t\treturn \u0027Motor not running\u0027\n\tif value \u0026 268435456: # Bit 28: Double maximum recirculation\n\t\treturn \u0027Double maximum recirculation\u0027\n\t\n\t# Low Priority (5) - Maintenance/Configuration\n\tif value \u0026 2: # Bit 1: Needs update\n\t\treturn \u0027Needs update\u0027\n\tif value \u0026 16: # Bit 4: CCT communication to carrier\n\t\treturn \u0027CCT communication to carrier\u0027\n\tif value \u0026 8192: # Bit 13: Default configuration\n\t\treturn \u0027Default configuration\u0027\n\tif value \u0026 16384: # Bit 14: Programming mode\n\t\treturn \u0027Programming mode\u0027\n\tif value \u0026 536870912: # Bit 29: CCT download done\n\t\treturn \u0027CCT download done\u0027\n\t\n\t# Default - No active status\n\treturn \u0027Unknown Status\u0027", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 50, - "width": 20 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "props": { - "elements": [ - { - "d": "M 1 5 L 17 5 L 17 55 L 1 55 Z ", - "fill": { - "paint": "#2C3E50" - }, - "name": "carrierFrame", - "stroke": { - "paint": "#34495E", - "width": "0.5" - }, - "type": "path" - }, - { - "d": "M 2 7 L 16 7 L 16 53 L 2 53 Z ", - "fill": { - "paint": "#3498DB" - }, - "name": "carrierTray", - "type": "path" - }, - { - "cx": "9", - "cy": "12", - "fill": { - "paint": "#E74C3C" - }, - "name": "topSensor", - "r": "1.5", - "type": "circle" - }, - { - "cx": "9", - "cy": "48", - "fill": { - "paint": "#E74C3C" - }, - "name": "bottomSensor", - "r": "1.5", - "type": "circle" - }, - { - "fill": { - "paint": "#95A5A6" - }, - "height": "20", - "name": "package", - "rx": "1", - "type": "rect", - "width": "10", - "x": "4", - "y": "20" - }, - { - "cx": "3", - "cy": "10", - "fill": { - "paint": "#1ABC9C" - }, - "name": "topLeftWheel", - "r": "1", - "type": "circle" - }, - { - "cx": "15", - "cy": "10", - "fill": { - "paint": "#1ABC9C" - }, - "name": "topRightWheel", - "r": "1", - "type": "circle" - }, - { - "cx": "3", - "cy": "50", - "fill": { - "paint": "#1ABC9C" - }, - "name": "bottomLeftWheel", - "r": "1", - "type": "circle" - }, - { - "cx": "15", - "cy": "50", - "fill": { - "paint": "#1ABC9C" - }, - "name": "bottomRightWheel", - "r": "1", - "type": "circle" - } - ], - "preserveAspectRatio": "none", - "style": { - "overflow": "hidden", - "transform": "" - }, - "viewBox": "-1.5 -1.5 20 60" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": { - "classes": "Alarms-Styles/NoAlarm" - } - } - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.status_string} !\u003d \"Unknown Status\",\n \"Source Id: \" + {view.params.tagProps[0]} + \" Status: \" + {view.custom.status_string} + \" State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - } - }, - "props": { - "justify": "center", - "style": { - "borderColor": "#FF0000", - "borderStyle": "none", - "borderWidth": "2px", - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/0b708e4be5c66717d433c01f61339f37fec8ad8a3d5f4b3ac6770edc1669cd17 b/.resources/0b708e4be5c66717d433c01f61339f37fec8ad8a3d5f4b3ac6770edc1669cd17 deleted file mode 100644 index 485d3a73..00000000 Binary files a/.resources/0b708e4be5c66717d433c01f61339f37fec8ad8a3d5f4b3ac6770edc1669cd17 and /dev/null differ diff --git a/.resources/0dd7b472a8b00cae346e9cced5e8afa762fd438afda1afdeec4d711b13eb78fc b/.resources/0dd7b472a8b00cae346e9cced5e8afa762fd438afda1afdeec4d711b13eb78fc deleted file mode 100644 index e26e4b38..00000000 --- a/.resources/0dd7b472a8b00cae346e9cced5e8afa762fd438afda1afdeec4d711b13eb78fc +++ /dev/null @@ -1,613 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "color": "#C2C2C2" - }, - "params": { - "tagProps": [ - "System/MCM01/Station/EPC/UL1_4_EPC1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-EPC\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "STATUS" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.color" - }, - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "props": { - "currentTabIndex": 1, - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "tabs": [ - "Alarms", - "Info" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/199de5fb9f50eef3f8810a28797b00bcaf721772b8b71cf9902b57b7fd7f8c03 b/.resources/199de5fb9f50eef3f8810a28797b00bcaf721772b8b71cf9902b57b7fd7f8c03 deleted file mode 100644 index 1cd6b910..00000000 --- a/.resources/199de5fb9f50eef3f8810a28797b00bcaf721772b8b71cf9902b57b7fd7f8c03 +++ /dev/null @@ -1,599 +0,0 @@ -{ - "custom": { - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed" - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM01/IO_BLOCK/FIO/UL1_3_FIO1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - }, - "params.tagProps[0]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[1]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[2]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[3]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[4]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[5]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[6]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[7]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[8]": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps[9]": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 40, - "width": 40 - }, - "styles": "value" - }, - "root": { - "children": [ - { - "meta": { - "name": "Icon" - }, - "position": { - "basis": "264px" - }, - "propConfig": { - "props.color": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "path": "material/place", - "style": { - "classes": "State-Styles/State1" - } - }, - "type": "ia.display.icon" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\t\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "text": "", - "tooltip": { - "enabled": true, - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_fio" - }, - "type": "property" - } - } - }, - "props": { - "direction": "column", - "style": { - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/202359fc0e28b3a9c450c6e3276fde6337f097d0da2c7216ab2dd1d2e51b8047 b/.resources/202359fc0e28b3a9c450c6e3276fde6337f097d0da2c7216ab2dd1d2e51b8047 deleted file mode 100644 index e55355b2..00000000 --- a/.resources/202359fc0e28b3a9c450c6e3276fde6337f097d0da2c7216ab2dd1d2e51b8047 +++ /dev/null @@ -1,988 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "start_color": "#C2C2C2", - "stop_color": "#C2C2C2" - }, - "params": { - "tagProps": [ - "System/MCM01/Station/SS_PB/UL3_1_SS1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.start_color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.stop_color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stop/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-SS-BTN\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "LIGHT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start/Color" - }, - "transforms": [ - { - "expression": "if(isGood({value}),\r\n if({value} \u003d 4, \"ON\", \"OFF\"),\r\n \"UNKNOWN\"\r\n)\r\n", - "type": "expression" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON", - "output": "#008000" - }, - { - "input": "OFF", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.start_color" - }, - "type": "property" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/not_started" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "START" - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Start" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Stop_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.stop_color" - }, - "type": "property" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/stop_circle" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "STOP" - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Stop" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "expression": "if(indexOf({view.params.tagProps[0]}, \"SS_PB\") \u003e\u003d 0, true, false)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands" - }, - "position": { - "tabIndex": 2 - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "props": { - "currentTabIndex": 2, - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "tabs": [ - "Alarms", - "Info", - "Commands" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/207c4ed9cbb59080889522cce5f366de68cb9ac9f03e63878ea3cce6bfbc2012 b/.resources/207c4ed9cbb59080889522cce5f366de68cb9ac9f03e63878ea3cce6bfbc2012 deleted file mode 100644 index 207dd6f4..00000000 --- a/.resources/207c4ed9cbb59080889522cce5f366de68cb9ac9f03e63878ea3cce6bfbc2012 +++ /dev/null @@ -1,5118 +0,0 @@ -{ - "custom": { - "activityLogger": { - "alt_pageid": "alarms", - "pageid": "alarms/ActiveAlarms", - "start_time": { - "$": [ - "ts", - 192, - 1748425447154 - ], - "$ts": 1748425447154 - } - } - }, - "params": {}, - "propConfig": { - "custom.activityLogger": { - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 1080, - "width": 1920 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "High", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027high\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_0" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/High" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/priority_high" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "High" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Label_4" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "Medium", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027medium\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_1" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "Buttons/PB_1", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/Medium" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/Medium" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/priority_high" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Medium" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_2" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "Low", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027low\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_2" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "Buttons/PB_1", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/Low" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/Low" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/low_priority" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Low" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_3" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027diagnostic\u0027\n\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_3" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "Buttons/PB_1", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/warning" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Diagnostic" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\t# implement your handler here\n\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "MCM01", - "value": "MCM01" - }, - { - "label": "MCM02", - "value": "MCM02" - }, - { - "label": "MCM03", - "value": "MCM03" - }, - { - "label": "MCM04", - "value": "MCM04" - }, - { - "label": "MCM05", - "value": "MCM05" - } - ], - "placeholder": { - "text": "Filter MCMs..." - }, - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "hjsgdfn", - "pageScope": false, - "script": "\tpass", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - } - ], - "custom": { - "priorities": { - "diagnostic": false, - "high": false, - "low": false, - "medium": false - } - }, - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tself.custom.priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t}" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "881px", - "shrink": 0 - }, - "props": { - "style": { - "padding": 0 - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "20px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "Critical", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"false\"\n\tpayload[\"reset\"] \u003d filter_on\n\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\tdefault_priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t \"critical\": False\n\t}\n\tself.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.filter.text \u003d \"\"\n\tself.parent.parent.getChild(\"FlexContainer\").custom.priorities \u003d default_priorities\n\tself.parent.parent.getChild(\"FlexContainer\").getChild(\"Dropdown\").props.value \u003d \"\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/clear" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Reset" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_2" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "High", - "background_on": "true", - "update_on": false - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tfrom datetime import datetime\n\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t \n\t column_order \u003d [\n\t \"ID\",\n\t \"StartTimestamp\", \n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t # CSV header\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes) \n\t \n\t \n\t \n\t\n#\t if data and len(data) \u003e 0:\n#\t for row in data:\n#\t val \u003d row.get(\"value\", {})\n#\t row_data \u003d [\n#\t str(val.get(\"NumberID\", \"\")),\n#\t str(val.get(\"EventTimestamp\", \"\")),\n#\t str(val.get(\"Duration\", \"\")),\n#\t str(val.get(\"Priority\", \"\")),\n#\t str(val.get(\"Description\", \"\")),\n#\t str(val.get(\"Tag\", \"\"))\n#\t ]\n#\t\n#\t # Escape commas for CSV safety\n#\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n#\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n#\t else:\n#\t csv_content +\u003d \"No alarms in current view\\n\"\n#\t\n#\texcept Exception as e:\n#\t system.perspective.print(\"Error during CSV export: \" + str(e))\n#\t csv_content \u003d \"Error exporting alarm data\\n\"\n#\t\n#\t# Convert to bytes and trigger download\n#\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n#\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_1" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/import_export" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Export" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "513px", - "shrink": 0 - }, - "props": { - "style": { - "padding": 0 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "alignContent": "flex-start", - "style": { - "overflow": "visible" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)\n\t\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Table" - }, - "position": { - "basis": "972.9px" - }, - "propConfig": { - "custom.priorities": { - "binding": { - "config": { - "path": ".../FlexContainer/FlexContainer.custom.priorities" - }, - "transforms": [ - { - "code": "\t# value looks like: {\"diagnostic\": True, \"high\": True, \"low\": False, ...}\n\tfrom system.util import jsonEncode, jsonDecode\n\t\n\tprio_map \u003d {\u0027diagnostic\u0027:0,\u0027low\u0027:1,\u0027medium\u0027:2,\u0027high\u0027:3,\u0027critical\u0027:4}\n\t\n\t# Coerce Perspective objects (PyDictionary/Java Map) to a plain Python dict\n\ttry:\n\t d \u003d value if isinstance(value, dict) else jsonDecode(jsonEncode(value))\n\texcept:\n\t d \u003d {}\n\t\n\t# Normalize keys and build CSV (\u0027\u0027 means \"all\")\n\tenabled \u003d [str(prio_map[k]) for k in prio_map if bool(d.get(k, False))]\n\treturn \",\".join(enabled) if enabled else \"\"", - "type": "script" - } - ], - "type": "property" - } - }, - "props.columns[3].filter.string.value": { - "binding": { - "config": { - "path": ".../FlexContainer/FlexContainer/Dropdown.props.value" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "parameters": { - "priorityList": "{this.custom.priorities}" - }, - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetActiveAlarms" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\n\treturn data", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "ID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "StartTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "Event Timestamp" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "string", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 150 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "NumberID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "Number (ID)" - }, - "justify": "left", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "ascending", - "sortable": false, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - } - ], - "emptyMessage": { - "noData": { - "text": "No Active Alarms" - }, - "noFilterResults": { - "text": "No Active Alarms" - } - }, - "filter": { - "enabled": true, - "results": { - "enabled": true - } - }, - "pager": { - "activeOption": 100 - } - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "480px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column", - "justify": "space-evenly" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "MCM01", - "value": "MCM01" - }, - { - "label": "MCM02", - "value": "MCM02" - }, - { - "label": "MCM03", - "value": "MCM03" - }, - { - "label": "MCM04", - "value": "MCM04" - }, - { - "label": "MCM05", - "value": "MCM05" - } - ], - "placeholder": { - "text": "Filter MCMs..." - }, - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "hjsgdfn", - "pageScope": false, - "script": "\tpass", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - }, - { - "custom": { - "Severity": "Critical", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tself.getSibling(\"Dropdown\").props.value \u003d \"\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/clear" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Reset" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tfrom datetime import datetime\n\t\n\ttry:\n\t data \u003d self.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.data\n\t\n\t column_order \u003d [\n\t \"FirstTimestamp\",\n\t \"LastTimestamp\", \n\t \"Count\",\n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \t\n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \t\n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_1" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/import_export" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Export" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "70px" - }, - "props": { - "alignContent": "flex-start", - "style": { - "overflow": "visible" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\t\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "AlarmsTable" - }, - "position": { - "basis": "1080px", - "grow": 1 - }, - "propConfig": { - "props.columns[5].filter.string.value": { - "binding": { - "config": { - "path": ".../FlexContainer/Dropdown.props.value" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetAlarmsWithCount" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data\n", - "type": "script" - } - ], - "type": "query" - } - }, - "props.editingCell": { - "onChange": { - "enabled": null, - "script": "\tall_alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\tshelved_alarms \u003d [alarm for alarm in all_alarms if alarm.isShelved()]\n\t\n\t# Build dataset for table\n\theaders \u003d [\u0027ID\u0027, \u0027StartTimestamp\u0027, \u0027EndTimestamp\u0027, \u0027Duration\u0027, \u0027Description\u0027, \u0027Priority\u0027, \u0027Tag\u0027, \u0027MCM\u0027]\n\tdata \u003d []\n\t\n\tfor alarm in shelved_alarms:\n\t # Calculate duration (time since shelved)\n\t if alarm.activeTime:\n\t duration_ms \u003d system.date.now().getTime() - alarm.activeTime.getTime()\n\t duration_seconds \u003d duration_ms / 1000\n\t hours \u003d int(duration_seconds / 3600)\n\t minutes \u003d int((duration_seconds % 3600) / 60)\n\t seconds \u003d int(duration_seconds % 60)\n\t duration \u003d \"%02d:%02d:%02d\" % (hours, minutes, seconds)\n\t else:\n\t duration \u003d \"00:00:00\"\n\t \n\t # Extract tag name from source\n\t tag_name \u003d alarm.source.split(\u0027/\u0027)[-1] if \u0027/\u0027 in alarm.source else alarm.source\n\t \n\t row \u003d [\n\t str(alarm.id) if hasattr(alarm, \u0027id\u0027) else \u0027\u0027,\n\t alarm.activeTime if alarm.activeTime else system.date.now(),\n\t None, # End timestamp (shelved alarms don\u0027t have end time yet)\n\t duration,\n\t alarm.displayPath if alarm.displayPath else alarm.source,\n\t alarm.priority.name if alarm.priority else \u0027Unknown\u0027,\n\t tag_name,\n\t \u0027System\u0027 # Adjust based on your source format\n\t ]\n\t data.append(row)\n\t\n\t# Create dataset and update the custom property\n\tdataset \u003d system.dataset.toDataSet(headers, data)\n\tself.custom.shelvedAlarmsData \u003d dataset" - } - }, - "props.selection": { - "persistent": true - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "FirstTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "backgroundColor": "#FFFEFE", - "classes": "" - }, - "title": "First Timestamp" - }, - "justify": "left", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "value", - "dateFormat": "MM-DD-YYYY HH:mm:ss", - "editable": false, - "field": "LastTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Last Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM-DD-YYYY HH:mm:ss", - "editable": false, - "field": "Count", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 150 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Alarms" - }, - "noFilterResults": { - "text": "No Alarms" - } - }, - "filter": { - "enabled": true, - "results": { - "enabled": true - } - }, - "pager": { - "activeOption": 100 - } - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "500px", - "grow": 1 - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Hit_List" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "justify": "space-evenly" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "custom": { - "SetFilter": false - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpayload \u003d {}\n\tif self.custom.SetFilter \u003d\u003d True:\n\t\tpayload[\"data\"] \u003d False\n\t\tself.custom.SetFilter \u003d False\n\t\t\n\t\n\telif self.custom.SetFilter \u003d\u003d False:\n\t\tpayload[\"data\"] \u003d True\n\t\tself.custom.SetFilter \u003d True\n\t\n\tsystem.perspective.sendMessage(\"show-historical-filters\", payload \u003d payload, scope \u003d \"page\")\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true, - "style": { - "background-color": "white", - "borderColor": "#000000", - "borderStyle": "solid", - "borderWidth": "1px", - "box-shadow": "5px 5px 5px grey", - "color": "#000000", - "fontFamily": "Arial", - "fontWeight": "normal" - }, - "text": "Show Filters" - } - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/filter_alt" - }, - "position": "center" - }, - "primary": false, - "style": { - "margin": 15, - "marginLeft": 20 - }, - "text": "" - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "281px" - }, - "props": { - "style": { - "color": "#FF0000", - "margin-left": "20px" - }, - "text": "ALL TIMESTAMPS ARE IN UTC" - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Show filters" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Period:" - }, - "type": "ia.display.label" - }, - { - "custom": { - "customTime": false, - "endDate": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758783120911 - }, - "startDate": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758779520911 - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.value": { - "onChange": { - "enabled": null, - "script": "\t# e.g. Dropdown onChange / propertyChange\n\tnow \u003d system.date.now()\n\ttoday0 \u003d system.date.setTime(now, 0, 0, 0) # today 00:00:00\n\tyday0 \u003d system.date.addDays(today0, -1) # yesterday 00:00:00\n\t\n\tval \u003d str(currentValue.value or \u0027\u0027).strip()\n\t\n\t# Custom range: let user pick dates, don\u0027t touch start/end.\n\tif val \u003d\u003d \"custom\":\n\t self.custom.customTime \u003d True\n\t return\n\t\n\tself.custom.customTime \u003d False\n\t\n\tdef t(day, h, m, s):\n\t \"\"\"time of day on a given day anchor\"\"\"\n\t return system.date.setTime(day, h, m, s)\n\t\n\tif val \u003d\u003d \"currentDay\":\n\t start, end \u003d today0, now\n\t\n\telif val \u003d\u003d \"morning\": # 02:30–07:30 today\n\t start, end \u003d t(today0, 2, 30, 0), t(today0, 7, 30, 0)\n\t\n\telif val \u003d\u003d \"daylight\": # 07:30–13:00 today\n\t start, end \u003d t(today0, 7, 30, 0), t(today0, 13, 0, 0)\n\t\n\telif val \u003d\u003d \"twilight\": # 13:00–now (if before 13:00, use 13:00 yesterday–now)\n\t if now \u003e\u003d t(today0, 13, 0, 0):\n\t start, end \u003d t(today0, 13, 0, 0), now\n\t else:\n\t start, end \u003d t(yday0, 13, 0, 0), now\n\t\n\telif val \u003d\u003d \"night\": # 18:30–23:30 yesterday (your original intent)\n\t start, end \u003d t(yday0, 18, 30, 0), t(yday0, 23, 30, 0)\n\t\n\telif val \u003d\u003d \"wrapDown\": # 23:30 yesterday – 02:30 today\n\t start, end \u003d t(yday0, 23, 30, 0), t(today0, 2, 30, 0)\n\t\n\telif val \u003d\u003d \"currentShot\": # alias of twilight per your use\n\t if now \u003e\u003d t(today0, 13, 0, 0):\n\t start, end \u003d t(today0, 13, 0, 0), now\n\t else:\n\t start, end \u003d t(yday0, 13, 0, 0), now\n\t\n\telse:\n\t # Treat any other value as \"last N minutes\"\n\t try:\n\t mins \u003d int(val)\n\t except:\n\t mins \u003d 60\n\t end \u003d now\n\t start \u003d system.date.addMinutes(end, -mins)\n\t\n\t# Final assign\n\tself.custom.startDate \u003d start\n\tself.custom.endDate \u003d end" - }, - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "Past 30 Min", - "value": 30 - }, - { - "label": "Past Hour", - "value": 60 - }, - { - "label": "Past 2 Hour", - "value": 120 - }, - { - "label": "Past 4 Hour", - "value": 240 - }, - { - "label": "Past 8 Hour", - "value": 480 - }, - { - "label": "Current Day", - "value": "currentDay" - }, - { - "label": "Morning", - "value": "morning" - }, - { - "label": "Daylight", - "value": "daylight" - }, - { - "label": "Twilight", - "value": "twilight" - }, - { - "label": "Night", - "value": "night" - }, - { - "label": "Wrap Down", - "value": "wrapDown" - }, - { - "label": "Current Shot", - "value": "currentShot" - }, - { - "label": "Custom", - "value": "custom" - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Start Date" - }, - "type": "ia.display.label" - }, - { - "custom": { - "max_duration_days": 365 - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_time_from_filters(self)\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "DateTimeInput", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "path": "../Dropdown.custom.customTime" - }, - "type": "property" - } - }, - "props.maxDate": { - "binding": { - "config": { - "expression": "now()" - }, - "type": "expr" - } - }, - "props.minDate": { - "access": "PUBLIC", - "binding": { - "config": { - "expression": "addDays(now(),-{this.custom.max_duration_days})" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "path": "../Dropdown.custom.startDate" - }, - "type": "property" - }, - "onChange": { - "enabled": null, - "script": "\tmessaging.message_handler.set_time_from_filters(self)" - } - } - }, - "props": { - "formattedValue": "Sep 25, 2025 9:52 AM", - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.date-time-input" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "89px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "End Date" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DateTimeInput_0" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "path": "../Dropdown.custom.customTime" - }, - "type": "property" - } - }, - "props.maxDate": { - "binding": { - "config": { - "expression": "now()" - }, - "type": "expr" - } - }, - "props.minDate": { - "binding": { - "config": { - "expression": "addDays(now(),-365)" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "path": "../Dropdown.custom.endDate" - }, - "type": "property" - }, - "onChange": { - "enabled": null, - "script": "\tmessaging.message_handler.set_time_to_filters(self)" - }, - "persistent": true - } - }, - "props": { - "formattedValue": "Sep 25, 2025 10:52 AM", - "style": { - "margin": 15 - }, - "value": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758783120911 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.date-time-input" - } - ], - "meta": { - "name": "Time" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Priority" - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tmessaging.message_handler.set_priority_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "490px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "Diagnostic", - "value": "diagnostic" - }, - { - "label": "Low", - "value": "low" - }, - { - "label": "Medium", - "value": "medium" - }, - { - "label": "High", - "value": "high" - }, - { - "label": "All", - "value": "" - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "MCM" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Dropdown_0" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "MCM01", - "value": "MCM01" - }, - { - "label": "MCM02", - "value": "MCM02" - }, - { - "label": "MCM03", - "value": "MCM03" - }, - { - "label": "MCM04", - "value": "MCM04" - }, - { - "label": "MCM05", - "value": "MCM05" - } - ], - "placeholder": { - "text": "Filter MCMs..." - }, - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "hjsgdfn", - "pageScope": false, - "script": "\tpass", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - }, - { - "custom": { - "Severity": "Critical", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tself.getSibling(\"Dropdown_0\").props.value \u003d \"\"\n\tself.getSibling(\"Dropdown\").props.value \u003d \"\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/clear" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Reset" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Priority" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - } - ], - "custom": { - "ShowFilters": false - }, - "meta": { - "name": "Filters" - }, - "position": { - "basis": "180px", - "display": false, - "grow": 1, - "shrink": 0 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "path": "this.custom.ShowFilters" - }, - "type": "property" - }, - "persistent": true - } - }, - "props": { - "direction": "column", - "style": { - "borderStyle": "solid", - "borderWidth": "1px", - "box-shadow": "0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)", - "marginBottom": 10, - "marginLeft": 20, - "marginRight": 20, - "marginTop": 10 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "show-historical-filters", - "pageScope": true, - "script": "\tshow \u003d payload[\"data\"]\n\tself.custom.ShowFilters \u003d show", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "custom": { - "amount": 0, - "max_duration": { - "$": [ - "ts", - 192, - 1748426336635 - ], - "$ts": 1747562336635 - }, - "page_size": 100, - "priority_filters": "", - "time_from_filter": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758779520911 - }, - "time_to_filter": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758783120911 - } - }, - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\t\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Table" - }, - "position": { - "basis": "1920px", - "grow": 1 - }, - "propConfig": { - "props.columns[1].filter.date.value": { - "binding": { - "config": { - "path": "this.custom.time_from_filter" - }, - "type": "property" - } - }, - "props.columns[2].filter.date.value": { - "binding": { - "config": { - "path": "this.custom.time_to_filter" - }, - "type": "property" - } - }, - "props.columns[2].filter.number.value": { - "binding": { - "config": { - "path": "this.custom.time_to_filter" - }, - "enabled": false, - "type": "property" - } - }, - "props.columns[5].filter.string.value": { - "binding": { - "config": { - "path": "this.custom.priority_filters" - }, - "type": "property" - } - }, - "props.columns[6].filter.string.value": { - "binding": { - "config": { - "path": ".../Filters/Priority/Dropdown_0.props.value" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "parameters": { - "endtime": "{.../Filters/Time/DateTimeInput_0.props.value}", - "offset": "({.../Paginate/FlexContainer_0/NumericEntryField.props.value}-1)*100", - "starttime": "{.../Filters/Time/DateTimeInput.props.value}" - }, - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetAlarms" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "bekaxui": 50, - "box-shadow": "0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)", - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "ID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "", - "paddingLeft": 12 - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "StartTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "later than date time" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Start Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "EndTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "earlier than date time" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "End Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "", - "paddingLeft": 12 - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "contains" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "contains", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Alarms" - }, - "noFilterResults": { - "text": "No Alarms" - } - }, - "enabled": true, - "filter": { - "enabled": true, - "results": { - "enabled": true - } - }, - "pager": { - "bottom": false - }, - "style": { - "margin": 20 - }, - "total": "value" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-first-request", - "pageScope": true, - "script": "\tdata \u003d payload[\"data\"]\n\tinitial_data \u003d payload[\"initial_data\"]\n\tself.props.data \u003d data\n\tself.custom.initial_data \u003d initial_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-historical-data", - "pageScope": true, - "script": "\thistorical_data \u003d payload[\"data\"]\n\tself.props.data \u003d historical_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "load_initial_data", - "pageScope": true, - "script": "\trequest \u003d payload[\"data\"]\n\tsystem.perspective.print(\"initial message received\")\n\tif request \u003d\u003d True:\n\t\tself.props.data \u003d self.custom.initial_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.data \u003d []\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "Table" - }, - "position": { - "basis": "980px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-historical-data", - "pageScope": true, - "script": "#\tdata \u003d payload[\"data\"]\n#\tself.getChild(\"Table\").props.data \u003d data", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "custom": { - "download_in_progress": true, - "enable_timeout": false, - "priority_filters": "", - "time_from_filter": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758779520911 - }, - "time_to_filter": { - "$": [ - "ts", - 192, - 1758783120911 - ], - "$ts": 1758783120911 - }, - "type_filters": null - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\n from datetime import datetime\n def format_date(value):\n\t\tif isinstance(value, (int, long)) and value \u003e 10000000:\n\t\t\ttimestamp \u003d system.date.fromMillis(value)\n\t\t\treturn system.date.format(timestamp, \"yyyy-MM-dd HH:mm:ss\")\n\t\t\t\n\t\t# If value is not a valid timestamp, return as-is\n\t\treturn str(value)\n \n try:\n\n # Get filtered data\n table \u003d self.parent.parent.getChild(\"Table\").getChild(\"Table\")\n filtered_data \u003d table.props.filter.results.data\n\n if not filtered_data or len(filtered_data) \u003d\u003d 0:\n system.perspective.print(\"No filtered data to export.\")\n return\n\n # Get correct column order from the table\u0027s column config\n column_order \u003d [col[\"field\"] for col in table.props.columns if \"field\" in col]\n\n csv_content \u003d \",\".join(column_order) + \"\\n\"\n\n # Build rows\n for row_dict in filtered_data:\n row \u003d []\n for col in column_order:\n raw_val \u003d row_dict.get(col, \"\")\n value \u003d format_date(raw_val)\n value \u003d value.replace(\",\", \";\") # CSV safety\n row.append(value)\n csv_content +\u003d \",\".join(row) + \"\\n\"\n\n # Export CSV\n csv_bytes \u003d csv_content.encode(\"utf-8\")\n system.perspective.download(\"filtered_alarms_history.csv\", csv_bytes)\n\n system.perspective.print(\"CSV export completed successfully. Exported %d records.\" % len(filtered_data))\n\n except Exception as e:\n system.perspective.print(\"Export failed: \" + str(e))" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Export", - "tooltip": { - "enabled": true, - "text": "Exports the data displayed in the table." - } - }, - "position": { - "basis": "120px", - "shrink": 0 - }, - "propConfig": { - "custom.disable": { - "binding": { - "config": { - "expression": "if(isNull({this.custom.start_time}), False, secondsBetween({this.custom.start_time}, {this.custom.time_now}))" - }, - "transforms": [ - { - "code": "\tif value \u003e 60:\n\t\tself.custom.enable_timeout \u003d False\n\t\treturn False\n\telse:\n\t\treturn True", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.download_complete": { - "binding": { - "config": { - "path": "session.custom.downloads" - }, - "transforms": [ - { - "code": "\tif value \u003d\u003d True:\n\t\tself.custom.download_in_progress \u003d False", - "type": "script" - } - ], - "type": "property" - } - }, - "custom.priority_filters": { - "persistent": true - }, - "custom.start_time": { - "binding": { - "config": { - "expression": "{this.custom.enable_timeout}" - }, - "transforms": [ - { - "code": "\tif value \u003d\u003d True:\n\t\treturn self.custom.time_now", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.time_from_filter": { - "persistent": true - }, - "custom.time_now": { - "binding": { - "config": { - "expression": "now()" - }, - "type": "expr" - } - }, - "custom.time_to_filter": { - "persistent": true - }, - "props.enabled": { - "binding": { - "config": { - "expression": "!{this.custom.enable_timeout} || !{this.custom.download_in_progress} " - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "if(!{this.custom.enable_timeout}, \"Export\",\r\nif({this.custom.download_in_progress}, \"Exporting...\",\r\n\"Export\"))" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/import_export" - } - }, - "primary": false, - "style": { - "margin": 15, - "marginLeft": 20 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-message-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.message_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\taction \u003d payload[\"data\"]\n\tif action \u003d\u003d \"reset\":\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue\n\t\t", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "580px", - "grow": 1 - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": 960 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\t# Get current page number from NumericEntryField\n\tcurrent_page \u003d self.getSibling(\"NumericEntryField\").props.value\n\t\n\t# Decrease page by 1, but don\u0027t go below 1\n\tif current_page \u003e 1:\n\t\tself.getSibling(\"NumericEntryField\").props.value \u003d current_page - 1" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": 150 - }, - "props": { - "image": { - "height": 50, - "width": 50 - }, - "primary": false, - "text": "Back" - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "NumericEntryField" - }, - "position": { - "basis": "196px" - }, - "props": { - "format": "0,0", - "value": 1 - }, - "type": "ia.input.numeric-entry-field" - }, - { - "custom": { - "value": "value" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\t# Get current value from NumericEntryField\n\tcurrent_value \u003d self.getSibling(\"NumericEntryField\").props.value\n\t\n\t# Increase by 1\n\tself.getSibling(\"NumericEntryField\").props.value \u003d current_value + 1" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_0" - }, - "position": { - "basis": 150 - }, - "props": { - "image": { - "height": 50, - "width": 50 - }, - "primary": false, - "text": "Next" - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": 960 - }, - "props": { - "justify": "space-evenly" - }, - "type": "ia.container.flex" - }, - { - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": 960 - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Paginate" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "justify": "space-evenly" - }, - "type": "ia.container.flex" - }, - { - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": 50 - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Background-Styles/Grey-Background" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Historical_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "justify": "space-evenly" - }, - "type": "ia.container.flex" - } - ], - "custom": { - "shelvedAlarms": [] - }, - "meta": { - "name": "TabContainer" - }, - "position": { - "basis": "300px", - "grow": 1 - }, - "propConfig": { - "props.currentTabIndex": { - "onChange": { - "enabled": null, - "script": "\tif self.props.currentTabIndex !\u003d 0:\n\t payload \u003d {}\n\t filter_on \u003d \"false\"\n\t payload[\"reset\"] \u003d filter_on\n\t system.perspective.sendMessage(\"reset-filters\", payload\u003dpayload, scope\u003d\"page\")\n\t \n\tif currentValue.value \u003d\u003d 1:\n\t shelved_info \u003d system.alarm.getShelvedPaths()\n\t alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\t \n\t tableData \u003d []\n\t \n\t for alarm in alarms:\n\t if alarm.isShelved() and not alarm.isAcked() and not alarm.isCleared():\n\t # Get alarm path as string\n\t alarm_path \u003d str(alarm.getSource())\n\t \n\t # Get active time\n\t activeData \u003d alarm.getActiveData()\n\t startTime \u003d activeData.getTimestamp() if activeData else None\n\t \n\t # Find shelved info for this alarm\n\t shelveEntry \u003d \"\"\n\t \n\t for shelved_item in shelved_info:\n\t shelved_str \u003d str(shelved_item)\n\t \n\t if alarm_path in shelved_str:\n\t # Extract the value part (after the first comma)\n\t if \",\" in shelved_str:\n\t start_idx \u003d shelved_str.find(\",\")\n\t shelveEntry \u003d shelved_str[start_idx + 1:].rstrip(\"}\")\n\t break\n\t \n\t # Parse shelved information\n\t expiration \u003d \"\"\n\t \n\t if shelveEntry:\n\t # Extract expiration (between \"expiration:\" and \",\")\n\t if \"expiration:\" in shelveEntry:\n\t exp_part \u003d shelveEntry.split(\"expiration:\")[1]\n\t if \",\" in exp_part:\n\t expiration \u003d exp_part.split(\",\")[0].strip()\n\t else:\n\t expiration \u003d exp_part.strip()\n\t \n\t # Only add if we have a valid start time\n\t if startTime:\n\t tableData.append({\n\t \"name\": alarm.getName(),\n\t \"path\": alarm_path,\n\t \"activeTime\": system.date.format(system.date.fromMillis(startTime), \"yyyy-MM-dd HH:mm:ss\"),\n\t \"expirationTime\": expiration,\n\t \"priority\": str(alarm.getPriority())\n\t })\n\t \n\t self.custom.shelvedAlarms \u003d tableData\n\t\n\ttry:\n\t pageid \u003d self.view.custom.activityLogger.alt_pageid + \u0027/\u0027 + self.props.tabs[previousValue.value]\n\t pageid \u003d pageid.replace(\u0027 \u0027, \u0027\u0027)\n\t payload \u003d activityLog.productMetrics.createActivityPayload(self.view, \u0027page\u0027, pageid, pageid)\n\t self.view.custom.activityLogger.start_time \u003d system.date.now()\n\t if payload:\n\t system.perspective.sendMessage(\u0027activityLogger-TabChanged\u0027, payload\u003dpayload, scope\u003d\u0027page\u0027)\n\texcept:\n\t pass" - } - } - }, - "props": { - "contentStyle": { - "classes": "Background-Styles/Grey-Background" - }, - "menuType": "modern", - "style": { - "classes": "Background-Styles/Grey-Background" - }, - "tabSize": { - "width": 140 - }, - "tabStyle": { - "active": { - "backgroundColor": "#EEEEEE", - "borderLeftColor": "#7FFF00", - "borderLeftStyle": "solid", - "borderLeftWidth": 5, - "borderTopLeftRadius": 5, - "borderTopRightRadius": 5, - "color": "#000000", - "fontFamily": "Arial", - "fontWeight": "bold", - "outlineStyle": "none", - "textDecoration": "underline" - }, - "inactive": { - "backgroundColor": "#D7D7D7", - "borderLeftColor": "#FFFFFF", - "borderTopLeftRadius": 5, - "borderTopRightRadius": 5, - "color": "#969696", - "fontFamily": "Arial" - } - }, - "tabs": [ - "Active Alarms", - "Alarm Hit List", - "Historical" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "root" - }, - "props": { - "style": { - "classes": "Background-Styles/Main-Background" - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "activityLogger-TabChanged", - "pageScope": true, - "script": "\t# implement your handler here\n\tif payload:\n\t\tactivityLog.productMetrics.callActivityLoggerAPI(payload)", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/26a34e8edbd6a405250bfdb8114e1fd8ccc502c2f1e187b06efedc6804ebe75b b/.resources/26a34e8edbd6a405250bfdb8114e1fd8ccc502c2f1e187b06efedc6804ebe75b deleted file mode 100644 index 46c1c60e..00000000 Binary files a/.resources/26a34e8edbd6a405250bfdb8114e1fd8ccc502c2f1e187b06efedc6804ebe75b and /dev/null differ diff --git a/.resources/29a8a7a5b6b5d140516ccec57fd665afa9f5eeb673fe8b41f9bd1b49188a3378 b/.resources/29a8a7a5b6b5d140516ccec57fd665afa9f5eeb673fe8b41f9bd1b49188a3378 deleted file mode 100644 index 6895e734..00000000 --- a/.resources/29a8a7a5b6b5d140516ccec57fd665afa9f5eeb673fe8b41f9bd1b49188a3378 +++ /dev/null @@ -1,947 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "running_state": -1, - "state": 0, - "views_data": [] - }, - "params": { - "tagProps": [ - "System/MCM04/Station/Chute_JR/FL1038_2_JR1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.running_state": { - "binding": { - "config": { - "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" - }, - "transforms": [ - { - "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", - "type": "expression" - } - ], - "type": "expr" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 3, - "output": 3 - }, - { - "input": 2, - "output": 2 - }, - { - "input": 1, - "output": 1 - }, - { - "input": 0, - "output": 0 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.views_data": { - "binding": { - "config": { - "struct": { - "equipment_id": "{view.params.tagProps[0]}" - }, - "waitOnAll": true - }, - "transforms": [ - { - "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", - "type": "script" - } - ], - "type": "expr-struct" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-Eas-TPR\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "TIPPER FAULTED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Tipper_Faulted" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "FAULTED" - }, - { - "input": false, - "output": "NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "NOT FAULTED", - "output": "#008000" - }, - { - "input": "FAULTED", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "DUMPING" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Dumping" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "TRUE" - }, - { - "input": false, - "output": "FALSE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "FALSE", - "output": "#008000" - }, - { - "input": "TRUE", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_2" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Enable_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#B17B50\",\r\n if(\r\n {this.props.text} \u003d \"ENABLED\",\r\n \"#00FF00\",\r\n if(\r\n {this.props.text} \u003d \"DISABLED\",\r\n \"#FF0000\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Enable_PB" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "DISABLE", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "ENABLE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/sync_problem" - } - }, - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Reset Jam" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "props": { - "currentTabIndex": 2, - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "tabs": [ - "Alarms", - "Info", - "Commands" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/2a2fe410ae0d579f86b15642a621abd4e12b2f169c2e92626d4102a3b29b3c8b b/.resources/2a2fe410ae0d579f86b15642a621abd4e12b2f169c2e92626d4102a3b29b3c8b deleted file mode 100644 index 69366563..00000000 --- a/.resources/2a2fe410ae0d579f86b15642a621abd4e12b2f169c2e92626d4102a3b29b3c8b +++ /dev/null @@ -1,387 +0,0 @@ -{ - "custom": { - "activityLogger": { - "alt_pageid": "search", - "buttonid": "search", - "start_time": { - "$": [ - "ts", - 192, - 1758634747140 - ], - "$ts": 1758634747140 - } - }, - "deviceMapping": {} - }, - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tbuttonid \u003d self.custom.activityLogger.buttonid\n\tself.custom.activityLogger.start_time \u003d system.date.now()\n\tactivityLog.productMetrics.callLogger(self, \u0027click\u0027, buttonid)\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "params": {}, - "propConfig": { - "custom.activityLogger": { - "persistent": true - }, - "custom.activityLogger.pageid": { - "binding": { - "config": { - "expression": "{page.props.path}" - }, - "transforms": [ - { - "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", - "type": "script" - } - ], - "type": "expr" - } - } - }, - "props": { - "defaultSize": { - "height": 339, - "width": 767 - } - }, - "root": { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "77px" - }, - "props": { - "style": { - "backgroundColor": "#555555", - "color": "#FFFFFF", - "fontWeight": "bold", - "textIndent": "15px" - }, - "text": "Search" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Icon" - }, - "position": { - "basis": "30px" - }, - "props": { - "color": "#FFFFFF", - "path": "material/search" - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "45px" - }, - "props": { - "style": { - "backgroundColor": "#555555" - } - }, - "type": "ia.container.flex" - }, - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\trow \u003d event.value\n\tdevice_name \u003d row.get(\"SourceId\")\n\t\n\t# Find the full path from the original data\n\tids \u003d config.project_config.global_project_page_ids\n\tfull_source_id \u003d None\n\t\n\tfor k, v in ids.items():\n\t if str(k).endswith(\"/\" + device_name) or str(k) \u003d\u003d device_name:\n\t full_source_id \u003d str(k)\n\t break\n\t\n\tif full_source_id:\n\t config.project_config.source_id_lookup(self, full_source_id)\n\telse:\n\t config.project_config.source_id_lookup(self, device_name)\n\t\n\tsystem.perspective.closePopup(id \u003d \"Search\")" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Table" - }, - "position": { - "basis": "294px" - }, - "props": { - "cells": { - "style": { - "textIndent": "15px" - } - }, - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "SourceId", - "filter": { - "boolean": { - "condition": "", - "value": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": false, - "sort": "none", - "sortable": false, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 250 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Page", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 75 - } - ], - "data": { - "$": [ - "ds", - 192, - 1758634747196 - ], - "$columns": [ - { - "data": [], - "name": "SourceId", - "type": "String" - }, - { - "data": [], - "name": "Page", - "type": "String" - } - ] - }, - "filter": { - "enabled": true, - "style": { - "backgroundColor": "#2B2B2B", - "color": "#FFFFFF" - } - }, - "headerStyle": { - "backgroundColor": "#D3D3D3", - "textIndent": "15px" - }, - "pager": { - "activeOption": 50 - }, - "rows": { - "highlight": { - "color": "#FFFFFF" - }, - "style": { - "classes": "Background-Styles/Controller" - } - }, - "virtualized": false - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "search-devices", - "pageScope": true, - "script": "\tself.props.data \u003d payload.get(\"dataset\")", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.table" - } - ], - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tids \u003d config.project_config.global_project_page_ids\n\tdata \u003d []\n\t\n\tfor k, v in ids.items():\n\t # Extract device name from full path (last part after final slash)\n\t device_name \u003d str(k)\n\t if \"/\" in device_name:\n\t device_name \u003d device_name.split(\"/\")[-1]\n\t \n\t short_page \u003d str(v)[:5]\n\t data.append([device_name, short_page])\n\t\n\theader \u003d [\"SourceId\", \"Page\"]\n\tdataset \u003d system.dataset.toDataSet(header, data)\n\t\n\t# Assign to the Table component\n\tself.getChild(\"Table\").props.data \u003d dataset" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/31aee7f3b5f7f48ed5d701c780759f18cd95786c304bb827ec8aa21c098c4fb2 b/.resources/31aee7f3b5f7f48ed5d701c780759f18cd95786c304bb827ec8aa21c098c4fb2 deleted file mode 100644 index 38f8d7db..00000000 --- a/.resources/31aee7f3b5f7f48ed5d701c780759f18cd95786c304bb827ec8aa21c098c4fb2 +++ /dev/null @@ -1,294 +0,0 @@ -{ - "custom": { - "color": "#000000", - "priority": "No Active Alarms", - "state": "TagError" - }, - "params": { - "tagProps": [ - "Status/Chuste/Chute_0", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif data.get(\"bLamp_Jam\"):\n\t\treturn \"#FFFFFF\" \n\treturn \"#000000\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif data.get(\"bLamp_Jam\"):\n\t return \"Low\" \n\treturn \"No Active Alarms\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\t\n\tif value is None or data.get(\"_quality\") \u003d\u003d \"Bad\" or data.get(\"error\"):\n\t return \"TagError\"\n\t \n\tif data.get(\"bLamp_Jam\"):\n\t return \"JR PB Pressed\" \n\treturn \"Inactive\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 25, - "width": 25 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "Button" - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})" - }, - "enabled": false, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0,0 H 20 V 20 H 0 Z", - "fill": { - "paint": "#AAAAAA" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": "1.5" - }, - "type": "path" - }, - { - "d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#000000", - "width": "1" - }, - "type": "path" - } - ], - "viewBox": "0 0 20 20" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"TagError\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_buttons" - }, - "type": "property" - } - } - }, - "props": { - "mode": "percent", - "style": { - "cursor": "pointer" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/31f6161059e3017af0de7760b0d0dd42d9188a45e59d2aeb33e45c7f6cff38b7 b/.resources/31f6161059e3017af0de7760b0d0dd42d9188a45e59d2aeb33e45c7f6cff38b7 deleted file mode 100644 index 7ba03e76..00000000 Binary files a/.resources/31f6161059e3017af0de7760b0d0dd42d9188a45e59d2aeb33e45c7f6cff38b7 and /dev/null differ diff --git a/.resources/34a2e32898c97d572d0cd651ff0d7b7226ebc477d39157377d2df7aef03e5216 b/.resources/34a2e32898c97d572d0cd651ff0d7b7226ebc477d39157377d2df7aef03e5216 deleted file mode 100644 index ac871cef..00000000 --- a/.resources/34a2e32898c97d572d0cd651ff0d7b7226ebc477d39157377d2df7aef03e5216 +++ /dev/null @@ -1,228 +0,0 @@ -{ - "custom": { - "alarm_filter": { - "magnificaiton": "None", - "orderby": false, - "show_buttons": true, - "show_camera_jams": true, - "show_diagnostic": true, - "show_fio": true, - "show_gateways": true, - "show_low_alarm": true, - "show_map": true, - "show_running": true, - "show_safety": true - }, - "alarms": [], - "aws": { - "prefix": "eu", - "region": "eu-west-1" - }, - "colours": { - "Fallback": "#00FF00", - "colour_impaired": false, - "state0": "#8C8C8C", - "state1": "#FF0000", - "state6": "#CCCCFF" - }, - "command_auth": { - "auth_time": { - "$": [ - "ts", - 192, - 1758618839575 - ], - "$ts": 1758618839575 - }, - "enabled": false, - "timeout_sp": 500 - }, - "covert": true, - "deviceSearchId": "", - "download_url": "https://scadacloud-storage-prod-downloadbucketdc1a1095-17r7vrw051y3t.s3.amazonaws.com/history/DNG2/58b56f26-c115-41b5-badb-a3394f312630-1672826106.csv?AWSAccessKeyId\u003dASIAVDEI3U6Y3J5KB2NA\u0026Signature\u003dzucRF2nCigK4y5M%2BNbjoI06UUng%3D\u0026x-amz-security-token\u003dIQoJb3JpZ2luX2VjEKL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJIMEYCIQCy78peP6YRJ1gyf9RROmmcfk%2BRHyPhxv6ejHJgyEG0KQIhALXnJXYIyDiWzr9vxehoDIa2c7sx818gUyuiFXYY6rb2KsoDCOv%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMzUwMzI2ODU5Njk3IgzVrdKyNsVjl%2BNjqWQqngOJCTFOLVppHMmo1otgHZCXlVISlnBz6rz6ykr8SHgGQPc0EsaL9a1I0oQmS42i%2BlRHpEpQfMdjUbP3dr2OnVKXmopkkUJZ592SPzA3MZzS95SHXMvbbPDs0OAw5mKdS6LHQAQb90ZdQdeoEj%2FG1bPEIiifVT07PhHMA0JMS7ExgXmHzq1c6W%2Fjc%2BdfQOjl41qnWcE1GH5MaVfU%2FOKW5PffN6pLf%2BJ61YjjbXqPIpPHimJSGqMI5BmFzAfSlsYAtgFT8bMyJhbUDaPlDF7X42SSYLs1CeAbddPFMvrhDIUk%2BYTA3oV69SMjX91LrKBNqRhFS%2F0R4U8nbA4rSd%2BhMkdr5RSwa9Q22ZQpbzuqQU1H%2B4oQy6419lQg3lkBF5SBNGdvQajD6mav2ipHYe7OkX5GKq2pNzBLzJsqGGnsJvISB83ShA6SnuiZFx%2F2LXvDtEu3jTCS4yRjDegxiKRBs%2FiwH0dN2ztb8a3vnSJN0EqaoORf2eVb%2BozzAv1EBaqnUEZZAoOKb8iaxpbZtqLaUNOOd7VsHsUPoBQRkKqH2RAw95nVnQY6nQFAgIr2YAjgyrsuAfVgr2b41jc3Dj83zJ6I9LI%2BglDMgQFyfL0RNPmoxEu3DDfq5yLy8MtiPlYcs71J3J8Z%2B7xIkH%2BIPWKwmKLsvaEtN7Io1kOfvFgEcMhhIPRwwEj70AVokPncUQ8HtKQhXnq7l1YZ4yyAw2poT%2Ff%2FgJwv7suOu2dZeh%2BH%2B9OwE4M%2BRmVoFO7tTWIakPgODw2ZFzqs\u0026Expires\u003d1672829705", - "enable_activity_logging": true, - "fc": "SAT9", - "id_to_state": "{\"PLC01/0820_06_09\":1,\"PLC02/0820_91_16/B4510\":1,\"PLC03/0820_82_04/B312_3\":1,\"PLC09/0120_33_01/B425_0\":1,\"PLC09/1210_03_27\":3,\"PLC02/0820_07_39_BT1\":1,\"ARSAW1501/05_10/B12_6\":3,\"PLC09/0110_13_40\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_0299\":2,\"PLC02/0820_05_31/B4000_2\":1,\"PLC09/1210_03_30\":3,\"PLC09/1210_03_36\":3,\"PLC1000/1000_43_01\":1,\"PLC09/0120_35_18/B505_2\":1,\"PLC02/0820_05_20/B3804_6\":1,\"PLC01/0820_06_05\":1,\"PLC01/0820_06_07\":1,\"PLC1000/1000_22_02/B501_3\":1,\"PLC01/0820_01_41/B6103_2\":1,\"PLC1000/1000_42_04/B517_7\":1,\"PLC09/2210_08_60/B911_1\":1,\"PLC02/0820_05_06/B3702_6\":1,\"PLC09/2210_08_60/B911_5\":1,\"PLC09/0110_23_40/B304_2\":1,\"PLC09/1210_02_01/B705_0\":1,\"PLC09/1210_03_25\":3,\"PLC01/0820_01_75/B6401_6\":1,\"PLC01/0820_64_03\":1,\"PLC02/0820_07_29_BT1/TN12A\":1,\"PLC02/0820_05_03/B3701_2\":1,\"PLC01/0820_06_14\":1,\"PLC09/2210_03_45/B1007_4\":1,\"PLC01/0820_06_17\":1,\"PLC01/0820_06_18\":1,\"FSC10/OFZ_0850_31/CH_0850_31_06\":2,\"FSC10/OFZ_0850_31/CH_0850_31_07\":2,\"FSC10/OFZ_0850_31/CH_0850_31_04\":2,\"FSC10/OFZ_0850_31/CH_0850_31_05\":2,\"FSC10/OFZ_0850_31/CH_0850_31_08\":2,\"FSC10/OFZ_0850_31/CH_0850_31_09\":2,\"PLC09/1210_03_06\":3,\"PLC09/1210_03_04\":3,\"PLC02/0820_05_41/B4100_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_02\":2,\"PLC02/0820_91_08/B4318\":1,\"FSC10/OFZ_0850_31/CH_0850_31_03\":2,\"FSC10/OFZ_0850_31/CH_0850_31_01\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0148\":3,\"PLC02/0820_01_07\":1,\"PLC09/1210_03_13\":3,\"PLC09/1210_03_12\":1,\"PLC26/0513_11_02/B118_1\":3,\"PLC09/0120_52_23/B528_6\":1,\"PLC09/0120_51_01/B510_0\":1,\"ARSAW1303\":3,\"PLC09/2210_02_01\":1,\"PLC09/1210_02_30\":3,\"PLC1000/1000_42_04\":1,\"PLC09/1210_03_02\":3,\"PLC1000/1000_43_01/B525_0\":1,\"PLC26/0513_31_30/M1\":3,\"PLC01/0820_02_02/B6500_6\":1,\"FSC10/OFZ_0850_31/CH_0850_31_28\":2,\"FSC10/OFZ_0850_31/CH_0850_31_29\":2,\"FSC10/OFZ_0850_31/CH_0850_31_26\":2,\"PLC09/0110_23_40\":1,\"PLC01/0820_01_47/B6200_6\":1,\"FSC10/OFZ_0850_52/CH_0850_52_01\":2,\"FSC10/OFZ_0850_31/CH_0850_31_27\":2,\"FSC10/OFZ_0850_31/CH_0850_31_20\":2,\"FSC10/OFZ_0850_31/CH_0850_31_21\":2,\"FSC10/OFZ_0850_31/CH_0850_31_24\":2,\"FSC10/OFZ_0850_31/CH_0850_31_25\":2,\"FSC10/OFZ_0850_31/CH_0850_31_22\":2,\"FSC10/OFZ_0850_31/CH_0850_31_23\":2,\"FSC10/IFZ_0850_68/PCO_0850_68_98\":2,\"PLC09/0120_33_10\":1,\"PLC09/2210_09_60\":1,\"PLC09/0110_01_20\":1,\"FSC10/OFZ_0850_31/CH_0850_31_17\":2,\"FSC10/OFZ_0850_31/CH_0850_31_18\":2,\"FSC10/OFZ_0850_31/CH_0850_31_15\":2,\"FSC10/OFZ_0850_31/CH_0850_31_16\":2,\"FSC10/OFZ_0850_31/CH_0850_31_19\":2,\"PLC09/0120_52_08/B526_7\":1,\"FSC10/OFZ_0850_31/CH_0850_31_10\":2,\"PLC02/0820_91_14/B4422\":1,\"FSC10/OFZ_0850_31/CH_0850_31_13\":2,\"FSC10/OFZ_0850_31/CH_0850_31_14\":2,\"FSC10/OFZ_0850_31/CH_0850_31_11\":2,\"FSC10/OFZ_0850_31/CH_0850_31_12\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0147\":3,\"PLC01/0820_06_05/B6902_2\":1,\"FSC10/OFZ_0850_51/CH_0850_51_50\":2,\"PLC09/0120_33_01\":1,\"PLC09/1210_03_60\":3,\"FSC10/OFZ_0850_31/CH_0850_31_48\":2,\"FSC10/OFZ_0850_31/CH_0850_31_49\":2,\"PLC01/0820_02_04/B6501_6\":1,\"FSC10/OFZ_0850_31/CH_0850_31_42\":2,\"PLC02/0820_07_09_BT1\":1,\"FSC10/OFZ_0850_51/CH_0850_51_43\":2,\"PLC01/0820_03_18/B6802_6\":1,\"FSC10/OFZ_0850_31/CH_0850_31_43\":2,\"PLC09/1210_03_48\":3,\"FSC10/OFZ_0850_31/CH_0850_31_40\":2,\"FSC10/OFZ_0850_51/CH_0850_51_41\":2,\"FSC10/OFZ_0850_31/CH_0850_31_41\":2,\"PLC02/0820_91_18/B4518\":1,\"FSC10/OFZ_0850_31/CH_0850_31_46\":2,\"FSC10/OFZ_0850_31/CH_0850_31_47\":2,\"FSC10/OFZ_0850_51/CH_0850_51_44\":2,\"FSC10/OFZ_0850_31/CH_0850_31_44\":2,\"FSC10/OFZ_0850_31/CH_0850_31_45\":2,\"PLC01/0820_55_03/B420_1\":1,\"FSC10/OFZ_0850_31/CH_0850_31_39\":2,\"FSC10/OFZ_0850_31/CH_0850_31_37\":2,\"FSC10/OFZ_0850_31/CH_0850_31_38\":2,\"PLC09/1210_03_39\":3,\"FSC10/OFZ_0850_31/CH_0850_31_31\":2,\"FSC10/OFZ_0850_31/CH_0850_31_32\":2,\"PLC09/0120_32_02\":1,\"FSC10/OFZ_0850_31/CH_0850_31_30\":2,\"PLC09/0120_35_10/B504_1\":1,\"FSC10/OFZ_0850_31/CH_0850_31_35\":2,\"PLC09/2210_02_01/B905_0\":1,\"PLC09/0110_23_40/B305_1\":1,\"ARSAW1501\":3,\"PLC09/0110_23_40/B305_0\":1,\"FSC10/OFZ_0850_31/CH_0850_31_36\":2,\"FSC10/OFZ_0850_31/CH_0850_31_33\":2,\"PLC09/0110_23_40/B305_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_34\":2,\"PLC09/1210_03_42\":3,\"PLC01/0820_06_07/B6903_2\":1,\"PLC26/0513_11_02\":3,\"PLC09/1210_03_45\":3,\"PLC09/0120_32_11\":1,\"ARSAW1303/05_22\":3,\"PLC09/0110_01_20/B102_3\":1,\"PLC09/0110_01_20/B102_2\":1,\"PLC09/2210_03_45\":1,\"PLC01/0820_01_73/B6400_6\":1,\"PLC02/0820_07_49_BT1\":1,\"PLC80/0632_05_40/B113_3\":1,\"PLC80/0632_05_40/B113_4\":1,\"PLC26/S01/A902\":4,\"PLC80/0632_05_40/B113_5\":1,\"PLC26/S01/A901\":4,\"PLC26/0513_31_23\":3,\"PLC09/0120_43_01\":1,\"PLC80/0632_05_40/B113_2\":1,\"PLC80/0632_01_07/B103_6\":1,\"PLC14/0580_01_01\":3,\"PLC09/0120_51_08/B510_7\":1,\"PLC09/0120_41_20/B521_3\":1,\"PLC26/0513_31_19\":3,\"PLC01/0820_02_05/B6502_2\":1,\"PLC02/0820_07_29_BT1\":1,\"PLC02/0820_91_12/B4414\":1,\"PLC82/0640_21_02/BT1\":1,\"PLC01/0820_02_01/B6500_2\":1,\"FSC10/OFZ_0850_53/CH_0850_53_02\":2,\"PLC81/0631_05_40/B113_5\":1,\"PLC02/0820_91_13/B4418\":1,\"PLC09/1210_02_30/M1\":3,\"PLC81/0631_05_40/B113_4\":1,\"PLC81/0631_05_40/B113_3\":1,\"FSC10/OFZ_0850_55/CH_0850_55_04\":2,\"PLC1000/1000_22_02\":1,\"PLC69/0330_07_20/B118_4\":1,\"FSC10/OFZ_0850_55/CH_0850_55_02\":2,\"FSC10/OFZ_0850_55/CH_0850_55_03\":2,\"PLC69/0330_07_20/B118_3\":1,\"PLC16/0580_21_01\":3,\"PLC01/0820_01_43/B6104_2\":1,\"PLC1000/1000_33_12\":1,\"PLC01/0820_55_03\":1,\"PLC27/0514_04_20/B106_5\":1,\"PLC09/2210_04_22\":1,\"PLC02/0820_05_14/B3801_6\":1,\"PLC26/0513_31_30\":3,\"PLC26/0513_32_01\":3,\"PLC09/1210_03_27/B805_2\":3,\"PLC02/0820_05_24/B3901_6\":1,\"PLC09/1210_03_04/B802_3\":3,\"PLC82/0640_21_03\":1,\"PLC82/0640_21_04\":1,\"PLC82/0640_21_01\":1,\"PLC26/0513_31_23/B320_6\":3,\"PLC82/0640_21_02\":1,\"FSC10/OFZ_0850_53/CH_0850_53_20\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_1180\":3,\"PLC02/0820_91_06/B4310\":1,\"PLC09/0110_21_20\":1,\"PLC1000/1000_33_01\":1,\"FSC10/OFZ_0850_53/CH_0850_53_29\":2,\"FSC10/OFZ_0850_53/CH_0850_53_26\":2,\"PLC01/0820_01_71/B6306_6\":1,\"PLC09/0120_35_26/B506_2\":1,\"PLC09/0120_51_01\":1,\"PLC09/0120_51_08\":1,\"PLC09/0120_41_14/B520_5\":1,\"PLC09/0120_41_20\":1,\"PLC09/0120_32_11/B423_2\":1,\"PLC82/0640_21_01/BT1\":1,\"PLC09/1210_09_60/M1\":3,\"PLC80/0632_05_40\":1,\"PLC09/0120_41_14\":1,\"FSC10\":4,\"PLC01/0820_57_03\":1,\"PLC02/0820_05_02/B3700_6\":1,\"PLC09/0120_51_15\":1,\"PLC02/0820_91_51/B5210\":1,\"PLC27/0514_04_20\":1,\"PLC09/1210_03_45/B807_4\":3,\"PLC09/1210_03_39/B806_6\":3,\"PLC01/0820_57_03/B421_1\":1,\"PLC09/0120_41_08\":1,\"PLC02/0820_91_52/B5214\":1,\"PLC09/0120_51_23\":1,\"PLC09/2210_03_12\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_1174\":3,\"PLC09/0120_52_15/B527_6\":1,\"PLC01/0820_01_77/B6402_6\":1,\"PLC01/0820_06_18/B7003_6\":1,\"PLC02/0820_91_02/B4214\":1,\"FSC10/OFZ_0850_33/CH_0850_33_21\":2,\"PLC26/0513_31_19/B320_2\":3,\"FSC10/OFZ_0850_33/CH_0850_33_25\":2,\"PLC09/0120_52_01\":1,\"PLC02/0820_91_53/B5218\":1,\"FSC10/OFZ_0850_75\":2,\"FSC10/OFZ_0850_73\":2,\"PLC09/0120_52_08\":1,\"PLC01/0820_02_03/B6501_2\":1,\"PLC09/2210_07_01\":1,\"FSC10/OFZ_0850_54/CH_0850_54_08\":2,\"PLC01/0820_06_14/B7001_6\":1,\"FSC10/OFZ_0850_54/CH_0850_54_06\":2,\"FSC10/OFZ_0850_54/CH_0850_54_03\":2,\"PLC82/0640_21_04/BT1\":1,\"FSC10/MAZ_0850_98/CCO_0850_98_98\":3,\"PLC09/0120_52_15\":1,\"PLC02/0820_07_19_BT1/TN8A\":1,\"FSC10/OFZ_0850_33/CH_0850_33_13\":2,\"PLC02/0820_04_28/B3601_6\":1,\"FSC10/OFZ_0850_33/CH_0850_33_14\":2,\"FSC10/OFZ_0850_33/CH_0850_33_12\":2,\"PLC01/0820_06_09/B6904_2\":1,\"PLC09/2210_06_29\":1,\"FSC10/OFZ_0850_33/CH_0850_33_15\":2,\"PLC09/2210_03_12/B1003_3\":1,\"PLC81/0631_05_40\":1,\"FSC10/OFZ_0850_33/CH_0850_33_19\":2,\"FSC10/OFZ_0850_54/CH_0850_54_19\":2,\"PLC02/0820_07_39_BT1/TN16A\":1,\"FSC10/OFZ_0850_54/CH_0850_54_17\":2,\"PLC69\":1,\"PLC09/2210_09_60/B912_5\":1,\"PLC09/0120_52_23\":1,\"PLC02/0820_05_41\":1,\"PLC01/0820_01_49/B6201_6\":1,\"FSC10/OFZ_0850_55\":2,\"PLC09/2210_07_27\":1,\"FSC10/OFZ_0850_54\":2,\"FSC10/OFZ_0850_33/CH_0850_33_05\":2,\"FSC10/OFZ_0850_53\":2,\"PLC01/0820_64_03/B425_5\":1,\"FSC10/OFZ_0850_52\":2,\"FSC10/OFZ_0850_51\":2,\"PLC02/0820_07_19_BT1\":1,\"FSC10/OFZ_0850_75/CH_0850_75_08\":2,\"FSC10/OFZ_0850_54/CH_0850_54_20\":2,\"PLC02/0820_91_07/B4314\":1,\"PLC69/0330_09_30\":1,\"PLC69/0330_09_30/B120_2\":1,\"PLC69/0330_09_30/B120_4\":1,\"PLC07/0320_31_20/B520_1\":1,\"PLC80\":1,\"PLC09/0120_51_15/B511_6\":1,\"FSC10/MAZ_0850_98\":3,\"PLC03\":1,\"PLC01/0820_02_04\":1,\"PLC01/0820_02_03\":1,\"PLC01/0820_02_13/B6600_2\":1,\"PLC09/2210_04_22/B1011_5\":1,\"PLC01\":1,\"PLC01/0820_02_02\":1,\"PLC01/0820_02_01\":1,\"PLC02\":1,\"PLC07\":1,\"PLC02/0820_05_20\":1,\"FSC10/OFZ_0850_33\":2,\"FSC10/OFZ_0850_32\":2,\"FSC10/OFZ_0850_31\":2,\"PLC02/0820_05_24\":1,\"PLC02/0820_05_27\":1,\"PLC82/0640_21_03/BT1\":1,\"PLC09\":3,\"PLC01/0820_02_05\":1,\"PLC14\":3,\"PLC01/0820_01_47\":1,\"PLC01/0820_01_46\":1,\"PLC01/0820_02_13\":1,\"ARSAW1501/05_10\":3,\"PLC01/0820_06_17/B7003_2\":1,\"PLC01/0820_01_43\":1,\"PLC02/0820_91_17/B4514\":1,\"PLC01/0820_71_03/B428_1\":1,\"PLC01/0820_01_41\":1,\"PLC16\":3,\"PLC02/0820_05_31\":1,\"PLC1000/1000_12_02/B308_7\":1,\"PLC01/0820_01_50/B6202_2\":1,\"PLC01/0820_59_03/B422_1\":1,\"PLC09/1210_03_60/M1\":3,\"PLC03/0820_82_04\":1,\"PLC01/0820_01_49\":1,\"PLC26\":4,\"PLC01/0820_02_20\":1,\"PLC27\":1,\"PLC01/0820_71_03\":1,\"PLC01/0820_01_50\":1,\"PLC02/0820_05_03\":1,\"PLC02/0820_05_02\":1,\"PLC02/0820_91_28/B4718\":1,\"PLC02/0820_91_33/B4818\":1,\"PLC02/0820_05_06\":1,\"PLC1000/1000_12_02\":1,\"PLC80/0632_03_01/B106_0\":1,\"PLC02/0820_91_15/B4430\":1,\"PLC01/0820_03_07\":1,\"PLC01/0820_03_08\":1,\"PLC01/0820_01_63\":1,\"PLC02/0820_05_14\":1,\"ARSAW1303/05_22/B11_4\":3,\"PLC02/0820_05_15\":1,\"PLC09/2210_06_02\":1,\"PLC01/0820_59_03\":1,\"PLC09/0120_51_23/B512_6\":1,\"PLC09/1210_03_12/B803_3\":1,\"PLC09/1210_03_06/B802_5\":3,\"PLC09/2210_07_01/B1025_0\":1,\"PLC01/0820_03_18\":1,\"PLC01/0820_03_07/B6703_2\":1,\"FSC10/OFZ_0850_32/CH_0850_32_03\":2,\"PLC01/0820_01_79\":1,\"PLC09/0120_41_08/B519_7\":1,\"PLC01/0820_01_77\":1,\"PLC02/0820_91_18\":1,\"PLC02/0820_91_17\":1,\"PLC01/0820_01_75\":1,\"PLC02/0820_91_16\":1,\"PLC01/0820_01_73\":1,\"PLC02/0820_91_15\":1,\"PLC02/0820_91_14\":1,\"FSC10/OFZ_0850_31/CH_0850_31_64\":2,\"PLC01/0820_01_71\":1,\"FSC10/OFZ_0850_31/CH_0850_31_65\":2,\"PLC02/0820_91_13\":1,\"PLC02/0820_91_12\":1,\"FSC10/OFZ_0850_31/CH_0850_31_62\":2,\"FSC10/OFZ_0850_31/CH_0850_31_63\":2,\"FSC10/OFZ_0850_32/CH_0850_32_09\":2,\"FSC10/OFZ_0850_32/CH_0850_32_06\":2,\"FSC10/OFZ_0850_31/CH_0850_31_68\":2,\"FSC10/OFZ_0850_31/CH_0850_31_69\":2,\"FSC10/OFZ_0850_31/CH_0850_31_66\":2,\"PLC26/S01\":4,\"FSC10/OFZ_0850_31/CH_0850_31_67\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0694\":3,\"FSC10/OFZ_0850_31/CH_0850_31_60\":2,\"FSC10/OFZ_0850_31/CH_0850_31_61\":2,\"PLC02/0820_07_49_BT1/TN20A\":1,\"PLC02/0820_91_36/B4910\":1,\"FSC10/OFZ_0850_32/CH_0850_32_13\":2,\"FSC10/OFZ_0850_32/CH_0850_32_14\":2,\"FSC10/OFZ_0850_31/CH_0850_31_59\":2,\"FSC10/OFZ_0850_32/CH_0850_32_12\":2,\"PLC02/0820_91_08\":1,\"PLC02/0820_91_07\":1,\"FSC10/OFZ_0850_73/CH_0850_73_13\":2,\"PLC02/0820_91_06\":1,\"FSC10/OFZ_0850_32/CH_0850_32_10\":2,\"PLC80/0632_03_06/B106_5\":1,\"FSC10/OFZ_0850_73/CH_0850_73_11\":2,\"PLC09/2210_07_27/B1028_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_53\":2,\"PLC02/0820_91_02\":1,\"FSC10/OFZ_0850_31/CH_0850_31_54\":2,\"FSC10/OFZ_0850_73/CH_0850_73_18\":2,\"FSC10/OFZ_0850_31/CH_0850_31_51\":2,\"FSC10/OFZ_0850_73/CH_0850_73_15\":2,\"PLC02/0820_05_27/B3903_2\":1,\"FSC10/OFZ_0850_31/CH_0850_31_52\":2,\"FSC10/OFZ_0850_32/CH_0850_32_17\":2,\"PLC02/0820_04_28\":1,\"FSC10/OFZ_0850_31/CH_0850_31_57\":2,\"FSC10/OFZ_0850_31/CH_0850_31_58\":2,\"FSC10/OFZ_0850_32/CH_0850_32_18\":2,\"FSC10/OFZ_0850_32/CH_0850_32_15\":2,\"FSC10/OFZ_0850_73/CH_0850_73_19\":2,\"FSC10/OFZ_0850_31/CH_0850_31_55\":2,\"FSC10/OFZ_0850_31/CH_0850_31_56\":2,\"PLC07/0320_31_20\":1,\"FSC10/OFZ_0850_32/CH_0850_32_16\":2,\"FSC10/OFZ_0850_31/CH_0850_31_50\":2,\"PLC26/0513_03_10/B104_7\":3,\"PLC02/0820_01_07/B3103_2\":1,\"PLC69/0330_07_20\":1,\"FSC10/OFZ_0850_73/CH_0850_73_02\":2,\"FSC10/OFZ_0850_73/CH_0850_73_03\":2,\"FSC10/OFZ_0850_73/CH_0850_73_01\":2,\"PLC02/0820_91_36\":1,\"FSC10/OFZ_0850_73/CH_0850_73_04\":2,\"PLC02/0820_91_33\":1,\"PLC09/0110_13_40/B204_2\":1,\"FSC10/IFZ_0850_68\":2,\"PLC26/0513_03_10\":3,\"FSC10/OFZ_0850_31/CH_0850_31_80\":2,\"PLC09/1210_03_48/B807_7\":3,\"PLC80/0632_03_06\":1,\"PLC02/0820_91_28\":1,\"PLC09/2210_08_60\":1,\"PLC80/0632_03_01\":1,\"FSC10/OFZ_0850_31/CH_0850_31_75\":2,\"FSC10/OFZ_0850_31/CH_0850_31_76\":2,\"FSC10/OFZ_0850_31/CH_0850_31_73\":2,\"FSC10/OFZ_0850_31/CH_0850_31_74\":2,\"FSC10/OFZ_0850_31/CH_0850_31_79\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0557\":3,\"PLC1000/1000_33_12/B419_3\":1,\"FSC10/OFZ_0850_32/CH_0850_32_37\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0556\":3,\"FSC10/OFZ_0850_31/CH_0850_31_77\":2,\"FSC10/OFZ_0850_31/CH_0850_31_78\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0565\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0564\":2,\"FSC10/OFZ_0850_31/CH_0850_31_71\":2,\"FSC10/OFZ_0850_31/CH_0850_31_72\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0680\":3,\"FSC10/OFZ_0850_31/CH_0850_31_70\":2,\"PLC02/0820_05_15/B3802_2\":1,\"PLC09/0120_33_10/B426_1\":1,\"PLC09/1210_09_60\":3,\"FSC10/OFZ_0850_32/CH_0850_32_47\":2,\"PLC09/0120_35_26\":1,\"PLC81\":1,\"PLC82\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_0891\":4,\"PLC09/1210_03_30/B805_5\":3,\"PLC09/0110_13_40/B205_1\":1,\"PLC02/0820_91_53\":1,\"PLC09/0110_13_40/B205_0\":1,\"PLC02/0820_91_52\":1,\"PLC09/0110_13_40/B205_2\":1,\"PLC02/0820_91_51\":1,\"PLC09/2210_06_02/B1018_1\":1,\"FSC10/TRZ_0850_01\":4,\"PLC80/0632_01_07\":1,\"PLC09/0110_03_40\":1,\"PLC1000/1000_33_01/B418_0\":1,\"FSC10/OFZ_0850_32/CH_0850_32_54\":2,\"PLC09/0120_35_18\":1,\"FSC10/TRZ_0850_01/CAS_0850_01_0780\":2,\"PLC09/0110_03_40/B105_2\":1,\"PLC09/0110_03_40/B105_0\":1,\"PLC01/0820_01_79/B6403_6\":1,\"PLC09/0110_03_40/B105_1\":1,\"PLC26/0513_32_01/B405_4\":3,\"FSC10/TRZ_0850_01/CAS_0850_01_0300\":2,\"FSC10/TRZ_0850_01/CAS_0850_01_0779\":2,\"PLC09/1210_03_13/B803_4\":3,\"FSC10/OFZ_0850_33/CH_0850_33_43\":2,\"PLC01/0820_01_46/B6200_2\":1,\"PLC09/0110_21_20/B302_3\":1,\"PLC09/0110_21_20/B302_2\":1,\"PLC1000\":1,\"PLC09/0120_35_10\":1,\"PLC09/1210_03_36/B806_3\":3,\"PLC09/1210_02_01\":1,\"PLC09/1210_03_42/B807_1\":3,\"PLC09/2210_06_29/B1021_4\":1,\"PLC09/0120_32_02/B422_1\":1,\"PLC09/0110_03_40/B104_2\":1,\"PLC09/1210_03_25/B805_0\":3,\"PLC02/0820_07_09_BT1/TN4A\":1,\"PLC01/0820_01_63/B6302_6\":1,\"PLC01/0820_02_20/B6603_6\":1,\"PLC09/1210_03_02/B802_1\":3,\"PLC26/S01/A999\":4,\"PLC09/0120_52_01/B526_0\":1,\"PLC01/0820_03_08/B6703_6\":1}", - "lcoal_mode": true, - "local": true, - "page_id": "value", - "product_metrics": { - "enable": true - }, - "searchId": "PLC01", - "sources": [], - "view_in_focus": "/" - }, - "propConfig": { - "custom.alarmId": { - "persistent": false - }, - "custom.colours.state2": { - "binding": { - "config": { - "expression": "if({this.custom.colours.colour_impaired},\u0027#F00077\u0027,\u0027#FF8000\u0027)" - }, - "type": "expr" - } - }, - "custom.colours.state3": { - "binding": { - "config": { - "expression": "if({this.custom.colours.colour_impaired},\u0027#FF6000\u0027,\u0027#FFFF00\u0027)" - }, - "type": "expr" - } - }, - "custom.colours.state4": { - "binding": { - "config": { - "expression": "if({this.custom.colours.colour_impaired},\u0027#FCC400\u0027,\u0027#007EFC\u0027)" - }, - "type": "expr" - } - }, - "custom.colours.state5": { - "binding": { - "config": { - "expression": "if({this.custom.colours.colour_impaired},\u0027#007DFA\u0027,\u0027#00CC00\u0027)" - }, - "type": "expr" - } - }, - "custom.command_auth.auth_timeout": { - "binding": { - "config": { - "expression": "if({this.custom.command_auth.enabled},toInt(dateDiff({this.custom.command_auth.auth_time},now(),\u0027seconds\u0027)),0)" - }, - "type": "expr" - }, - "onChange": { - "enabled": null, - "script": "\tif currentValue.value \u003e self.custom.command_auth.timeout_sp:\n\t\tself.custom.command_auth.enabled \u003d False" - } - }, - "custom.command_auth.enabled": { - "onChange": { - "enabled": null, - "script": "\tif currentValue.value:\n\t\tself.custom.command_auth.auth_time \u003d system.date.now()" - } - }, - "custom.covert": { - "access": "PRIVATE" - }, - "custom.deviceSearchId": { - "access": "PRIVATE" - }, - "custom.downloads": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{this.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/download" - }, - "transforms": [ - { - "code": "\tvalue_decoded \u003d system.util.jsonDecode(value)\n\tdownloads \u003d value_decoded.get(\"data\",[])\n\tfor i in downloads:\n\t\tsession_id \u003d i.get(\"session_id\")\n\t\turl \u003d i.get(\"url\")\n\t\tif session_id \u003d\u003d self.props.id:\n\t\t\tself.custom.download_url \u003d url\n\t\t\treturn True\n\t\telse:\n\t\t\treturn False", - "type": "script" - } - ], - "type": "tag" - } - }, - "custom.fc": { - "access": "PRIVATE" - }, - "custom.has_fc_role": { - "access": "PRIVATE", - "binding": { - "config": { - "expression": "{this.props.auth.user.roles}" - }, - "transforms": [ - { - "code": "\tuser_roles \u003d value\n\tfc_role \u003d self.custom.fc\n\trme_role \u003d fc_role.lower() + \"-rme-all\"\n\thas_role \u003d False\n\tfor roles in user_roles:\n\t\tif roles.lower() \u003d\u003d rme_role:\n\t\t\thas_role \u003d True\n\t\t\t\t\n\treturn has_role\n", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.id_to_state": { - "access": "PRIVATE", - "persistent": true - }, - "custom.show_south_dock": { - "access": "PRIVATE" - }, - "custom.state": { - "access": "PRIVATE" - }, - "custom.state_messages": { - "access": "PRIVATE" - }, - "custom.state_view": { - "access": "PRIVATE" - }, - "props.auth": { - "access": "PRIVATE", - "persistent": false - }, - "props.device.accelerometer": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.identifier": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.timezone": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.type": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.userAgent": { - "access": "SYSTEM", - "persistent": false - }, - "props.gateway": { - "access": "SYSTEM", - "persistent": false - }, - "props.geolocation.data": { - "access": "SYSTEM", - "persistent": false - }, - "props.geolocation.permissionGranted": { - "access": "SYSTEM", - "persistent": false - }, - "props.host": { - "access": "SYSTEM", - "persistent": false - }, - "props.id": { - "access": "SYSTEM", - "persistent": false - }, - "props.lastActivity": { - "access": "SYSTEM", - "persistent": false - } - }, - "props": { - "address": "127.0.0.1", - "appBar": { - "togglePosition": "hidden" - }, - "device": {}, - "geolocation": {}, - "locale": "en-US", - "timeZoneId": "Asia/Tbilisi" - } -} \ No newline at end of file diff --git a/.resources/37eb49f85f0c4b6d3eceb5fbeea677a067409ca1f8cbe641cce53b690dcec28d b/.resources/37eb49f85f0c4b6d3eceb5fbeea677a067409ca1f8cbe641cce53b690dcec28d deleted file mode 100644 index 40094b8f..00000000 Binary files a/.resources/37eb49f85f0c4b6d3eceb5fbeea677a067409ca1f8cbe641cce53b690dcec28d and /dev/null differ diff --git a/.resources/394352a89d10099f88a45facc514fb28b0ae7bb9f950293b84cd2888b06f3915 b/.resources/394352a89d10099f88a45facc514fb28b0ae7bb9f950293b84cd2888b06f3915 deleted file mode 100644 index 30ae5a43..00000000 Binary files a/.resources/394352a89d10099f88a45facc514fb28b0ae7bb9f950293b84cd2888b06f3915 and /dev/null differ diff --git a/.resources/3fce47b63941b0a6d52ed712fba78920e73bf22f59ada6a321a71975176763cc b/.resources/3fce47b63941b0a6d52ed712fba78920e73bf22f59ada6a321a71975176763cc deleted file mode 100644 index d42fec9b..00000000 Binary files a/.resources/3fce47b63941b0a6d52ed712fba78920e73bf22f59ada6a321a71975176763cc and /dev/null differ diff --git a/.resources/465a21813c133644e9e6585d25fcb1871f866762c4e2f073f52b7052e421d7bb b/.resources/465a21813c133644e9e6585d25fcb1871f866762c4e2f073f52b7052e421d7bb deleted file mode 100644 index 2ecfcb57..00000000 --- a/.resources/465a21813c133644e9e6585d25fcb1871f866762c4e2f073f52b7052e421d7bb +++ /dev/null @@ -1,332 +0,0 @@ -{ - "custom": { - "State": "#FFFFFF", - "Status": "#808080", - "state_string": "Empty/Idle", - "status_string": "Unknown Status" - }, - "params": { - "angle": 0, - "directionLeft": false, - "tagProps": [ - "System/MCM01/Conveyor/VFD/UL1_3_VFD1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.State": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/dwState" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "code": "\tif value is None:\n\t\treturn \u0027#808080\u0027 # Grey - No Data\n\t\n\t# Check bits in priority order (highest priority first)\n\t\n\t# Priority 5 - Test/Maintenance - Brown\n\tif value \u0026 128: # Bit 7: Assigned to do a tilttest\n\t\treturn \u0027#AC5F00\u0027 # Brown - Manual/Maintenance Mode\n\t\n\t# Priority 8 - Operational Status - Green\n\tif value \u0026 256: # Bit 8: Occupied\n\t\treturn \u0027#008000\u0027 # Green - Running or ON\n\t\n\t# Priority 9 - Discharge Status - Light Green\n\tif value \u0026 8: # Bit 3: Item has been discharged\n\t\treturn \u0027#CCFFCC\u0027 # Light green - Enabled, not running\n\t\n\t# Critical/Error States - Red\n\tif value \u0026 1: # Bit 0: Disabled or faulted\n\t\treturn \u0027#FF0000\u0027 # Red - E-Stop/Unit Faulted\n\tif value \u0026 2048: # Bit 11: Occupied but disabled\n\t\treturn \u0027#FF0000\u0027 # Red - E-Stop/Unit Faulted\n\t\n\t# Active Processing States - Yellow\n\tif value \u0026 2: # Bit 1: Item being scanned by Barcode/OCR\n\t\treturn \u0027#FFFF00\u0027 # Yellow - 75% Full/50% Full/25% Full\n\tif value \u0026 4: # Bit 2: Scanned, waiting for redirect\n\t\treturn \u0027#FFFF00\u0027 # Yellow - 75% Full/50% Full/25% Full\n\tif value \u0026 16384: # Bit 14: Item being scanned by volume scanner\n\t\treturn \u0027#FFFF00\u0027 # Yellow - 75% Full/50% Full/25% Full\n\tif value \u0026 32768: # Bit 15: SPS checking carrier\n\t\treturn \u0027#FFFF00\u0027 # Yellow - 75% Full/50% Full/25% Full\n\t\n\t# Multi-carrier Operations - Blue\n\tif value \u0026 16: # Bit 4: Second or third carrier in row\n\t\treturn \u0027#0000FF\u0027 # Blue - 100% Full\n\tif value \u0026 64: # Bit 6: Part of multi-carrier item\n\t\treturn \u0027#0000FF\u0027 # Blue - 100% Full\n\t\n\t# System/Communication States - Light Sky Blue\n\tif value \u0026 512: # Bit 9: Information received from CSC/host\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\tif value \u0026 1024: # Bit 10: Received from CCB\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\tif value \u0026 4096: # Bit 12: Reserved for induction takeover\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\tif value \u0026 8192: # Bit 13: Not activated for profile execution\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\t\n\t# Special Equipment States - Light Grey\n\tif value \u0026 32: # Bit 5: Used at flipper door chutes\n\t\treturn \u0027#D3D3D3\u0027 # Light grey - OFF/Inactive\n\t\n\t# Check if bits 16-31 contain distance data\n\tdistance_bits \u003d (value \u003e\u003e 16) \u0026 0xFFFF # Extract upper 16 bits\n\tif distance_bits \u003e 0:\n\t\treturn \u0027#FFA500\u0027 # Orange - JAM (item positioning)\n\t\n\t# Default state\n\tif value \u003d\u003d 0:\n\t\treturn \u0027#FFFFFF\u0027 # White - Gravity/not motorized MHE\n\telse:\n\t\treturn \u0027#808080\u0027 # Grey - Invalid/Unavailable", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.Status": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/dwStatus" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "code": "\tif value is None:\n\t\treturn \u0027#808080\u0027\n\t\n\t# Critical Priority (2) - Red\n\tif value \u0026 8: # Bit 3: Common fault\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 32: # Bit 5: Possible TCB/MCB error\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 64: # Bit 6: Not checked at last CTB/CRB\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 128: # Bit 7: Communication error\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 512: # Bit 9: Current limit exceeded\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 2048: # Bit 11: Calibration error\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 4194304: # Bit 22: Item overhanging belt fault\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 8388608: # Bit 23: Current collector fault\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 16777216: # Bit 24: Item too high\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 33554432: # Bit 25: Item too wide\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 67108864: # Bit 26: Item on activated carrier\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 134217728: # Bit 27: Deflected bellows fault\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 1073741824: # Bit 30: Item on bellows warning\n\t\treturn \u0027#FF0000\u0027\n\tif value \u0026 2147483648: # Bit 31: Item on bellows is active\n\t\treturn \u0027#FF0000\u0027\n\t\n\t# High Priority (11) - Light Grey (OFF/Inactive)\n\tif value \u0026 1: # Bit 0: Disabled\n\t\treturn \u0027#D3D3D3\u0027\n\tif value \u0026 4: # Bit 2: Blocked\n\t\treturn \u0027#D900D9\u0027 # Purple - Gridlock Prevention Mode\n\t\n\t# Medium Priority (9-10) - Status OK, Motor not running\n\tif value \u0026 256: # Bit 8: Status OK\n\t\treturn \u0027#008000\u0027 # Green - Running or ON\n\tif value \u0026 1024: # Bit 10: Motor not running\n\t\treturn \u0027#CCFFCC\u0027 # Light green - Enabled, not running\n\tif value \u0026 268435456: # Bit 28: Double maximum recirculation\n\t\treturn \u0027#87CEFA\u0027 # Light Sky Blue - Energy management\n\t\n\t# Low Priority (5) - Brown (Manual/Maintenance Mode)\n\tif value \u0026 2: # Bit 1: Needs update\n\t\treturn \u0027#AC5F00\u0027\n\tif value \u0026 16: # Bit 4: CCT communication to carrier\n\t\treturn \u0027#AC5F00\u0027\n\tif value \u0026 8192: # Bit 13: Default configuration\n\t\treturn \u0027#AC5F00\u0027\n\tif value \u0026 16384: # Bit 14: Programming mode\n\t\treturn \u0027#AC5F00\u0027\n\tif value \u0026 536870912: # Bit 29: CCT download done\n\t\treturn \u0027#AC5F00\u0027\n\t\n\t# Default - Grey\n\treturn \u0027#808080\u0027", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state_string": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/dwState" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "code": "\tif value is None:\n\t\treturn \u0027No Data\u0027\n\t\n\t# Check bits in priority order (highest priority first)\n\t\n\t# Priority 5 - Test/Maintenance\n\tif value \u0026 128: # Bit 7: Assigned to do a tilttest\n\t\treturn \u0027Tilt Test Mode\u0027\n\t\n\t# Priority 8 - Operational Status\n\tif value \u0026 256: # Bit 8: Occupied\n\t\treturn \u0027Occupied\u0027\n\t\n\t# Priority 9 - Discharge Status\n\tif value \u0026 8: # Bit 3: Item has been discharged\n\t\treturn \u0027Item Discharged\u0027\n\t\n\t# Other operational states (no specific priority)\n\tif value \u0026 1: # Bit 0: Disabled or faulted\n\t\treturn \u0027Disabled/Faulted\u0027\n\tif value \u0026 2: # Bit 1: Item being scanned by Barcode/OCR\n\t\treturn \u0027Barcode Scanning\u0027\n\tif value \u0026 4: # Bit 2: Scanned, waiting for redirect\n\t\treturn \u0027Awaiting Redirect\u0027\n\tif value \u0026 16: # Bit 4: Second or third carrier in row\n\t\treturn \u0027Multi-Carrier Row\u0027\n\tif value \u0026 32: # Bit 5: Used at flipper door chutes\n\t\treturn \u0027Flipper Door Mode\u0027\n\tif value \u0026 64: # Bit 6: Part of multi-carrier item\n\t\treturn \u0027Multi-Carrier Item\u0027\n\tif value \u0026 512: # Bit 9: Information received from CSC/host\n\t\treturn \u0027Host Data Received\u0027\n\tif value \u0026 1024: # Bit 10: Received from CCB\n\t\treturn \u0027CCB Received\u0027\n\tif value \u0026 2048: # Bit 11: Occupied but disabled\n\t\treturn \u0027Occupied/Disabled\u0027\n\tif value \u0026 4096: # Bit 12: Reserved for induction takeover\n\t\treturn \u0027Induction Reserved\u0027\n\tif value \u0026 8192: # Bit 13: Not activated for profile execution\n\t\treturn \u0027Profile Inactive\u0027\n\tif value \u0026 16384: # Bit 14: Item being scanned by volume scanner\n\t\treturn \u0027Volume Scanning\u0027\n\tif value \u0026 32768: # Bit 15: SPS checking carrier\n\t\treturn \u0027SPS Checking\u0027\n\t\n\t# Check if bits 16-31 contain distance data\n\tdistance_bits \u003d (value \u003e\u003e 16) \u0026 0xFFFF # Extract upper 16 bits\n\tif distance_bits \u003e 0:\n\t\treturn \u0027Item Distance: \u0027 + str(distance_bits)\n\t\n\t# Default state\n\tif value \u003d\u003d 0:\n\t\treturn \u0027Empty/Idle\u0027\n\telse:\n\t\treturn \u0027State: \u0027 + str(value)", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.status_string": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/dwStatus" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "code": "\tif value is None:\n\t\treturn \u0027No Data\u0027\n\t\n\t# Critical Priority (2) - Errors and Faults\n\tif value \u0026 8: # Bit 3: Common fault\n\t\treturn \u0027Common fault\u0027\n\tif value \u0026 32: # Bit 5: Possible TCB/MCB error\n\t\treturn \u0027Possible TCB/MCB error\u0027\n\tif value \u0026 64: # Bit 6: Not checked at last CTB/CRB\n\t\treturn \u0027Not checked at last CTB/CRB\u0027\n\tif value \u0026 128: # Bit 7: Communication error\n\t\treturn \u0027Communication error\u0027\n\tif value \u0026 512: # Bit 9: Current limit exceeded\n\t\treturn \u0027Current limit exceeded\u0027\n\tif value \u0026 2048: # Bit 11: Calibration error\n\t\treturn \u0027Calibration error\u0027\n\tif value \u0026 4194304: # Bit 22: Item overhanging belt fault\n\t\treturn \u0027Item overhanging belt fault\u0027\n\tif value \u0026 8388608: # Bit 23: Current collector fault\n\t\treturn \u0027Current collector fault\u0027\n\tif value \u0026 16777216: # Bit 24: Item too high\n\t\treturn \u0027Item too high\u0027\n\tif value \u0026 33554432: # Bit 25: Item too wide\n\t\treturn \u0027Item too wide\u0027\n\tif value \u0026 67108864: # Bit 26: Item on activated carrier\n\t\treturn \u0027Item on activated carrier\u0027\n\tif value \u0026 134217728: # Bit 27: Deflected bellows fault\n\t\treturn \u0027Deflected bellows fault\u0027\n\tif value \u0026 1073741824: # Bit 30: Item on bellows warning\n\t\treturn \u0027Item on bellows warning\u0027\n\tif value \u0026 2147483648: # Bit 31: Item on bellows is active\n\t\treturn \u0027Item on bellows is active\u0027\n\t\n\t# High Priority (11) - Disabled/Blocked States\n\tif value \u0026 1: # Bit 0: Disabled\n\t\treturn \u0027Disabled\u0027\n\tif value \u0026 4: # Bit 2: Blocked\n\t\treturn \u0027Blocked\u0027\n\t\n\t# Medium Priority (9-10) - Normal Operations\n\tif value \u0026 256: # Bit 8: Status OK\n\t\treturn \u0027Status OK\u0027\n\tif value \u0026 1024: # Bit 10: Motor not running\n\t\treturn \u0027Motor not running\u0027\n\tif value \u0026 268435456: # Bit 28: Double maximum recirculation\n\t\treturn \u0027Double maximum recirculation\u0027\n\t\n\t# Low Priority (5) - Maintenance/Configuration\n\tif value \u0026 2: # Bit 1: Needs update\n\t\treturn \u0027Needs update\u0027\n\tif value \u0026 16: # Bit 4: CCT communication to carrier\n\t\treturn \u0027CCT communication to carrier\u0027\n\tif value \u0026 8192: # Bit 13: Default configuration\n\t\treturn \u0027Default configuration\u0027\n\tif value \u0026 16384: # Bit 14: Programming mode\n\t\treturn \u0027Programming mode\u0027\n\tif value \u0026 536870912: # Bit 29: CCT download done\n\t\treturn \u0027CCT download done\u0027\n\t\n\t# Default - No active status\n\treturn \u0027Unknown Status\u0027", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.angle": { - "paramDirection": "input", - "persistent": true - }, - "params.directionLeft": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 20, - "width": 50 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.elements[0].fill.paint": { - "binding": { - "config": { - "path": "view.custom.Status" - }, - "type": "property" - } - } - }, - "props": { - "elements": [ - { - "d": "M 5 1 L 55 1 L 55 17 L 5 17 Z ", - "fill": {}, - "name": "carrierFrame", - "stroke": { - "paint": "#34495E", - "width": "0.5" - }, - "type": "path" - }, - { - "d": "M 7 2 L 53 2 L 53 16 L 7 16 Z ", - "fill": { - "paint": "#3498DB" - }, - "name": "carrierTray", - "type": "path" - }, - { - "cx": "12", - "cy": "9", - "fill": { - "paint": "#E74C3C" - }, - "name": "leftSensor", - "r": "1.5", - "type": "circle" - }, - { - "cx": "48", - "cy": "9", - "fill": { - "paint": "#E74C3C" - }, - "name": "rightSensor", - "r": "1.5", - "type": "circle" - }, - { - "fill": { - "paint": "#95A5A6" - }, - "height": "10", - "name": "package", - "rx": "1", - "type": "rect", - "width": "20", - "x": "20", - "y": "4" - }, - { - "cx": "10", - "cy": "3", - "fill": { - "paint": "#1ABC9C" - }, - "name": "topLeftWheel", - "r": "1", - "type": "circle" - }, - { - "cx": "10", - "cy": "15", - "fill": { - "paint": "#1ABC9C" - }, - "name": "bottomLeftWheel", - "r": "1", - "type": "circle" - }, - { - "cx": "50", - "cy": "3", - "fill": { - "paint": "#1ABC9C" - }, - "name": "topRightWheel", - "r": "1", - "type": "circle" - }, - { - "cx": "50", - "cy": "15", - "fill": { - "paint": "#1ABC9C" - }, - "name": "bottomRightWheel", - "r": "1", - "type": "circle" - } - ], - "preserveAspectRatio": "none", - "style": { - "overflow": "hidden", - "transform": "" - }, - "viewBox": "-1.5 -1.5 60 20" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": { - "classes": "Alarms-Styles/NoAlarm" - } - } - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.status_string} !\u003d \"Unknown Status\",\n \"Source Id: \" + {view.params.tagProps[0]} + \" Status: \" + {view.custom.status_string} + \" State: \" + {view.custom.state_string},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - } - }, - "props": { - "justify": "center", - "style": { - "borderColor": "#FF0000", - "borderStyle": "none", - "borderWidth": "2px", - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/47943a7f62ec25008535e5e825325afa8f0550f8f4253f11df4d80f311a5fb83 b/.resources/47943a7f62ec25008535e5e825325afa8f0550f8f4253f11df4d80f311a5fb83 deleted file mode 100644 index ba9446c9..00000000 --- a/.resources/47943a7f62ec25008535e5e825325afa8f0550f8f4253f11df4d80f311a5fb83 +++ /dev/null @@ -1,623 +0,0 @@ -{ - "custom": { - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed" - }, - "params": { - "directionLeft": false, - "forceFaultStatus": null, - "tagProps": [ - "System/MCM01/Conveyor/EXTENDO/UL1_1_EX1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ], - "type": 1 - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.directionLeft": { - "paramDirection": "input", - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - }, - "params.type": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 20, - "width": 29 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "position.rotate.angle": { - "binding": { - "config": { - "path": "view.params.directionLeft" - }, - "transforms": [ - { - "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", - "type": "expression" - } - ], - "type": "property" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.elements[2].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 50 0 L 65 0 L 80 30 L 65 60 L 50 60 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": "2" - }, - "type": "path" - }, - { - "d": "M 45 0 L 25 0 L 25 30 L 25 60 L 45 60 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": "2" - }, - "type": "path" - }, - { - "d": "M 0 0 L 20 0 L 20 30 L 20 60 L 0 60 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": "2" - }, - "type": "path" - } - ], - "style": { - "overflow": "hidden" - }, - "viewBox": "-1.5 -1.5 73 63" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-Extendo\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_running" - }, - "type": "property" - } - } - }, - "props": { - "justify": "center", - "style": { - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/48cf09c9bfc299d87dec2069a800419da11ee8a81b1cca9c1c207d2fedeff04f b/.resources/48cf09c9bfc299d87dec2069a800419da11ee8a81b1cca9c1c207d2fedeff04f deleted file mode 100644 index a84b7437..00000000 --- a/.resources/48cf09c9bfc299d87dec2069a800419da11ee8a81b1cca9c1c207d2fedeff04f +++ /dev/null @@ -1,794 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "running_state": -1, - "state": 0, - "views_data": [] - }, - "params": { - "tagProps": [ - "System/MCM04/Station/Chute_JR/FL1038_2_JR1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.running_state": { - "binding": { - "config": { - "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" - }, - "transforms": [ - { - "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", - "type": "expression" - } - ], - "type": "expr" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 3, - "output": 3 - }, - { - "input": 2, - "output": 2 - }, - { - "input": 1, - "output": 1 - }, - { - "input": 0, - "output": 0 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.views_data": { - "binding": { - "config": { - "struct": { - "equipment_id": "{view.params.tagProps[0]}" - }, - "waitOnAll": true - }, - "transforms": [ - { - "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", - "type": "script" - } - ], - "type": "expr-struct" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-JR\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "LIGHT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Pressed" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "ON" - }, - { - "input": 0, - "output": "OFF" - }, - { - "input": true, - "output": "ON" - }, - { - "input": false, - "output": "OFF" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON", - "output": "#47FF47" - }, - { - "input": "OFF", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/JR_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#B17B50\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET PRESSED\",\r\n \"#FE9240\",\r\n if(\r\n {this.props.text} \u003d \"JAM RESET\",\r\n \"#EB6700\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start_PB" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "JAM RESET", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "JAM RESET PRESSED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/sync_problem" - } - }, - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Reset Jam" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "props": { - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "tabs": [ - "Alarms", - "Info", - "Commands" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/49506bdc48ceb48c2053135bc76e4f726e1119c00ea8685ae2605eff929d25ec b/.resources/49506bdc48ceb48c2053135bc76e4f726e1119c00ea8685ae2605eff929d25ec deleted file mode 100644 index 0dad5972..00000000 --- a/.resources/49506bdc48ceb48c2053135bc76e4f726e1119c00ea8685ae2605eff929d25ec +++ /dev/null @@ -1,948 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "color": "#C2C2C2", - "running_state": -1, - "type": "UNKNOWN", - "views_data": [] - }, - "params": { - "tagProps": [ - "System/MCM06/Chute/NC/S02_203CH", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}", - "type": "{view.custom.type}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{type}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.running_state": { - "binding": { - "config": { - "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" - }, - "transforms": [ - { - "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", - "type": "expression" - } - ], - "type": "expr" - }, - "persistent": true - }, - "custom.type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 5, - "output": "Chute_JR" - }, - { - "input": 4, - "output": "GS" - }, - { - "input": 3, - "output": "PR" - }, - { - "input": 2, - "output": "Start" - }, - { - "input": 1, - "output": "JR" - }, - { - "input": 6, - "output": "Enable" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.views_data": { - "binding": { - "config": { - "struct": { - "equipment_id": "{view.params.tagProps[0]}" - }, - "waitOnAll": true - }, - "transforms": [ - { - "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", - "type": "script" - } - ], - "type": "expr-struct" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-BTN\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "BUTTON LIGHT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.color" - }, - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/JR_PB\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\n\ttag_path3 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB\"\n\tsystem.tag.writeBlocking([tag_path3],[True])\n\ttag_path4 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Enable_Chute_PB\"\n\tsystem.tag.writeBlocking([tag_path4],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "if({this.props.text} \u003d \"ENABLE\",\r\n true,\r\n indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 \r\n || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "Start", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.image.icon.path": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": "PR", - "output": "material/not_started" - }, - { - "input": "Start", - "output": "material/not_started" - }, - { - "input": "JR", - "output": "material/sync_problem" - }, - { - "input": "GS", - "output": "material/not_started" - }, - { - "input": "Chute_JR", - "output": "material/sync_problem" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.color" - }, - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": "PR", - "output": "PR ENABLE" - }, - { - "input": "Start", - "output": "START" - }, - { - "input": "JR", - "output": "JAM RESET" - }, - { - "input": "GS", - "output": "ENABLE" - }, - { - "input": "Chute_JR", - "output": "CHUTE JAM RESET" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "Start", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "image": { - "icon": {} - }, - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Reset Jam" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.tabs": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d \"PR\" or value \u003d\u003d \"Enable\":\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - } - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/4bb2cdf3b0639655a05c49f092938eb073b5e6dd8a14370c38e3625606f06921 b/.resources/4bb2cdf3b0639655a05c49f092938eb073b5e6dd8a14370c38e3625606f06921 deleted file mode 100644 index d6a2286d..00000000 --- a/.resources/4bb2cdf3b0639655a05c49f092938eb073b5e6dd8a14370c38e3625606f06921 +++ /dev/null @@ -1,191 +0,0 @@ -{ - "custom": { - "state": { - "$": [ - "ds", - 192, - 1758705750254 - ], - "$columns": [ - { - "data": [], - "name": "Location", - "type": "String" - }, - { - "data": [], - "name": "Priority", - "type": "String" - }, - { - "data": [], - "name": "Count", - "type": "Long" - } - ] - }, - "status": "" - }, - "params": { - "value": { - "tagProps": [ - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - } - }, - "propConfig": { - "custom.state": { - "binding": { - "config": { - "polling": { - "enabled": true, - "rate": "1" - }, - "queryPath": "GetActiveAlarmsByLocationAndPriority" - }, - "type": "query" - }, - "onChange": { - "enabled": null, - "script": "\tMCM \u003d self.params.value.tagProps[0]\n\tqueryData \u003d currentValue.value\n\t\n\tif not queryData:\n\t self.custom.status \u003d \"\"\n\t\n\t# Define priority order from highest to lowest\n\tpriority_order \u003d [\"Critical\", \"High\", \"Medium\", \"Low\", \"Diagnostic\"]\n\texisting_priorities \u003d set()\n\tmyPriority \u003d \"\"\n\t\n\t# Populate the set\n\tfor row in range(queryData.rowCount):\n\t mcm_val \u003d queryData.getValueAt(row, 0)\n\t severity \u003d queryData.getValueAt(row, 1).capitalize()\n\t count \u003d queryData.getValueAt(row, 2)\n\t\n\t if mcm_val \u003d\u003d MCM and count \u003e 0:\n\t existing_priorities.add(severity)\n\t\n\t# Find the highest one that exists\n\tfor priority in priority_order:\n\t if priority in existing_priorities:\n\t myPriority \u003d priority\n\t break\n\t\n\tself.custom.status \u003d myPriority" - }, - "persistent": true - }, - "custom.status": { - "persistent": true - }, - "params.value": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 50, - "width": 300 - } - }, - "root": { - "children": [ - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tnavigation.navigate_to_page.detailed_view(self, self.view.params.value.tagProps[0],self.view.params.value.tagProps[0], self.view.params.value.tagProps[3])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "path": "view.custom.status" - }, - "transforms": [ - { - "fallback": "State-Styles/Background-Fill/State5", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "State-Styles/Background-Fill/State1" - }, - { - "input": "Medium", - "output": "State-Styles/Background-Fill/State2" - }, - { - "input": "Low", - "output": "State-Styles/Background-Fill/State3" - }, - { - "input": "Diagnostic", - "output": "State-Styles/Background-Fill/State4" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "path": "view.custom.status" - }, - "transforms": [ - { - "fallback": "HEALTHY", - "inputType": "scalar", - "mappings": [ - { - "input": "Diagnostic", - "output": "DIAGNOSTIC" - }, - { - "input": "Low", - "output": "HALF WORKFLOW" - }, - { - "input": "Medium", - "output": "CONTROLLED STOP" - }, - { - "input": "High", - "output": "UNCONTROLLED STOP" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "borderColor": "#555555", - "borderStyle": "none", - "cursor": "pointer", - "marginBottom": 8, - "marginTop": 8 - }, - "textStyle": { - "fontSize": 12, - "textAlign": "center" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/4d52085fd9941b25472e1971abae9c0acb2b169319b24653ed3e825600c7d16f b/.resources/4d52085fd9941b25472e1971abae9c0acb2b169319b24653ed3e825600c7d16f deleted file mode 100644 index 33a187eb..00000000 --- a/.resources/4d52085fd9941b25472e1971abae9c0acb2b169319b24653ed3e825600c7d16f +++ /dev/null @@ -1,1199 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "running_state": -1, - "state": 0, - "views_data": [] - }, - "params": { - "tagProps": [ - "System/MCM01/PDP01_PMM1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.running_state": { - "binding": { - "config": { - "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" - }, - "transforms": [ - { - "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", - "type": "expression" - } - ], - "type": "expr" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 3, - "output": 3 - }, - { - "input": 2, - "output": 2 - }, - { - "input": 1, - "output": 1 - }, - { - "input": 0, - "output": 0 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.views_data": { - "binding": { - "config": { - "struct": { - "equipment_id": "{view.params.tagProps[0]}" - }, - "waitOnAll": true - }, - "transforms": [ - { - "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", - "type": "script" - } - ], - "type": "expr-struct" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-DS\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "COMMUNICATION FAULTED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Communication_Faulted" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "FAULTED" - }, - { - "input": 0, - "output": "NOT FAULTED" - }, - { - "input": true, - "output": "FAULTED" - }, - { - "input": false, - "output": "NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "NOT FAULTED", - "output": "#008000" - }, - { - "input": "FAULTED", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "PMM Fault" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/PMM_Fault" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "FAULTED" - }, - { - "input": false, - "output": "NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "NOT FAULTED", - "output": "#008000" - }, - { - "input": "FAULTED", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_5" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return \"PMM\" in str(value)", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "PMM KWH CONSUMED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/PMM_KWH_Consumed" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_2" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return \"PMM\" in str(value)", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "PMM TOTAL POWER" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/PMM_Total_Power" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_3" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return \"PMM\" in str(value)", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "PMM MAX TOTAL POWER" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/PMM_Max_Total_Power" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_4" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return \"PMM\" in str(value)", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "props": { - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "tabs": [ - "Alarms", - "Info" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/4e5625e2a4ee3221a1eaec30a6e7f3561ef3730b586453e1fac10e9a76ea599a b/.resources/4e5625e2a4ee3221a1eaec30a6e7f3561ef3730b586453e1fac10e9a76ea599a deleted file mode 100644 index 7233b998..00000000 --- a/.resources/4e5625e2a4ee3221a1eaec30a6e7f3561ef3730b586453e1fac10e9a76ea599a +++ /dev/null @@ -1,1113 +0,0 @@ -{ - "custom": { - "start_color": "#C2C2C2", - "start_priority": "No Active Alarms", - "start_state": "Closed", - "stop_priority": "No Active Alarms", - "stop_state": "Closed" - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM01/Station/SS_PB/UL3_1_SS1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.start_color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.start_priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.start_state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.stop_color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stop/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "custom.stop_priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.stop_state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stop/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 25, - "width": 50 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "Start", - "tooltip": { - "style": {} - } - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.start_priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "High", - "output": "Alarms-Styles/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.start_state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.start_priority} + \", State: \" + {view.custom.start_state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.start_state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.start_color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0,0 H 21 V 20 H 0 Z", - "fill": { - "paint": "#AAAAAA" - }, - "id": "outer-rect", - "name": "outer-rect", - "stroke": { - "paint": "#000000", - "width": "1.5" - }, - "type": "path" - }, - { - "d": "m 17,10.5 c 0,3.865993 -3.134007,7 -7,7 -3.8659932,0 -7,-3.134007 -7,-7 0,-3.8659932 3.1340068,-7 7,-7 3.865993,0 7,3.1340068 7,7 z", - "fill": {}, - "id": "inner-circle", - "name": "inner-circle", - "stroke": { - "paint": "#000000", - "width": "1" - }, - "type": "path" - } - ], - "viewBox": "0 0 40 20" - }, - "type": "ia.shapes.svg" - }, - { - "meta": { - "name": "Stop", - "tooltip": { - "style": {} - } - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.start_priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "High", - "output": "Alarms-Styles/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.stop_state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.stop_priority} + \", State: \" + {view.custom.stop_state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.stop_state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.stop_color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 20, 0 H 40 V 20 H 20 Z", - "fill": { - "paint": "#AAAAAA" - }, - "id": "outer-rect", - "name": "outer-rect", - "stroke": { - "paint": "#000000", - "width": "1.5" - }, - "type": "path" - }, - { - "d": "m 36.642136,10.376001 c 0,3.865993 -3.134007,7 -7,7 -3.865993,0 -7,-3.134007 -7,-7 0,-3.8659928 3.134007,-6.9999998 7,-6.9999998 3.865993,0 7,3.134007 7,6.9999998 z", - "fill": {}, - "id": "inner-circle-8", - "name": "inner-circle-8", - "stroke": { - "paint": "#000000", - "width": "1" - }, - "type": "path" - } - ], - "viewBox": "0 0 40 20" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-SS-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.start_priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "High", - "output": "Alarms-Styles/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.start_state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Start Priority: \" + {view.custom.start_priority} + \", Start State: \" + {view.custom.start_state} + \", Stop Priority: \" + {view.custom.stop_priority} + \", Stop State: \" + {view.custom.stop_state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_buttons" - }, - "type": "property" - } - } - }, - "props": { - "mode": "percent", - "style": { - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/4ec451d6a66ded836155e7653231dd5d3373a49df1c7a56a04f7505e4614da63 b/.resources/4ec451d6a66ded836155e7653231dd5d3373a49df1c7a56a04f7505e4614da63 deleted file mode 100644 index 3c6b92ea..00000000 --- a/.resources/4ec451d6a66ded836155e7653231dd5d3373a49df1c7a56a04f7505e4614da63 +++ /dev/null @@ -1,3322 +0,0 @@ -{ - "custom": { - "MCM": "", - "currentTable": "ACTIVE", - "page": "", - "view": "" - }, - "params": {}, - "propConfig": { - "custom.MCM": { - "binding": { - "config": { - "expression": "if({view.custom.view} !\u003d \"\", {view.custom.view}, {view.custom.page})" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.currentTable": { - "persistent": true - }, - "custom.page": { - "binding": { - "config": { - "path": "page.props.path" - }, - "transforms": [ - { - "code": "\ttry:\n\t\tif \"MCM\" in value:\n\t\t\tindex \u003d value.find(\"MCM\")\n\t\t\treturn value[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"", - "type": "script" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.view": { - "binding": { - "config": { - "path": "page.props.primaryView" - }, - "transforms": [ - { - "code": "\ttry:\n\t\tif \"MCM\" in value:\n\t\t\tindex \u003d value.find(\"MCM\")\n\t\t\treturn value[index:index+5] # MCM + 2 digits\n\texcept:\n\t\t\tpass\n\treturn \"\"", - "type": "script" - } - ], - "type": "property" - }, - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 250, - "width": 1920 - } - }, - "root": { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "grow": 1 - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "direction": "column", - "style": { - "backgroundColor": "#3B3B3B" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "custom": { - "priority": { - "diagnostic": true, - "high": true, - "low": true, - "medium": true - } - }, - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\tdata \u003d self.props.selection.data\n\t\n\talarms.alarm_click.handleClick(data)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "active-table" - }, - "position": { - "basis": "1080px", - "grow": 1 - }, - "propConfig": { - "custom.priorities": { - "binding": { - "config": { - "path": "this.custom.priority" - }, - "transforms": [ - { - "code": "\t# value looks like: {\"diagnostic\": True, \"high\": True, \"low\": False, ...}\n\tfrom system.util import jsonEncode, jsonDecode\n\t\n\tprio_map \u003d {\u0027diagnostic\u0027:0,\u0027low\u0027:1,\u0027medium\u0027:2,\u0027high\u0027:3,\u0027critical\u0027:4}\n\t\n\t# Coerce Perspective objects (PyDictionary/Java Map) to a plain Python dict\n\ttry:\n\t d \u003d value if isinstance(value, dict) else jsonDecode(jsonEncode(value))\n\texcept:\n\t d \u003d {}\n\t\n\t# Normalize keys and build CSV (\u0027\u0027 means \"all\")\n\tenabled \u003d [str(prio_map[k]) for k in prio_map if bool(d.get(k, False))]\n\treturn \",\".join(enabled) if enabled else \"\"", - "type": "script" - } - ], - "type": "property" - } - }, - "position.display": { - "binding": { - "config": { - "expression": "{view.custom.currentTable} \u003d \"ACTIVE\"" - }, - "type": "expr" - } - }, - "props.columns[4].filter.string.value": { - "binding": { - "config": { - "path": "view.custom.MCM" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "parameters": { - "priorityList": "{this.custom.priorities}" - }, - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetActiveAlarms" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d [col for col in ds.columnNames if col !\u003d \"EndTimestamp\"]\n\t\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "NumberID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "Number (ID)" - }, - "justify": "left", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "StartTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "Event Timestamp" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "string", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 150 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 80 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Active Alarms" - }, - "noFilterResults": { - "text": "No Active Alarms" - } - }, - "filter": { - "results": { - "enabled": true - } - }, - "pager": { - "bottom": false - } - }, - "type": "ia.display.table" - }, - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\tdata \u003d self.props.selection.data\n\t\n\talarms.alarm_click.handleClick(data)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "hitList-table" - }, - "position": { - "basis": "1080px", - "grow": 1 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "{view.custom.currentTable} \u003d \"HITLIST\"" - }, - "type": "expr" - } - }, - "props.columns[5].filter.string.value": { - "binding": { - "config": { - "path": "view.custom.MCM" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetAlarmsWithCount" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data\n", - "type": "script" - } - ], - "type": "query" - } - }, - "props.editingCell": { - "onChange": { - "enabled": null, - "script": "\tall_alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\tshelved_alarms \u003d [alarm for alarm in all_alarms if alarm.isShelved()]\n\t\n\t# Build dataset for table\n\theaders \u003d [\u0027ID\u0027, \u0027StartTimestamp\u0027, \u0027EndTimestamp\u0027, \u0027Duration\u0027, \u0027Description\u0027, \u0027Priority\u0027, \u0027Tag\u0027, \u0027MCM\u0027]\n\tdata \u003d []\n\t\n\tfor alarm in shelved_alarms:\n\t # Calculate duration (time since shelved)\n\t if alarm.activeTime:\n\t duration_ms \u003d system.date.now().getTime() - alarm.activeTime.getTime()\n\t duration_seconds \u003d duration_ms / 1000\n\t hours \u003d int(duration_seconds / 3600)\n\t minutes \u003d int((duration_seconds % 3600) / 60)\n\t seconds \u003d int(duration_seconds % 60)\n\t duration \u003d \"%02d:%02d:%02d\" % (hours, minutes, seconds)\n\t else:\n\t duration \u003d \"00:00:00\"\n\t \n\t # Extract tag name from source\n\t tag_name \u003d alarm.source.split(\u0027/\u0027)[-1] if \u0027/\u0027 in alarm.source else alarm.source\n\t \n\t row \u003d [\n\t str(alarm.id) if hasattr(alarm, \u0027id\u0027) else \u0027\u0027,\n\t alarm.activeTime if alarm.activeTime else system.date.now(),\n\t None, # End timestamp (shelved alarms don\u0027t have end time yet)\n\t duration,\n\t alarm.displayPath if alarm.displayPath else alarm.source,\n\t alarm.priority.name if alarm.priority else \u0027Unknown\u0027,\n\t tag_name,\n\t \u0027System\u0027 # Adjust based on your source format\n\t ]\n\t data.append(row)\n\t\n\t# Create dataset and update the custom property\n\tdataset \u003d system.dataset.toDataSet(headers, data)\n\tself.custom.shelvedAlarmsData \u003d dataset" - } - }, - "props.selection": { - "persistent": true - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "FirstTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "backgroundColor": "#FFFEFE", - "classes": "" - }, - "title": "First Timestamp" - }, - "justify": "left", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "value", - "dateFormat": "MM-DD-YYYY HH:mm:ss", - "editable": false, - "field": "LastTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Last Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM-DD-YYYY HH:mm:ss", - "editable": false, - "field": "Count", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 150 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Alarms" - }, - "noFilterResults": { - "text": "No Alarms" - } - }, - "filter": { - "results": { - "enabled": true - } - }, - "pager": { - "activeOption": 5, - "bottom": false - } - }, - "type": "ia.display.table" - }, - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\tdata \u003d self.props.selection.data\n\t\n\talarms.alarm_click.handleClick(data)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "historical-table" - }, - "position": { - "basis": "1080px", - "grow": 1 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "{view.custom.currentTable} \u003d \"HISTORY\"" - }, - "type": "expr" - } - }, - "props.columns[6].filter.string.value": { - "binding": { - "config": { - "path": "view.custom.MCM" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "parameters": { - "endtime": "dateArithmetic(now(1000), 1, \"days\")", - "offset": "100", - "starttime": "now(1000)" - }, - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetAlarms" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "ID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "", - "paddingLeft": 12 - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "StartTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": { - "$": [ - "ts", - 201, - 1750755617512 - ], - "$ts": 1750435156149 - } - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Start Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "EndTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": { - "$": [ - "ts", - 201, - 1750755617511 - ], - "$ts": 1750436956149 - } - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "End Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "", - "paddingLeft": 12 - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "ascending", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "contains", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Severity" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "contains", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Alarms" - }, - "noFilterResults": { - "text": "No Alarms" - } - }, - "enabled": true, - "filter": { - "results": { - "enabled": true - } - }, - "pager": { - "bottom": false - }, - "sortOrder": [ - "Description" - ] - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-first-request", - "pageScope": true, - "script": "\tdata \u003d payload[\"data\"]\n\tinitial_data \u003d payload[\"initial_data\"]\n\tself.props.data \u003d data\n\tself.custom.initial_data \u003d initial_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-historical-data", - "pageScope": true, - "script": "\thistorical_data \u003d payload[\"data\"]\n\tself.props.data \u003d historical_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "load_initial_data", - "pageScope": true, - "script": "\trequest \u003d payload[\"data\"]\n\tsystem.perspective.print(\"initial message received\")\n\tif request \u003d\u003d True:\n\t\tself.props.data \u003d self.custom.initial_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.data \u003d []\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "1920px", - "grow": 1 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tself.view.custom.currentTable \u003d \"ACTIVE\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "ACTIVE" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if({view.custom.currentTable}\u003d\"ACTIVE\", \"#C3C3C3\", \"#FFFFFF\")" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "borderStyle": "none", - "color": "#000000" - }, - "text": "ACTIVE" - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tself.view.custom.currentTable \u003d \"HITLIST\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "HIT LIST" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if({view.custom.currentTable}\u003d\"HITLIST\", \"#C3C3C3\", \"#FFFFFF\")" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "borderStyle": "none", - "color": "#000000" - }, - "text": "HIT LIST" - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tself.view.custom.currentTable \u003d \"HISTORY\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "HISTORY" - }, - "position": { - "basis": "150px" - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if({view.custom.currentTable}\u003d\"HISTORY\", \"#C3C3C3\", \"#FFFFFF\")" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "borderStyle": "none", - "color": "#000000" - }, - "text": "HISTORY" - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "852px", - "grow": 1 - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "300px", - "grow": 1 - }, - "props": { - "style": { - "gap": 2 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "200px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tif self.view.custom.currentTable \u003d\u003d \"\":\n\t\tself.view.custom.currentTable \u003d \"ACTIVE\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root" - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/575748546b46c3d57950abb39ea929f470753e688d925cda685fcb095db4e937 b/.resources/575748546b46c3d57950abb39ea929f470753e688d925cda685fcb095db4e937 deleted file mode 100644 index 34267b98..00000000 Binary files a/.resources/575748546b46c3d57950abb39ea929f470753e688d925cda685fcb095db4e937 and /dev/null differ diff --git a/.resources/588e50ac7aa69a65fa05611e4d818249f1350b7db3431b99a8b7058523ba3f26 b/.resources/588e50ac7aa69a65fa05611e4d818249f1350b7db3431b99a8b7058523ba3f26 deleted file mode 100644 index 2f0e98d4..00000000 Binary files a/.resources/588e50ac7aa69a65fa05611e4d818249f1350b7db3431b99a8b7058523ba3f26 and /dev/null differ diff --git a/.resources/594de42af48e5a63b6494255925561b72440f3a1b8f8ac33ec04b07e7b62ce0e b/.resources/594de42af48e5a63b6494255925561b72440f3a1b8f8ac33ec04b07e7b62ce0e deleted file mode 100644 index 70663984..00000000 Binary files a/.resources/594de42af48e5a63b6494255925561b72440f3a1b8f8ac33ec04b07e7b62ce0e and /dev/null differ diff --git a/.resources/609e1a5b9c670287496e6f3ef79d65da7963680a02ba12aff5bea53ae490c929 b/.resources/609e1a5b9c670287496e6f3ef79d65da7963680a02ba12aff5bea53ae490c929 deleted file mode 100644 index 57ea4d77..00000000 --- a/.resources/609e1a5b9c670287496e6f3ef79d65da7963680a02ba12aff5bea53ae490c929 +++ /dev/null @@ -1,294 +0,0 @@ -{ - "custom": { - "color": "#000000", - "priority": "No Active Alarms", - "state": "TagError" - }, - "params": { - "tagProps": [ - "Status/Chutes/Chute_0", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif data.get(\"bLamp_Enable\"):\n\t return \"#CCFFCC\" \n\treturn \"#000000\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\n\tif data.get(\"bLamp_Enable\"):\n\t return \"Low\" \n\treturn \"No Active Alarms\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/" - }, - "transforms": [ - { - "code": "\tdata \u003d dict(value) if value else {}\n\t\t\n\tif value is None or data.get(\"_quality\") \u003d\u003d \"Bad\" or data.get(\"error\"):\n\t return \"TagError\"\n\tif data.get(\"bLamp_Enable\"):\n\t return \"Enable PB Pressed\" \n\treturn \"Inactive\"", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 25, - "width": 25 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "Button" - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})" - }, - "enabled": false, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0,0 H 20 V 20 H 0 Z", - "fill": { - "paint": "#AAAAAA" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": "1.5" - }, - "type": "path" - }, - { - "d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#000000", - "width": "1" - }, - "type": "path" - } - ], - "viewBox": "0 0 20 20" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-CHPB\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"TagError\",\n \"Source Id: \" + {view.params.tagProps[1]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_buttons" - }, - "type": "property" - } - } - }, - "props": { - "mode": "percent", - "style": { - "cursor": "pointer" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/6ad59b7bab0683798f68dccf0a5e0bedfe3a9cebe2e703ba155d2a978d0b97b7 b/.resources/6ad59b7bab0683798f68dccf0a5e0bedfe3a9cebe2e703ba155d2a978d0b97b7 deleted file mode 100644 index 65100aed..00000000 --- a/.resources/6ad59b7bab0683798f68dccf0a5e0bedfe3a9cebe2e703ba155d2a978d0b97b7 +++ /dev/null @@ -1,3441 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "state": 0 - }, - "params": { - "tagProps": [ - "System/MCM01/MCM01", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 3, - "output": 3 - }, - { - "input": 2, - "output": 2 - }, - { - "input": 1, - "output": 1 - }, - { - "input": 0, - "output": 0 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-MCM\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "MOTOR FAULT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Motor Fault" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Motor_Fault" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "MOTOR FAULTED" - }, - { - "input": false, - "output": "MOTOR NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "MOTOR FAULTED", - "output": "#FF0000" - }, - { - "input": "MOTOR NOT FAULTED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Motor Fault" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "JAM FAULT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Jam Fault" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Jam_Fault" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "JAM FAULTED" - }, - { - "input": false, - "output": "JAM NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "JAM FAULTED", - "output": "#FFC000" - }, - { - "input": "JAM NOT FAULTED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Jam Fault" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "FIRE RELAY DE ENERGIZED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Fire Relay De Energized" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Fire_Relay_De_Energized" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "DE ENERGIZED" - }, - { - "input": false, - "output": "NOT DE ENERGIZED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "DE ENERGIZED", - "output": "#FF0000" - }, - { - "input": "NOT DE ENERGIZED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Fire Relay De Energized" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "ESTOPPED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Estopped" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/EStopped" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "ESTOPPED" - }, - { - "input": false, - "output": "NOT ESTOPPED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ESTOPPED", - "output": "#FF0000" - }, - { - "input": "NOT ESTOPPED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Estopped" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "ESTOPPED LOCALLY" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Estopped Locally" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/EStopped_Locally" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "ESTOPPED" - }, - { - "input": false, - "output": "NOT ESTOPPED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ESTOPPED", - "output": "#FF0000" - }, - { - "input": "NOT ESTOPPED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Estopped Locally" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "STOPPED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Stopped" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Stopped" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "STOPPED" - }, - { - "input": false, - "output": "NOT STOPPED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "STOPPED", - "output": "#FF0000" - }, - { - "input": "NOT STOPPED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Stopped" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAT SWITCH FAULT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "NAT Switch Fault" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/NAT_Switch_Fault" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "SWITCH FAULTED" - }, - { - "input": false, - "output": "SWITCH NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "SWITCH FAULTED", - "output": "#FF0000" - }, - { - "input": "SWITCH NOT FAULTED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "NAT Switch Fault" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "ON UPS BATTERY" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "On UPS Battery" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/On_UPS_Battery" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "ON UPS BATTERY" - }, - { - "input": false, - "output": "NOT ON UPS BATTERY" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON UPS BATTERY", - "output": "#FF0000" - }, - { - "input": "NOT ON UPS BATTERY", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "On UPS Battery" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "UPS BATTERY FAULT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "UPS Battery Fault" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/UPS_Battery_Fault" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "BATTERY FAULTED" - }, - { - "input": false, - "output": "BATTERY NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "BATTERY FAULTED", - "output": "#FF0000" - }, - { - "input": "BATTERY NOT FAULTED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "UPS Battery Fault" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "UPS BATTERY LOW" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "UPS Battery Low" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/UPS_Battery_Low" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "BATTERY LOW" - }, - { - "input": false, - "output": "BATTERY NOT LOW" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "BATTERY LOW", - "output": "#FF0000" - }, - { - "input": "BATTERY NOT LOW", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "UPS Battery Low" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "UPS BATTERY ON" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "UPS Battery On" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/UPS_Battery_On" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "ON" - }, - { - "input": false, - "output": "OFF" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON", - "output": "#FF0000" - }, - { - "input": "OFF", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "UPS Battery On" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "UPS FAULT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "UPS Fault" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/UPS_Fault" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "UPS FAULTED" - }, - { - "input": false, - "output": "UPS NOT FAULTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "UPS FAULTED", - "output": "#FF0000" - }, - { - "input": "UPS NOT FAULTED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "UPS Fault" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#006400\")", - "type": "expression" - }, - { - "fallback": "#006400", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/not_started" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "START" - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Start" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Stop_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"STOP PRESSED\",\r\n \"#FF0000\",\r\n if(\r\n {this.props.text} \u003d \"STOP\",\r\n \"#CA0D0D\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stop_PB" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "STOP", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "STOPPED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/stop_circle" - } - }, - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Stop" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Motor_Fault_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Motor_Fault_Reset_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#FFF700\")", - "type": "expression" - }, - { - "fallback": "#FFF700", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/refresh" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "MOTOR FAULT RESET", - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Motor Fault Reset" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Power_Branch_Fault_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Power_Branch_Fault_Reset_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#FFF700\")", - "type": "expression" - }, - { - "fallback": "#FFF700", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/power" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "POWER BRANCH FAULT", - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Power Branch Fault Reset" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Low_Air_Pressure_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Low_Air_Pressure_Reset_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#00008B\")", - "type": "expression" - }, - { - "fallback": "#00008B", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/waves" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "LOW AIR PRESSURE RESET" - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Low Air Pressure Reset" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Jam_Restart_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Jam_Restart_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#C2C2C2\")", - "type": "expression" - }, - { - "fallback": "#C2C2C2", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/sync_problem" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "JAM RESTART", - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Jam Restart" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Setup_Motor_Speeds\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Setup_Motor_Speeds" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#A1A1A1\",\r\n if(\r\n {value} \u003d 1,\r\n \"#AAAAAA\",\r\n \"#FFFFFF\"\r\n )\r\n)\r\n", - "type": "expression" - } - ], - "type": "tag" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/speed" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "text": "SETUP MOTOR SPEEDS", - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Setup Motor Speeds" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "props": { - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "tabs": [ - "Alarms", - "Info", - "Commands" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/6eec253ca7c0af7d9395b99dd37133de0895e1957a7c5369c76c8492aa393831 b/.resources/6eec253ca7c0af7d9395b99dd37133de0895e1957a7c5369c76c8492aa393831 deleted file mode 100644 index 45fef6d2..00000000 --- a/.resources/6eec253ca7c0af7d9395b99dd37133de0895e1957a7c5369c76c8492aa393831 +++ /dev/null @@ -1,1308 +0,0 @@ -{ - "custom": {}, - "params": { - "value": { - "tagProps": [ - "MCM01", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - } - }, - "propConfig": { - "params.value": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 50, - "width": 396 - } - }, - "root": { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Start_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Start", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Start \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#FFFFFF\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Start_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#006400\")", - "type": "expression" - }, - { - "fallback": "#006400", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/not_started" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "color": "#000000", - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Stop_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Stop", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Stop \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#FFFFFF\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.value.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stop_PB" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#CA0D0D", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/stop_circle" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Motor_Fault_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "MotorFaultReset", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Motor Fault Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Motor_Fault_Reset_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#FFF700\")", - "type": "expression" - }, - { - "fallback": "#FFF700", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/refresh" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Power_Branch_Fault_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "PowerBranchFaultReset", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Power Branch Fault Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Power_Branch_Fault_Reset_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#FFF700\")", - "type": "expression" - }, - { - "fallback": "#FFF700", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/power" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Low_Air_Pressure_Reset_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "LowAirPressureReset", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Low Air Pressure Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#FFFFFF\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Low_Air_Pressure_Reset_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#00008B\")", - "type": "expression" - }, - { - "fallback": "#00008B", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/waves" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Jam_Restart_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "JAM_Reset", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Jam Reset \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Jam_Restart_PB_Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"#C2C2C2\")", - "type": "expression" - }, - { - "fallback": "#C2C2C2", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/sync_problem" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.value.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+\"System/\"+tag_name +\"/\" + tag_name+\"/Setup_Motor_Speeds\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "SetupMotorSpeeds", - "tooltip": { - "enabled": true, - "location": "top-left" - } - }, - "position": { - "basis": "80px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027Setup Motor Speeds \u0027 + {view.params.value.tagProps[0]},\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.image.icon.color": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027#000000\u0027,\u0027#979797\u0027)" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.value.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Setup_Motor_Speeds" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#D4D4D4", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "expression": "if({this.props.enabled},\u0027solid\u0027,\u0027none\u0027)" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "height": 32, - "icon": { - "path": "material/speed" - }, - "position": "top", - "width": 32 - }, - "style": { - "borderColor": "#4A4A4A", - "borderWidth": 2, - "classes": "\n", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - }, - "text": "", - "textStyle": { - "fontSize": 12, - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "root" - }, - "propConfig": { - "custom.has_role": { - "binding": { - "config": { - "expression": "{session.custom.fc}" - }, - "transforms": [ - { - "code": "\trme_role \u003d value +\"-rme-c2c-all\"\n\troles \u003d (self.session.props.auth.user.roles)\n\tif (rme_role.lower() in roles \n\tor rme_role.upper() in roles \n\tor \"eurme-ignition-admins\" in roles):\n\t\treturn True\n\telse:\n\t\treturn False", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.status": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 4, - "output": 1 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "justify": "center" - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/700d62df83feae810c5cb5d8c9157d3ba6a2fc9d8e7a7831d503107ebbe32023 b/.resources/700d62df83feae810c5cb5d8c9157d3ba6a2fc9d8e7a7831d503107ebbe32023 deleted file mode 100644 index edaabf38..00000000 --- a/.resources/700d62df83feae810c5cb5d8c9157d3ba6a2fc9d8e7a7831d503107ebbe32023 +++ /dev/null @@ -1,598 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed" - }, - "params": { - "forceFaultStatus": null, - "forceRunningStatus": null, - "has_state": false, - "tagProps": [ - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.forceRunningStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.has_state": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 47, - "width": 68 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "ControlCabinet" - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "props.elements[0].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0 40 L 0 0 L 61 40 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": 4 - }, - "transform": "rotate(-180,30.5,20)", - "type": "path" - }, - { - "d": "M 0 40 L 0 0 L 61 40 Z", - "fill": { - "paint": "#4C4C4C" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 4 - }, - "type": "path" - } - ], - "preserveAspectRatio": "none", - "viewBox": "-0.5 -0.5 62 41" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_gateways" - }, - "type": "property" - } - } - }, - "props": { - "aspectRatio": "68:47", - "mode": "percent", - "style": { - "classes": "Disconnects/Device-Connected", - "cursor": "pointer", - "overflow": "hidden", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/7192244cdca7db990257f49248a04725de557c55614768f155f8539b815ff0bd b/.resources/7192244cdca7db990257f49248a04725de557c55614768f155f8539b815ff0bd deleted file mode 100644 index 0c90f172..00000000 --- a/.resources/7192244cdca7db990257f49248a04725de557c55614768f155f8539b815ff0bd +++ /dev/null @@ -1,625 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "color": "#FF0000", - "priority": "High", - "state": "Communication Faulted" - }, - "params": { - "tagProps": [ - "System/MCM03/PDP3_PMM", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 19, - "width": 28 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "PMM_Symbol" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.elements[5].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 10 10 L 50 10 L 50 30 L 10 30 Z", - "fill": { - "paint": "#CCCCCC" - }, - "name": "module_body", - "stroke": { - "paint": "#000000", - "width": "2" - }, - "type": "path" - }, - { - "d": "M 0 20 L 10 20", - "fill": {}, - "name": "power_input", - "stroke": { - "paint": "#000000", - "width": "2" - }, - "type": "path" - }, - { - "d": "M 50 15 L 60 15", - "fill": {}, - "name": "output_1", - "stroke": { - "paint": "#000000", - "width": "2" - }, - "type": "path" - }, - { - "d": "M 50 20 L 60 20", - "fill": {}, - "name": "output_2", - "stroke": { - "paint": "#000000", - "width": "2" - }, - "type": "path" - }, - { - "d": "M 50 25 L 60 25", - "fill": {}, - "name": "output_3", - "stroke": { - "paint": "#000000", - "width": "2" - }, - "type": "path" - }, - { - "cx": "30", - "cy": "20", - "fill": {}, - "name": "status_led", - "r": 6, - "stroke": { - "paint": "#000000", - "width": "1" - }, - "type": "circle" - } - ], - "style": { - "overflow": "hidden" - }, - "viewBox": "0 0 60 40" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-DS\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_running" - }, - "type": "property" - } - } - }, - "props": { - "justify": "center", - "style": { - "borderColor": "#FF0000", - "borderStyle": "none", - "borderWidth": "2px", - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/72f74232e5a7185032e536cb4cdc830627a3988dda57c37c8f24c03f93e0e99d b/.resources/72f74232e5a7185032e536cb4cdc830627a3988dda57c37c8f24c03f93e0e99d deleted file mode 100644 index 047cc3fa..00000000 --- a/.resources/72f74232e5a7185032e536cb4cdc830627a3988dda57c37c8f24c03f93e0e99d +++ /dev/null @@ -1,597 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "color": "#FF0000", - "priority": "High", - "state": "Motor Faulted" - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM01/MCM01", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 65, - "width": 100 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "Control cabinet" - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "props.elements[0].elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#808080\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "elements": [ - { - "elements": [ - { - "name": "polygon", - "points": "2.04 0.5 124.5 0.5 124.5 64.18 2.04 0.5", - "type": "polygon" - }, - { - "d": "M124,1V63.35L4.09,1H124m1-1H0L125,65V0Z", - "name": "path", - "type": "path" - } - ], - "fill": { - "paint": "#000000" - }, - "name": "group", - "type": "group" - }, - { - "elements": [ - { - "name": "polygon", - "points": "0.5 64.5 0.5 0.82 122.95 64.5 0.5 64.5", - "type": "polygon" - }, - { - "d": "M1,1.65,120.91,64H1V1.65M0,0V65H125L0,0Z", - "name": "path", - "type": "path" - } - ], - "fill": {}, - "name": "group", - "type": "group" - } - ], - "name": "group", - "type": "group" - } - ], - "preserveAspectRatio": "none", - "viewBox": "0 0 125 65" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-MCM\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_gateways" - }, - "type": "property" - } - } - }, - "props": { - "mode": "percent", - "style": { - "cursor": "pointer", - "overflow": "hidden", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/73da999f49013aba159135a2e4a19a43b1b37a83abc1d21319a4432031d1a487 b/.resources/73da999f49013aba159135a2e4a19a43b1b37a83abc1d21319a4432031d1a487 deleted file mode 100644 index 7add4e80..00000000 --- a/.resources/73da999f49013aba159135a2e4a19a43b1b37a83abc1d21319a4432031d1a487 +++ /dev/null @@ -1,737 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "covert_mode": true, - "disconnected": false, - "display_icon": true, - "error": false, - "isMatch": 0, - "plc": "value", - "priority": 0, - "priority_string": "No active alarms", - "running_status": 4, - "searchId": "PLC01", - "state": 5, - "state_string": "Unknown", - "tag_path_to_lookup": "[\"value\"]" - }, - "params": { - "directionLeft": false, - "forceFaultStatus": null, - "forceRunningStatus": null, - "tagProps": [ - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.alarm_message": { - "persistent": true - }, - "custom.covert_mode": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "case(\t{value},\r\n\t\t0, {session.custom.alarm_filter.show_running},\r\n\t\t1, True,\r\n\t\t2, True,\r\n\t\t3, {session.custom.alarm_filter.show_low_alarm},\r\n\t\t4, {session.custom.alarm_filter.show_diagnostic},\r\n\t\t5, {session.custom.alarm_filter.show_running},\r\n\t\tFalse)", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.disconnected": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}", - "plc": "{view.custom.plc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{plc}/DCN" - }, - "transforms": [ - { - "expression": "if(isNull({value}), False, {value})", - "type": "expression" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.display_icon": { - "binding": { - "config": { - "expression": "{this.custom.covert_mode}//||{this.custom.isMatch}\u003e0" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.error": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "0 \u003c {value} \u0026\u0026 {value} \u003c 5", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.isMatch": { - "binding": { - "config": { - "expression": "if({view.params.tagProps[0]}\u003d\"value\",0,\nif({this.custom.searchId}\u003d{view.params.tagProps[0]},100,0))" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.plc": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "expression": "split({value}, \"/\")[0]", - "type": "expression" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "fallback": 0, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": 4 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 4, - "output": 1 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - }, - "persistent": true - }, - "custom.priority_string": { - "binding": { - "config": { - "expression": "case({view.custom.state},\r\n1, \"High\",\r\n2, \"Medium\",\r\n3, \"Low\",\r\n4, \"Diagnostic\",\r\n5, \"No active alarms\",\r\n\"Unknown\")" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.running_status": { - "binding": { - "config": { - "expression": "coalesce(try(jsonGet(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),\"state\"),null),{view.params.forceRunningStatus},4)" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.searchId": { - "binding": { - "config": { - "path": "session.custom.searchId" - }, - "type": "property" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/ALARMST" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 4, - "output": 1 - }, - { - "input": 3, - "output": 2 - }, - { - "input": 2, - "output": 3 - }, - { - "input": 1, - "output": 4 - }, - { - "input": 0, - "output": 5 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state_string": { - "binding": { - "config": { - "expression": "case({view.custom.running_status},\r\n1, \"Faulted\",\r\n2, \"Stopped\",\r\n3, \"Running\",\r\n\"Unknown\")" - }, - "type": "expr" - }, - "persistent": true - }, - "custom.tag_path_to_lookup": { - "binding": { - "config": { - "expression": "\"[\\\"\" + {view.params.tagProps[0]} + \"\\\"]\"" - }, - "type": "expr" - }, - "persistent": true - }, - "params.directionLeft": { - "paramDirection": "input", - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.forceRunningStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 25, - "width": 40 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "Camera" - }, - "position": { - "height": 1, - "width": 1, - "x": 0.0015, - "y": 0.0004 - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "expression": "!{view.params.directionLeft}" - }, - "type": "expr" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", - "type": "expression" - }, - { - "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", - "type": "expression" - } - ], - "type": "property" - } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0,0 H 39 V 24 H 0 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "M 34,17 26,12 34,7 Z", - "fill": { - "paint": "#000000" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "M 9.7399998,7 H 25 V 17 H 9.7399998 Z", - "fill": { - "paint": "#000000" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 5,7 h 3 v 5 H 5 Z", - "fill": { - "paint": "#000000" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - } - ], - "style": {}, - "viewBox": "-0.5 -0.5 40 25" - }, - "type": "ia.shapes.svg" - }, - { - "meta": { - "name": "Camera_Left" - }, - "position": { - "height": 1, - "width": 1, - "x": 0.0015, - "y": 0.0004 - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "expression": "{view.params.directionLeft}" - }, - "type": "expr" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", - "type": "expression" - }, - { - "expression": "if({view.custom.display_icon}\u0026\u0026 {view.custom.isMatch}\u003d0,{value},{value}+\u002700\u0027)", - "type": "expression" - } - ], - "type": "property" - } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True \u0026\u0026 {view.custom.isMatch} \u003e 0,\r\n{view.custom.state} + 100 + {view.custom.isMatch},\r\n{view.custom.state} + {view.custom.isMatch})" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0,0 H 39 V 24 H 0 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 31,7 h 3 v 5 h -3 z", - "fill": { - "paint": "#000000" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "M 13.74,7 H 29 V 17 H 13.74 Z", - "fill": { - "paint": "#000000" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 5.556602,17 8,-5 -8,-5 z", - "fill": { - "paint": "#000000" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - } - ], - "style": {}, - "viewBox": "-0.5 -0.5 40 25" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.backgroundColor": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "case({value},\r\n0,{session.custom.colours.state0},\r\n1,{session.custom.colours.state1},\r\n2,{session.custom.colours.state2},\r\n3,{session.custom.colours.state3},\r\n4,{session.custom.colours.state4},\r\n5,{session.custom.colours.state5},\r\n6,{session.custom.colours.state6},\r\n{session.custom.colours.fallback}\r\n)", - "type": "expression" - } - ], - "type": "property" - } - }, - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Low" - }, - { - "input": 3, - "output": "Alarms-Styles/Medium" - }, - { - "input": 4, - "output": "Alarms-Styles/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.style.color": { - "binding": { - "config": { - "path": "view.custom.state" - }, - "transforms": [ - { - "expression": "if({session.custom.colours.colour_impaired},\r\n\t\u0027#000000\u0027,\r\n\tcase(\t{value},\r\n\t\t\t1,\u0027#FFFFFF\u0027,\r\n\t\t\t2,\u0027#000000\u0027,\r\n\t\t\t3,\u0027#000000\u0027,\r\n\t\t\t4,\u0027#FFFFFF\u0027,\r\n\t\t\t5,\u0027#FFFFFF\u0027,\r\n\t\t\t\u0027#000000\u0027)\r\n\t)", - "type": "expression" - } - ], - "type": "property" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({view.custom.disconnected} \u003d False,\n\tif(isNull({view.custom.alarm_message}),\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string},\n\t\"Source Id: \" + {view.params.tagProps[0]} +\n\t\", Alarm: \" + {view.custom.alarm_message} +\n\t\", Priority: \" + {view.custom.priority_string} +\n\t\", State: \" + {view.custom.state_string}),\n\"Source Id: \" +{view.params.tagProps[0]} + \", Priority: Unknown, State: Unknown\")" - }, - "type": "expr" - } - }, - "props.style.classes": { - "binding": { - "config": { - "path": "view.custom.disconnected" - }, - "transforms": [ - { - "fallback": "Disconnects/Device-Connected", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "Disconnects/Device-Disconnected" - }, - { - "input": false, - "output": "Disconnects/Device-Connected" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "aspectRatio": "40:25", - "mode": "percent", - "style": { - "cursor": "pointer", - "overflow": "hidden", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/74e67bf28c6765d417b0e69d0c5bb3b960431cfc37118faf08c689b8f3b70b67 b/.resources/74e67bf28c6765d417b0e69d0c5bb3b960431cfc37118faf08c689b8f3b70b67 deleted file mode 100644 index 3c42c316..00000000 --- a/.resources/74e67bf28c6765d417b0e69d0c5bb3b960431cfc37118faf08c689b8f3b70b67 +++ /dev/null @@ -1,2019 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "running_state": -1, - "state": 0, - "type": 0, - "views_data": [] - }, - "params": { - "tagProps": [ - "System/MCM01/Conveyor/EXTENDO/UL1_1_EX1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.running_state": { - "binding": { - "config": { - "expression": "try(jsonGet({session.custom.state_messages},{this.custom.tag_path_to_lookup}),-1)\t\r\n" - }, - "transforms": [ - { - "expression": "if({value} !\u003d -1, try(jsonGet({value},\"state\"),4),{value})", - "type": "expression" - } - ], - "type": "expr" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 3, - "output": 3 - }, - { - "input": 2, - "output": 2 - }, - { - "input": 1, - "output": 1 - }, - { - "input": 0, - "output": 0 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "if(isNull({value}), 0, {value})", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": 1 - }, - { - "input": 0, - "output": 0 - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.views_data": { - "binding": { - "config": { - "struct": { - "equipment_id": "{view.params.tagProps[0]}" - }, - "waitOnAll": true - }, - "transforms": [ - { - "code": "\tproject_info \u003d system.perspective.getProjectInfo()\n\t#self.custom.views_data \u003d project_info\n\tviews \u003d project_info.get(\"views\")\n\t#equipment_id \u003d self.view.params.tagProps[0]\n\tviews_data \u003d [i for i in views if i[\"path\"].startswith(\"Custom-Views/\"+ value.equipment_id)]\n\t#self.custom.views_data \u003d views_data\n\t\n\treturn views_data", - "type": "script" - } - ], - "type": "expr-struct" - }, - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-Extendo\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "BELT RUNNING" - }, - { - "input": 0, - "output": "AOPEN ACTIVE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "paddingLeft": 20 - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Aopen Active" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\tunit \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"Belt_Running\"\n\telse:\n\t child \u003d \"Aopen_Active\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"Running\" if result else \"Not Running\"\n\t else:\n\t \treturn \"Active\" if result else \"Not Active\"\n\t ", - "type": "script" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "enabled": false, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ACTIVE", - "output": "#47FF47" - }, - { - "input": "NOT ACTIVE", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Aopen Active" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},false)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 0, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "PLC READY TO RUN" - }, - { - "input": 0, - "output": "FULLY EXTENDED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "paddingLeft": 20 - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Fully Extended" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"PLC_Ready_To_Run\"\n\telse:\n\t child \u003d \"Fully_Extended\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"Ready\" if result else \"Not Ready\"\n\t else:\n\t \treturn \"Extended\" if result else \"Not Extended\"\n\t ", - "type": "script" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "enabled": false, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "EXTENDED", - "output": "#47FF47" - }, - { - "input": "NOT EXTENDED", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Fully Extended" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},false)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 0, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "OK TO RUN" - }, - { - "input": 0, - "output": "FULLY RETRACTED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "paddingLeft": 20 - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Fully Retracted" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"OK_To_Run\"\n\telse:\n\t child \u003d \"Fully_Retracted\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"OK\" if result else \"Not OK\"\n\t else:\n\t \treturn \"Retracted\" if result else \"Not Retracted\"\n\t ", - "type": "script" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "enabled": false, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "RETRACTED", - "output": "#47FF47" - }, - { - "input": "NOT RETRACTED", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Fully Retracted" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},false)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 0, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\u0027UNKNOWN\u0027)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "READY TO RECEIVE" - }, - { - "input": 0, - "output": "LODAING MODE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "paddingLeft": 20 - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Loading Mode" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "code": "\tprovider \u003d self.session.custom.fc + \"_SCADA_TAG_PROVIDER\"\n\tbaseTag \u003d self.view.params.tagProps[0]\n\tbasePath \u003d \"[\" + provider + \"]\" + baseTag\n\tchild \u003d \"\"\n\t\n\tif value \u003d\u003d 1:\n\t child \u003d \"Ready_To_Receive\"\n\telse:\n\t child \u003d \"Loading_Mode\"\n\t\n\tfullPath \u003d basePath + \"/\" + child\n\ttagValue \u003d system.tag.readBlocking([fullPath])[0]\n\tresult \u003d tagValue.value\n\t\n\tif result is None or str(result) \u003d\u003d \"None\":\n\t return \"UNKNOWN\"\n\telse:\n\t if value \u003d\u003d 1:\n\t return \"Ready\" if result else \"Not Ready\"\n\t else:\n\t \treturn \"ON\" if result else \"OFF\"\n\t ", - "type": "script" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "enabled": false, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON", - "output": "#47FF47" - }, - { - "input": "OFF", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Loading Mode" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},false)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 0, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "UNLOADING MODE" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Unloading Mode" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Unloading_Mode" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "ON" - }, - { - "input": 0, - "output": "OFF" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON", - "output": "#47FF47" - }, - { - "input": "OFF", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Unloading Mode" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},false)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": false - }, - { - "input": 0, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "POWER SAVING MODE" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Power Saving Mode" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#D5D5D5", - "inputType": "scalar", - "mappings": [ - { - "input": "UNKNOWN", - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Unloading_Mode" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "ON" - }, - { - "input": 0, - "output": "OFF" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "ON", - "output": "#47FF47" - }, - { - "input": "OFF", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Power Saving Mode" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/EX_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},false)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": false - }, - { - "input": 0, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + tag_name + \"/PEC_Override_PB\"\n\tcurrent_value \u003d system.tag.readBlocking([tag_path])[0].value\n\tnew_value \u003d not current_value\n\tsystem.tag.writeBlocking([tag_path], [new_value])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#9661A3\",\r\n if(\r\n {this.props.text} \u003d \"PEC OVERRIDE: ON\",\r\n \"#E888FF\",\r\n if(\r\n {this.props.text} \u003d \"PEC OVERRIDE: OFF\",\r\n \"#CC00FF\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/PEC_Override_PB" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "PEC OVERRIDE: OFF", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "PEC OVERRIDE: ON" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "PEC Override" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc + \"_SCADA_TAG_PROVIDER]\" + tag_name + \"/Extendo_Faults_Reset_PB\"\n\tcurrent_value \u003d system.tag.readBlocking([tag_path])[0].value\n\tnew_value \u003d not current_value\n\tsystem.tag.writeBlocking([tag_path], [new_value])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "expression": "if(\r\n {this.props.enabled} \u003d False,\r\n \"#BB5050\",\r\n if(\r\n {this.props.text} \u003d \"EXTENDO FAULTS RESET PRESSED\",\r\n \"#FF9191\",\r\n if(\r\n {this.props.text} \u003d \"EXTENDO FAULTS RESET\",\r\n \"#FF0000\",\r\n \"#FFFFFF\"\r\n )\r\n )\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Extendo_Faults_Reset_PB" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "EXTENDO FAULTS RESET", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "EXTENDO FAULTS RESET PRESSED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Extendo Fault Reset" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.tabs": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d 0 or value \u003d\u003d 3:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\"]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "currentTabIndex": 2, - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - } - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/79769ab7cf3272d780160cf10eb1d793b1815f428d782ec5768b69fb1098154b b/.resources/79769ab7cf3272d780160cf10eb1d793b1815f428d782ec5768b69fb1098154b deleted file mode 100644 index d0faa9f1..00000000 --- a/.resources/79769ab7cf3272d780160cf10eb1d793b1815f428d782ec5768b69fb1098154b +++ /dev/null @@ -1,230 +0,0 @@ -{ - "custom": { - "alarmHighlight": "value", - "alarm_filter": { - "show_VFD": true, - "show_beacons": true, - "show_buttons": true, - "show_camera_jams": true, - "show_diagnostic": true, - "show_dpm_mcm": true, - "show_encoders": true, - "show_epc": true, - "show_fio_safety": true, - "show_gateways": true, - "show_low_alarm": true, - "show_map": true, - "show_photoeyes": true, - "show_px": true, - "show_running": true, - "show_safety": true, - "show_solenoids": true - }, - "areaHover": [], - "colours": { - "Fallback": "#00FF00", - "colour_impaired": false, - "state0": "#8C8C8C", - "state1": "#FF0000", - "state2": "#FF8000", - "state3": "#FFFF00", - "state4": "#007EFC", - "state5": "#00CC00", - "state6": "#CCCCFF" - }, - "covert": true, - "currentGraphic": "Windows/Graphics/Overview", - "demoHighlight": "", - "dexmanager": { - "config": { - "font": "bold 12px Arial", - "highlight": "#ff0" - }, - "show": { - "Beacons": false, - "ConveyorLabels": true, - "ConveyorPatterns": true, - "Conveyors": true, - "DivertPaddles": true, - "EIPs": false, - "Encoders": false, - "Estops": false, - "Gaylords": true, - "LimitSwitches": false, - "MCPs": false, - "PhotoEyes": false, - "PushButtons": false, - "Scanners": false, - "VFDs": false - } - }, - "dpm_view_path": "autStand/Custom_Views/Enternet-Windows/DPMS/DPM Devices/MCM01/PS3_1_DPM1", - "fc": "BNA8", - "heatmapSettings": { - "alarms": [], - "alarmsText": "", - "data": { - "$": [ - "ds", - 192, - 1755608623601 - ], - "$columns": [ - { - "data": [], - "name": "firsttime", - "type": "Date" - }, - { - "data": [], - "name": "lasttime", - "type": "Date" - }, - { - "data": [], - "name": "duration", - "type": "String" - }, - { - "data": [], - "name": "count", - "type": "Long" - }, - { - "data": [], - "name": "device", - "type": "String" - }, - { - "data": [], - "name": "description", - "type": "String" - } - ] - }, - "devices": [], - "devicesText": "", - "enabled": false, - "shifts": [], - "shiftsText": "", - "time": { - "end": "2020-07-30 00:00:00", - "start": "2020-07-29 00:00:00" - } - }, - "rotation": "0deg", - "show_dpm_device_view": false, - "show_dpm_view": false, - "timewidget": { - "endDate": { - "$": [ - "ts", - 192, - 1604092861010 - ], - "$ts": 1604116800000 - }, - "mode": "currentDay", - "startDate": { - "$": [ - "ts", - 192, - 1604092861010 - ], - "$ts": 1604030400000 - }, - "update": { - "$": [ - "ts", - 192, - 1604092861010 - ], - "$ts": 1604092861010 - } - } - }, - "propConfig": { - "custom.dexmanager.highlight": { - "binding": { - "config": { - "struct": { - "alarm": "{this.custom.alarmHighlight}", - "demo": "{this.custom.demoHighlight}", - "toggle": "{[default]Gateway/ToggleTag}" - }, - "waitOnAll": true - }, - "transforms": [ - { - "code": "\thighlights \u003d []\n\t# Add alarm highlight:\n\tif len(value.alarm) \u003e 0:\n\t\thighlights.append({\n\t\t\t\"color\": \"#F00\" if value.toggle else \"#FF0\",\n\t\t\t\"keys\": [value.alarm]\n\t\t})\n\t\tif \".\" in value.alarm:\n\t\t\thighlights.append({\n\t\t\t\t\"color\": \"#F00\" if value.toggle else \"#FF0\",\n\t\t\t\t\"keys\": [value.alarm.split(\".\")[0], \"conveyor\"]\n\t\t\t})\n\t# Add demo highlight:\n\tif False and len(value.demo) \u003e 0:\n\t\thighlights.append({\n\t\t\t\"color\": \"#F00\" if value.toggle else \"#FF0\",\n\t\t\t\"keys\": [\"conveyor\", value.demo]\n\t\t})\n\treturn highlights", - "type": "script" - } - ], - "type": "expr-struct" - } - }, - "custom.isMobile": { - "binding": { - "config": { - "expression": "indexOf(lower({session.props.device.userAgent}), \"mobile\")\u003e\u003d0" - }, - "type": "expr" - } - }, - "props.auth": { - "access": "PRIVATE", - "persistent": false - }, - "props.device.accelerometer": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.identifier": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.timezone": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.type": { - "access": "SYSTEM", - "persistent": false - }, - "props.device.userAgent": { - "access": "SYSTEM", - "persistent": false - }, - "props.gateway": { - "access": "SYSTEM", - "persistent": false - }, - "props.geolocation.data": { - "access": "SYSTEM", - "persistent": false - }, - "props.geolocation.permissionGranted": { - "access": "SYSTEM", - "persistent": false - }, - "props.host": { - "access": "SYSTEM", - "persistent": false - }, - "props.id": { - "access": "SYSTEM", - "persistent": false - }, - "props.lastActivity": { - "access": "SYSTEM", - "persistent": false - } - }, - "props": { - "address": "127.0.0.1", - "device": {}, - "geolocation": {}, - "locale": "en-US", - "timeZoneId": "Asia/Tbilisi" - } -} \ No newline at end of file diff --git a/.resources/7d5aa66c024182eecf59c4ef7135017349d5dcd7a330a4ff70d65ce2872e683b b/.resources/7d5aa66c024182eecf59c4ef7135017349d5dcd7a330a4ff70d65ce2872e683b deleted file mode 100644 index f5ec99ae..00000000 --- a/.resources/7d5aa66c024182eecf59c4ef7135017349d5dcd7a330a4ff70d65ce2872e683b +++ /dev/null @@ -1,1928 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "button_type": "UNKNOWN", - "type": 0 - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM06/Chute/NC/S02_203CH", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.button_type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 5, - "output": "Chute_JR" - }, - { - "input": 4, - "output": "GS" - }, - { - "input": 3, - "output": "PR" - }, - { - "input": 2, - "output": "Start" - }, - { - "input": 1, - "output": "JR" - }, - { - "input": 6, - "output": "Enable" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-SNP\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "FULL" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Full" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "FULL", - "output": "#D5D5D5" - }, - { - "input": "NOT FULL", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Full" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "FULL" - }, - { - "input": 0, - "output": "NOT FULL" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "FULL", - "output": "#0008FF" - }, - { - "input": "NOT FULL", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Full" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "JAM" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Jam" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "JAMMED", - "output": "#D5D5D5" - }, - { - "input": "NOT JAMMED", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Jam" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "JAMMED" - }, - { - "input": 0, - "output": "NOT JAMMED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "JAMMED", - "output": "#FF8C00" - }, - { - "input": "NOT JAMMED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Jam" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 2, - "output": true - }, - { - "input": 3, - "output": true - }, - { - "input": 4, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "DISABLED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Disabled" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "TRUE", - "output": "#D5D5D5" - }, - { - "input": "FALSE", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Disabled" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus}, \"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "TRUE" - }, - { - "input": 0, - "output": "FALSE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "TRUE", - "output": "#FF0000" - }, - { - "input": "FALSE", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Disabled" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 2, - "output": true - }, - { - "input": 4, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "HALF FULL" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Half Full" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "HALF FULL", - "output": "#D5D5D5" - }, - { - "input": "NOT HALF FULL", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Half_Full" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "HALF FULL" - }, - { - "input": 0, - "output": "NOT HALF FULL" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "HALF FULL", - "output": "#FFF000" - }, - { - "input": "NOT HALF FULL", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Half Full" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 2, - "output": true - }, - { - "input": 4, - "output": true - }, - { - "input": 3, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NO CONTAINER" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "No Container" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "NO CONTAINER", - "output": "#D5D5D5" - }, - { - "input": "CONTAINER PRESENT", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/No_Container" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "NO CONTAINER" - }, - { - "input": 0, - "output": "CONTAINER PRESENT" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "NO CONTAINER", - "output": "#FF4487" - }, - { - "input": "CONTAINER PRESENT", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "No Container" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "READY TO BE ENABLED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Ready To Be Enabled" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#D5D5D5" - }, - { - "input": "ENABLED", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "ENABLED", - "inputType": "scalar", - "mappings": [ - { - "input": 2, - "output": "READY" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#008000" - }, - { - "input": "ENABLED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Ready To Be Enabled" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Enable_Chute_PB\"\n\tsystem.tag.writeBlocking([tag_path],[True])\n\ttag_path2 \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/GS_PB\"\n\tsystem.tag.writeBlocking([tag_path2],[True])\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - }, - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}", - "type": "{view.custom.button_type}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{type}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.text": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 2, - "output": "ENABLE" - }, - { - "input": 1, - "output": "GAYLORD START" - }, - { - "input": 4, - "output": "ENABLE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#0B0B0B" - } - }, - "style": { - "classes": "Background-Styles/Controller" - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Enable" - }, - "position": { - "basis": "35px" - }, - "propConfig": { - "meta.visible": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": false, - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": true - }, - { - "input": 2, - "output": true - }, - { - "input": 4, - "output": true - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.tabs": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d 0 or value \u003d\u003d 3:\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "currentTabIndex": 1, - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - } - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/7f6c388f1336b03dae423dc3995381f3e14349f94fcdc81b3a2d15d7b0f4d7f4 b/.resources/7f6c388f1336b03dae423dc3995381f3e14349f94fcdc81b3a2d15d7b0f4d7f4 deleted file mode 100644 index 495d19be..00000000 Binary files a/.resources/7f6c388f1336b03dae423dc3995381f3e14349f94fcdc81b3a2d15d7b0f4d7f4 and /dev/null differ diff --git a/.resources/87e2d895b0d0716520f07a49e48ad0070b51c12c27725fe7d6a9adf7e62ee334 b/.resources/87e2d895b0d0716520f07a49e48ad0070b51c12c27725fe7d6a9adf7e62ee334 deleted file mode 100644 index 0ae774b8..00000000 Binary files a/.resources/87e2d895b0d0716520f07a49e48ad0070b51c12c27725fe7d6a9adf7e62ee334 and /dev/null differ diff --git a/.resources/8afdda2a780ae3efa32a14753b39546857ea23f5be79cf54da0052935e250e7d b/.resources/8afdda2a780ae3efa32a14753b39546857ea23f5be79cf54da0052935e250e7d deleted file mode 100644 index bec2327e..00000000 --- a/.resources/8afdda2a780ae3efa32a14753b39546857ea23f5be79cf54da0052935e250e7d +++ /dev/null @@ -1,653 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed" - }, - "params": { - "angle": 0, - "directionLeft": false, - "tagProps": [ - "System/MCM01/Conveyor/VFD/UL1_3_VFD1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - }, - { - "input": 49, - "output": "Tipper Faulted" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.angle": { - "paramDirection": "input", - "persistent": true - }, - "params.directionLeft": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 20, - "width": 29 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.style.transform": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"\")", - "type": "expression" - }, - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "scaleX(-1)" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "elements": [ - { - "d": "M 5 15 L 45 15 L 60 25 L 60 55 L 20 55 L 5 45 Z M 5 15 L 15 5 L 55 5 L 60 25 M 45 15 L 55 5", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": "2" - }, - "type": "path" - } - ], - "style": { - "overflow": "hidden" - }, - "viewBox": "-1.5 -1.5 73 63" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-TPR\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_running" - }, - "type": "property" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "path": "view.custom.disconnected" - }, - "enabled": false, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "solid" - }, - { - "input": false, - "output": "none" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "justify": "center", - "style": { - "borderColor": "#FF0000", - "borderStyle": "none", - "borderWidth": "2px", - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/8bf172ff65426267039b1117472c7256403bd77d23141a4cc84dc807c038566d b/.resources/8bf172ff65426267039b1117472c7256403bd77d23141a4cc84dc807c038566d deleted file mode 100644 index 19cad120..00000000 Binary files a/.resources/8bf172ff65426267039b1117472c7256403bd77d23141a4cc84dc807c038566d and /dev/null differ diff --git a/.resources/8dd0a4b076fdc7af75dee958c28f764f9a89d58de2807e6e9c311eda1bbaf251 b/.resources/8dd0a4b076fdc7af75dee958c28f764f9a89d58de2807e6e9c311eda1bbaf251 deleted file mode 100644 index 307331c0..00000000 Binary files a/.resources/8dd0a4b076fdc7af75dee958c28f764f9a89d58de2807e6e9c311eda1bbaf251 and /dev/null differ diff --git a/.resources/932f01fbfdb982d53e4e431b865337ec5556a57aafb8bc40d29834e8c6f8e0ae b/.resources/932f01fbfdb982d53e4e431b865337ec5556a57aafb8bc40d29834e8c6f8e0ae deleted file mode 100644 index 00458fbc..00000000 Binary files a/.resources/932f01fbfdb982d53e4e431b865337ec5556a57aafb8bc40d29834e8c6f8e0ae and /dev/null differ diff --git a/.resources/93e8397024064ec7682f9308143395f74fc1d268d081d8a53528fac1ff3fbf69 b/.resources/93e8397024064ec7682f9308143395f74fc1d268d081d8a53528fac1ff3fbf69 deleted file mode 100644 index 9f81e6a0..00000000 --- a/.resources/93e8397024064ec7682f9308143395f74fc1d268d081d8a53528fac1ff3fbf69 +++ /dev/null @@ -1,4667 +0,0 @@ -{ - "custom": {}, - "params": {}, - "props": { - "defaultSize": { - "height": 1080, - "width": 1920 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "High", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027high\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_0" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/High" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/priority_high" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "High" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Label_4" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "Medium", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027medium\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_1" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "Buttons/PB_1", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/Medium" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/Medium" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/priority_high" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Medium" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_2" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "Low", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027low\u0027\n\t# Copy and toggle the filter\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_2" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "Buttons/PB_1", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/Low" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/Low" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/low_priority" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Low" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_3" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpriority \u003d \u0027diagnostic\u0027\n\n\tpriorities \u003d dict(self.parent.custom.priorities)\n\tpriorities[priority] \u003d not priorities.get(priority, False)\n\tself.parent.custom.priorities \u003d priorities\n\t\n\tself.custom.background_on \u003d \"true\" if priorities[priority] else \"false\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_3" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "props.style.classes": { - "binding": { - "config": { - "expression": "if({this.custom.background_on}\u003d\"false\",0,\r\nif({session.custom.colours.colour_impaired},2,1))" - }, - "transforms": [ - { - "fallback": "Buttons/PB_1", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "" - }, - { - "input": 1, - "output": "Alarms-Styles/Diagnostic" - }, - { - "input": 2, - "output": "Alarms-Styles/Alt-Colours/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/warning" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Diagnostic" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-filters", - "pageScope": true, - "script": "\t# implement your handler here\n\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"reset\"]\n\tif severity \u003d\u003d \"false\":\n\t\tbackground \u003d \"false\"\n\telse:\n\t\tbackground \u003d \"true\"\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - } - ], - "custom": { - "priorities": { - "diagnostic": false, - "high": false, - "low": false, - "medium": false - } - }, - "events": { - "system": { - "onStartup": { - "config": { - "script": "\tself.custom.priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t}" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "700px", - "shrink": 0 - }, - "props": { - "style": { - "padding": 0 - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "20px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "Critical", - "background_on": "false" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpayload \u003d {}\n\tfilter_on \u003d \"false\"\n\tpayload[\"reset\"] \u003d filter_on\n\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\tdefault_priorities \u003d {\n\t \"diagnostic\": False,\n\t \"low\": False,\n\t \"medium\": False,\n\t \"high\": False,\n\t \"critical\": False\n\t}\n\tself.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.filter.text \u003d \"\"\n\tself.parent.parent.getChild(\"FlexContainer\").custom.priorities \u003d default_priorities" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "color": "#000000", - "path": "material/clear" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Reset" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background\n\t", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_2" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "custom": { - "Severity": "High", - "background_on": "true", - "update_on": false - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tfrom datetime import datetime\n\ttry:\n\t # Get table data\n\t data \u003d self.parent.parent.parent.getChild(\"FlexContainer_0\").getChild(\"Table\").props.data\n\t \n\t column_order \u003d [\n\t \"ID\",\n\t \"StartTimestamp\", \n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t # CSV header\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes) \n\t \n\t \n\t \n\t\n#\t if data and len(data) \u003e 0:\n#\t for row in data:\n#\t val \u003d row.get(\"value\", {})\n#\t row_data \u003d [\n#\t str(val.get(\"NumberID\", \"\")),\n#\t str(val.get(\"EventTimestamp\", \"\")),\n#\t str(val.get(\"Duration\", \"\")),\n#\t str(val.get(\"Priority\", \"\")),\n#\t str(val.get(\"Description\", \"\")),\n#\t str(val.get(\"Tag\", \"\"))\n#\t ]\n#\t\n#\t # Escape commas for CSV safety\n#\t row_data \u003d [field.replace(\",\", \";\") for field in row_data]\n#\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n#\t else:\n#\t csv_content +\u003d \"No alarms in current view\\n\"\n#\t\n#\texcept Exception as e:\n#\t system.perspective.print(\"Error during CSV export: \" + str(e))\n#\t csv_content \u003d \"Error exporting alarm data\\n\"\n#\t\n#\t# Convert to bytes and trigger download\n#\tcsv_bytes \u003d csv_content.encode(\u0027utf-8\u0027)\n#\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)\n " - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_1" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/import_export" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Export" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "10px" - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "513px", - "shrink": 0 - }, - "props": { - "style": { - "padding": 0 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "alignContent": "flex-start", - "style": { - "overflow": "visible" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\n\tmyData \u003d self.props.selection.data\n\n\tautStand.Alarms.handleClick(myData)\n\t\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Table" - }, - "position": { - "basis": "972.9px" - }, - "propConfig": { - "custom.priorities": { - "binding": { - "config": { - "path": ".../FlexContainer/FlexContainer.custom.priorities" - }, - "transforms": [ - { - "code": "\t\n\tpriority_to_number \u003d {\n\t \"critical\": 4,\n\t \"high\": 3,\n\t \"medium\": 2,\n\t \"low\": 1,\n\t \"diagnostic\": 0\n\t}\n\t\n\t\n\t# Collect enabled priorities\n\tenabled \u003d [str(priority_to_number[k]) for k, v in value.items() if v]\n\t\n\tresult \u003d \",\".join(enabled)\n\t\n\tif not result:\n\t\treturn \"\"\n\t\n\treturn result\n\t\n", - "type": "script" - } - ], - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "parameters": { - "priorityList": "{this.custom.priorities}" - }, - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "autStand/Alarms/GetActiveAlarms" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d [col for col in ds.columnNames if col !\u003d \"EndTimestamp\"]\n\t\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "NumberID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "Number (ID)" - }, - "justify": "left", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "StartTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "Event Timestamp" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "string", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "ascending", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 70 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 150 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 80 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Active Alarms" - }, - "noFilterResults": { - "text": "No Active Alarms" - } - }, - "filter": { - "enabled": true, - "results": { - "enabled": true - } - } - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "480px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column", - "justify": "space-evenly" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tfrom datetime import datetime\n\t\n\ttry:\n\t data \u003d self.parent.parent.getChild(\"FlexContainer_0\").getChild(\"AlarmsTable\").props.data\n\t\n\t column_order \u003d [\n\t \"FirstTimestamp\",\n\t \"LastTimestamp\", \n\t \"Count\",\n\t \"Duration\",\n\t \"Priority\",\n\t \"Location\",\n\t \"Description\",\n\t \"Tag\"\n\t ]\n\t\n\t csv_content \u003d \",\".join(column_order) + \"\\n\"\n\t \t\n\t def unwrap(v):\n\t\t\tif hasattr(v, \u0027value\u0027):\n\t\t\t\treturn str(v.value)\n\t \t\n\t\t\treturn v\n\t \t\n\t if data and len(data) \u003e 0:\n\t for item in data:\n\t row_data \u003d []\n\t \n\t for col in column_order:\n\t # Look for the column in the current item\n\t if col in item:\n\t cell \u003d item[col]\n\t # Extract the value from the nested structure\n\t if isinstance(cell, dict) and \"value\" in cell:\n\t raw_value \u003d cell[\"value\"]\n\t else:\n\t raw_value \u003d cell\n\t else:\n\t raw_value \u003d \"\"\n\t \n\t # Process and clean the value\n\t processed_value \u003d unwrap(raw_value).replace(\",\", \";\")\n\t row_data.append(processed_value)\n\t \n\t csv_content +\u003d \",\".join(row_data) + \"\\n\"\n\t else:\n\t csv_content +\u003d \"No alarms in current view\\n\"\n\t\n\texcept Exception as e:\n\t system.perspective.print(\"Export Error: \" + str(e))\n\t csv_content \u003d \"Export failed\\n\"\n\t\n\tcsv_bytes \u003d csv_content.encode(\"utf-8\")\n\tsystem.perspective.download(\"active_alarms.csv\", csv_bytes)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button_1" - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/import_export" - } - }, - "primary": false, - "style": { - "margin": 15 - }, - "text": "Export" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "button-severity-indicator", - "pageScope": true, - "script": "\tbackground \u003d \"false\"\n\tseverity \u003d payload[\"severity\"]\n\tbutton_severity \u003d self.custom.Severity\n\tif severity \u003d\u003d button_severity:\n\t\tbackground \u003d \"true\"\n\telse:\n\t\tbackground \u003d \"false\"\n\t\n\tself.custom.background_on \u003d background", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "70px" - }, - "props": { - "alignContent": "flex-start", - "style": { - "overflow": "visible" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\t\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "AlarmsTable" - }, - "position": { - "basis": "1080px", - "grow": 1 - }, - "propConfig": { - "props.data": { - "binding": { - "config": { - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "autStand/Alarms/GetAlarmsWithCount" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data\n", - "type": "script" - } - ], - "type": "query" - } - }, - "props.editingCell": { - "onChange": { - "enabled": null, - "script": "\tall_alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\tshelved_alarms \u003d [alarm for alarm in all_alarms if alarm.isShelved()]\n\t\n\t# Build dataset for table\n\theaders \u003d [\u0027ID\u0027, \u0027StartTimestamp\u0027, \u0027EndTimestamp\u0027, \u0027Duration\u0027, \u0027Description\u0027, \u0027Priority\u0027, \u0027Tag\u0027, \u0027MCM\u0027]\n\tdata \u003d []\n\t\n\tfor alarm in shelved_alarms:\n\t # Calculate duration (time since shelved)\n\t if alarm.activeTime:\n\t duration_ms \u003d system.date.now().getTime() - alarm.activeTime.getTime()\n\t duration_seconds \u003d duration_ms / 1000\n\t hours \u003d int(duration_seconds / 3600)\n\t minutes \u003d int((duration_seconds % 3600) / 60)\n\t seconds \u003d int(duration_seconds % 60)\n\t duration \u003d \"%02d:%02d:%02d\" % (hours, minutes, seconds)\n\t else:\n\t duration \u003d \"00:00:00\"\n\t \n\t # Extract tag name from source\n\t tag_name \u003d alarm.source.split(\u0027/\u0027)[-1] if \u0027/\u0027 in alarm.source else alarm.source\n\t \n\t row \u003d [\n\t str(alarm.id) if hasattr(alarm, \u0027id\u0027) else \u0027\u0027,\n\t alarm.activeTime if alarm.activeTime else system.date.now(),\n\t None, # End timestamp (shelved alarms don\u0027t have end time yet)\n\t duration,\n\t alarm.displayPath if alarm.displayPath else alarm.source,\n\t alarm.priority.name if alarm.priority else \u0027Unknown\u0027,\n\t tag_name,\n\t \u0027System\u0027 # Adjust based on your source format\n\t ]\n\t data.append(row)\n\t\n\t# Create dataset and update the custom property\n\tdataset \u003d system.dataset.toDataSet(headers, data)\n\tself.custom.shelvedAlarmsData \u003d dataset" - } - }, - "props.selection": { - "persistent": true - } - }, - "props": { - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "FirstTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "backgroundColor": "#FFFEFE", - "classes": "" - }, - "title": "First Timestamp" - }, - "justify": "left", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "value", - "dateFormat": "MM-DD-YYYY HH:mm:ss", - "editable": false, - "field": "LastTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Last Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM-DD-YYYY HH:mm:ss", - "editable": false, - "field": "Count", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": 150 - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Alarms" - }, - "noFilterResults": { - "text": "No Alarms" - } - }, - "filter": { - "enabled": true, - "results": { - "enabled": true - } - } - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "500px", - "grow": 1 - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Hit_List" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "justify": "space-evenly" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "custom": { - "SetFilter": true - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tpayload \u003d {}\n\tif self.custom.SetFilter \u003d\u003d True:\n\t\tpayload[\"data\"] \u003d False\n\t\tself.custom.SetFilter \u003d False\n\t\t\n\t\n\telif self.custom.SetFilter \u003d\u003d False:\n\t\tpayload[\"data\"] \u003d True\n\t\tself.custom.SetFilter \u003d True\n\t\n\tsystem.perspective.sendMessage(\"show-historical-filters\", payload \u003d payload, scope \u003d \"page\")\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": { - "enabled": true, - "style": { - "background-color": "white", - "borderColor": "#000000", - "borderStyle": "solid", - "borderWidth": "1px", - "box-shadow": "5px 5px 5px grey", - "color": "#000000", - "fontFamily": "Arial", - "fontWeight": "normal" - }, - "text": "Show Filters" - } - }, - "position": { - "basis": "120px" - }, - "props": { - "image": { - "icon": { - "path": "material/filter_alt" - }, - "position": "center" - }, - "primary": false, - "style": { - "margin": 15, - "marginLeft": 20 - }, - "text": "" - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "281px" - }, - "props": { - "style": { - "color": "#FF0000", - "margin-left": "20px" - }, - "text": "ALL TIMESTAMPS ARE IN UTC" - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Show filters" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label_1" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Period:" - }, - "type": "ia.display.label" - }, - { - "custom": { - "customTime": false, - "endDate": { - "$": [ - "ts", - 192, - 1755608469647 - ], - "$ts": 1755608469646 - }, - "startDate": { - "$": [ - "ts", - 192, - 1755608469646 - ], - "$ts": 1755606669646 - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.value": { - "onChange": { - "enabled": null, - "script": "\n\tstart \u003d \"\"\n\tend \u003d \"\"\n\tnow \u003d system.date.now()\n\tpreviousDay \u003d system.date.addDays(now, -1)\n\tvalue \u003d currentValue.value \n\n\tif value \u003d\u003d \"custom\":\n\t\tself.custom.customTime \u003d True\n\t\treturn\n\telif value \u003d\u003d \"currentDay\":\n\t\tstart \u003d system.date.setTime(now, 0, 0, 0)\n\t\tend \u003d now\n\telif value \u003d\u003d \"morning\":\n\t\tstart \u003d system.date.setTime(now, 2, 30, 0)\n\t\tend \u003d system.date.setTime(now, 7, 30, 0)\n\telif value \u003d\u003d \"daylight\":\n\t\tstart \u003d system.date.setTime(now, 7, 30, 0)\n\t\tend \u003d system.date.setTime(now, 13, 0, 0)\n\telif value \u003d\u003d \"twilight\":\n\t\tstart \u003d system.date.setTime(now, 13, 0, 0)\n\t\tend \u003d now\n\telif value \u003d\u003d \"night\":\n\t\tstart \u003d system.date.setTime(previousDay, 18, 30, 0)\n\t\tend \u003d system.date.setTime(previousDay, 23, 30, 0)\n\telif value \u003d\u003d \"wrapDown\":\n\t\tstart \u003d system.date.setTime(previousDay, 23, 30, 0)\n\t\tend \u003d system.date.setTime(now, 2, 30, 0)\n\telif value \u003d\u003d \"currentShot\":\n\t\tstart \u003d system.date.setTime(now, 13, 0, 0)\n\t\tend \u003d now\n\telse:\n\t\tstart \u003d system.date.addMinutes(now, -int(value))\n\t\tend \u003d now\n\n\tself.custom.customTime \u003d False\n\tself.custom.startDate \u003d start\n\tself.custom.endDate \u003d end" - }, - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "Past 30 Min", - "value": 30 - }, - { - "label": "Past Hour", - "value": 60 - }, - { - "label": "Past 2 Hour", - "value": 120 - }, - { - "label": "Past 4 Hour", - "value": 240 - }, - { - "label": "Past 8 Hour", - "value": 480 - }, - { - "label": "Current Day", - "value": "currentDay" - }, - { - "label": "Morning", - "value": "morning" - }, - { - "label": "Daylight", - "value": "daylight" - }, - { - "label": "Twilight", - "value": "twilight" - }, - { - "label": "Night", - "value": "night" - }, - { - "label": "Wrap Down", - "value": "wrapDown" - }, - { - "label": "Current Shot", - "value": "currentShot" - }, - { - "label": "Custom", - "value": "custom" - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Start Date" - }, - "type": "ia.display.label" - }, - { - "custom": { - "max_duration_days": 10 - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tautStand.messaging.message_handler.set_time_from_filters(self)\n\t" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "DateTimeInput", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "path": "../Dropdown.custom.customTime" - }, - "type": "property" - } - }, - "props.maxDate": { - "binding": { - "config": { - "expression": "now()" - }, - "type": "expr" - } - }, - "props.minDate": { - "access": "PUBLIC", - "binding": { - "config": { - "expression": "addDays(now(),-{this.custom.max_duration_days})" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "path": "../Dropdown.custom.startDate" - }, - "type": "property" - }, - "onChange": { - "enabled": null, - "script": "\tautStand.messaging.message_handler.set_time_from_filters(self)" - } - } - }, - "props": { - "formattedValue": "Aug 19, 2025 4:31 PM", - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.date-time-input" - }, - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "89px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "End Date" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DateTimeInput_0" - }, - "position": { - "basis": "200px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "path": "../Dropdown.custom.customTime" - }, - "type": "property" - } - }, - "props.maxDate": { - "binding": { - "config": { - "expression": "now()" - }, - "enabled": false, - "type": "expr" - } - }, - "props.minDate": { - "binding": { - "config": { - "expression": "addDays(now(),-10)" - }, - "type": "expr" - } - }, - "props.value": { - "binding": { - "config": { - "path": "../Dropdown.custom.endDate" - }, - "type": "property" - }, - "onChange": { - "enabled": null, - "script": "\tautStand.messaging.message_handler.set_time_to_filters(self)" - }, - "persistent": true - } - }, - "props": { - "formattedValue": "Aug 19, 2025 5:01 PM", - "maxDate": { - "$": [ - "ts", - 192, - 1749542669794 - ], - "$ts": 1749715452000 - }, - "style": { - "margin": 15 - }, - "value": { - "$": [ - "ts", - 201, - 1755608469647 - ], - "$ts": 1755608469646 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.date-time-input" - } - ], - "meta": { - "name": "Time" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "100px" - }, - "props": { - "style": { - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Priority" - }, - "type": "ia.display.label" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tautStand.messaging.message_handler.set_priority_filters(self)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Dropdown" - }, - "position": { - "basis": "490px" - }, - "propConfig": { - "props.value": { - "persistent": false - } - }, - "props": { - "options": [ - { - "label": "Diagnostic", - "value": "diagnostic" - }, - { - "label": "Low", - "value": "low" - }, - { - "label": "Medium", - "value": "medium" - }, - { - "label": "High", - "value": "high" - }, - { - "label": "All", - "value": "" - } - ], - "style": { - "margin": 15 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tself.props.value \u003d None", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.dropdown" - } - ], - "meta": { - "name": "Priority" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "type": "ia.container.flex" - } - ], - "custom": { - "ShowFilters": true - }, - "meta": { - "name": "Filters" - }, - "position": { - "basis": "180px", - "grow": 1, - "shrink": 0 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "path": "this.custom.ShowFilters" - }, - "type": "property" - }, - "persistent": true - } - }, - "props": { - "direction": "column", - "style": { - "borderStyle": "solid", - "borderWidth": "1px", - "box-shadow": "0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)", - "marginBottom": 10, - "marginLeft": 20, - "marginRight": 20, - "marginTop": 10 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "show-historical-filters", - "pageScope": true, - "script": "\tshow \u003d payload[\"data\"]\n\tself.custom.ShowFilters \u003d show", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "custom": { - "max_duration": { - "$": [ - "ts", - 192, - 1748426336635 - ], - "$ts": 1747562336635 - }, - "priority_filters": "", - "time_from_filter": { - "$": [ - "ts", - 192, - 1759143973125 - ], - "$ts": 1755606669646 - }, - "time_to_filter": { - "$": [ - "ts", - 192, - 1759143973125 - ], - "$ts": 1755608469646 - } - }, - "events": { - "component": { - "onRowDoubleClick": { - "config": { - "script": "\t\n\tmyData \u003d self.props.selection.data\n\n\talarms.alarm_click.handleClick(myData)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Table" - }, - "position": { - "basis": "1920px", - "grow": 1 - }, - "propConfig": { - "props.columns[1].filter.date.value": { - "binding": { - "config": { - "path": "this.custom.time_from_filter" - }, - "type": "property" - } - }, - "props.columns[2].filter.date.value": { - "binding": { - "config": { - "path": "this.custom.time_to_filter" - }, - "type": "property" - } - }, - "props.columns[2].filter.number.value": { - "binding": { - "config": { - "path": "this.custom.time_to_filter" - }, - "enabled": false, - "type": "property" - } - }, - "props.columns[5].filter.string.value": { - "binding": { - "config": { - "path": "this.custom.priority_filters" - }, - "type": "property" - } - }, - "props.data": { - "binding": { - "config": { - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "autStand/Alarms/GetAlarms" - }, - "transforms": [ - { - "code": "\n\tfrom system.dataset import toPyDataSet\n\n\tds \u003d toPyDataSet(value)\n\tdata \u003d []\n\n\tcolumn_names \u003d list(ds.columnNames)\n\n\tfor row in ds:\n\t\tpriority \u003d row[\"Priority\"]\n\n\t\t# Use style class names from Perspective\n\t\tif priority \u003d\u003d \"High\":\n\t\t\tclassName \u003d \"Alarms-Styles/High\"\n\t\telif priority \u003d\u003d \"Medium\":\n\t\t\tclassName \u003d \"Alarms-Styles/Medium\"\n\t\telif priority \u003d\u003d \"Low\":\n\t\t\tclassName \u003d \"Alarms-Styles/Low\"\n\t\telif priority \u003d\u003d \"Diagnostic\":\n\t\t\tclassName \u003d \"Alarms-Styles/Diagnostic\"\n\t\telse:\n\t\t\tclassName \u003d \"Alarms-Styles/NoAlarm\"\n\n\t\t# Apply the style class to all cells in the row\n\t\trow_dict \u003d {\n\t\t\tcol: {\n\t\t\t\t\"value\": row[col],\n\t\t\t\t\"style\": { \"classes\": className }\n\t\t\t} for col in column_names\n\t\t}\n\t\tdata.append(row_dict)\n\n\treturn data", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "box-shadow": "0 4px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)", - "columns": [ - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "ID", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "", - "paddingLeft": 12 - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "StartTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "later than date time" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "Start Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "none", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY HH:mm:ss", - "editable": false, - "field": "EndTimestamp", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "earlier than date time" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "End Timestamp" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Duration", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "", - "paddingLeft": 12 - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "none", - "editable": false, - "field": "Description", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Priority", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "contains" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Location", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "equals", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Tag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": true, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "contains", - "value": "" - }, - "visible": "never" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "center", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "center", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "FullTag", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - }, - { - "align": "center", - "boolean": "checkbox", - "dateFormat": "MM/DD/YYYY", - "editable": false, - "field": "Device", - "filter": { - "boolean": { - "condition": "" - }, - "date": { - "condition": "", - "value": "" - }, - "enabled": false, - "number": { - "condition": "", - "value": "" - }, - "string": { - "condition": "", - "value": "" - }, - "visible": "on-hover" - }, - "footer": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "header": { - "align": "center", - "justify": "left", - "style": { - "classes": "" - }, - "title": "" - }, - "justify": "auto", - "nullFormat": { - "includeNullStrings": false, - "nullFormatValue": "", - "strict": false - }, - "number": "value", - "numberFormat": "0,0.##", - "progressBar": { - "bar": { - "color": "", - "style": { - "classes": "" - } - }, - "max": 100, - "min": 0, - "track": { - "color": "", - "style": { - "classes": "" - } - }, - "value": { - "enabled": true, - "format": "0,0.##", - "justify": "center", - "style": { - "classes": "" - } - } - }, - "render": "auto", - "resizable": true, - "sort": "none", - "sortable": true, - "strictWidth": false, - "style": { - "classes": "", - "display": "none" - }, - "toggleSwitch": { - "color": { - "selected": "", - "unselected": "" - } - }, - "viewParams": {}, - "viewPath": "", - "visible": true, - "width": "" - } - ], - "emptyMessage": { - "noData": { - "text": "No Alarms" - }, - "noFilterResults": { - "text": "No Alarms" - } - }, - "enabled": true, - "filter": { - "enabled": true, - "results": { - "enabled": true - } - }, - "pager": { - "bottom": false - }, - "style": { - "margin": 20 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-first-request", - "pageScope": true, - "script": "\tdata \u003d payload[\"data\"]\n\tinitial_data \u003d payload[\"initial_data\"]\n\tself.props.data \u003d data\n\tself.custom.initial_data \u003d initial_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "update-historical-data", - "pageScope": true, - "script": "\thistorical_data \u003d payload[\"data\"]\n\tself.props.data \u003d historical_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "load_initial_data", - "pageScope": true, - "script": "\trequest \u003d payload[\"data\"]\n\tsystem.perspective.print(\"initial message received\")\n\tif request \u003d\u003d True:\n\t\tself.props.data \u003d self.custom.initial_data", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\treset \u003d payload[\"data\"]\n\tif reset \u003d\u003d \"reset\":\n\t\tself.props.data \u003d []\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.display.table" - } - ], - "meta": { - "name": "Table" - }, - "position": { - "basis": "980px", - "grow": 1 - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "update-historical-data", - "pageScope": true, - "script": "#\tdata \u003d payload[\"data\"]\n#\tself.getChild(\"Table\").props.data \u003d data", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "custom": { - "download_in_progress": true, - "enable_timeout": false, - "priority_filters": "", - "time_from_filter": { - "$": [ - "ts", - 192, - 1759143973124 - ], - "$ts": 1755606669646 - }, - "time_to_filter": { - "$": [ - "ts", - 192, - 1759143973124 - ], - "$ts": 1755608469646 - }, - "type_filters": null - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\n from datetime import datetime\n def format_date(value):\n\t\tif isinstance(value, (int, long)) and value \u003e 10000000:\n\t\t\ttimestamp \u003d system.date.fromMillis(value)\n\t\t\treturn system.date.format(timestamp, \"yyyy-MM-dd HH:mm:ss\")\n\t\t\t\n\t\t# If value is not a valid timestamp, return as-is\n\t\treturn str(value)\n \n try:\n\n # Get filtered data\n table \u003d self.parent.parent.getChild(\"Table\").getChild(\"Table\")\n filtered_data \u003d table.props.filter.results.data\n\n if not filtered_data or len(filtered_data) \u003d\u003d 0:\n system.perspective.print(\"No filtered data to export.\")\n return\n\n # Get correct column order from the table\u0027s column config\n column_order \u003d [col[\"field\"] for col in table.props.columns if \"field\" in col]\n\n csv_content \u003d \",\".join(column_order) + \"\\n\"\n\n # Build rows\n for row_dict in filtered_data:\n row \u003d []\n for col in column_order:\n raw_val \u003d row_dict.get(col, \"\")\n value \u003d format_date(raw_val)\n value \u003d value.replace(\",\", \";\") # CSV safety\n row.append(value)\n csv_content +\u003d \",\".join(row) + \"\\n\"\n\n # Export CSV\n csv_bytes \u003d csv_content.encode(\"utf-8\")\n system.perspective.download(\"filtered_alarms_history.csv\", csv_bytes)\n\n system.perspective.print(\"CSV export completed successfully. Exported %d records.\" % len(filtered_data))\n\n except Exception as e:\n system.perspective.print(\"Export failed: \" + str(e))" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Export", - "tooltip": { - "enabled": true, - "text": "Exports the data displayed in the table." - } - }, - "position": { - "basis": "120px", - "shrink": 0 - }, - "propConfig": { - "custom.disable": { - "binding": { - "config": { - "expression": "if(isNull({this.custom.start_time}), False, secondsBetween({this.custom.start_time}, {this.custom.time_now}))" - }, - "transforms": [ - { - "code": "\tif value \u003e 60:\n\t\tself.custom.enable_timeout \u003d False\n\t\treturn False\n\telse:\n\t\treturn True", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.download_complete": { - "binding": { - "config": { - "path": "session.custom.downloads" - }, - "transforms": [ - { - "code": "\tif value \u003d\u003d True:\n\t\tself.custom.download_in_progress \u003d False", - "type": "script" - } - ], - "type": "property" - } - }, - "custom.priority_filters": { - "persistent": true - }, - "custom.start_time": { - "binding": { - "config": { - "expression": "{this.custom.enable_timeout}" - }, - "transforms": [ - { - "code": "\tif value \u003d\u003d True:\n\t\treturn self.custom.time_now", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.time_from_filter": { - "persistent": true - }, - "custom.time_now": { - "binding": { - "config": { - "expression": "now()" - }, - "type": "expr" - } - }, - "custom.time_to_filter": { - "persistent": true - }, - "props.enabled": { - "binding": { - "config": { - "expression": "!{this.custom.enable_timeout} || !{this.custom.download_in_progress} " - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "expression": "if(!{this.custom.enable_timeout}, \"Export\",\r\nif({this.custom.download_in_progress}, \"Exporting...\",\r\n\"Export\"))" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "path": "material/import_export" - } - }, - "primary": false, - "style": { - "margin": 15, - "marginLeft": 20 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "set-source-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.source_id_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-device-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.device_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-message-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.message_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-priority-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.priority_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-from-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_from_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-to-filters", - "pageScope": true, - "script": "\ttime \u003d payload[\"data\"]\n\tself.custom.time_to_filter \u003d time", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "reset-historical-filters", - "pageScope": true, - "script": "\taction \u003d payload[\"data\"]\n\tif action \u003d\u003d \"reset\":\n\t\tself.custom.device_filters \u003d None\n\t\tself.custom.priority_filters \u003d None\n\t\tself.custom.source_id_filters \u003d None\n\t\tself.custom.time_from_filter \u003d None\n\t\tself.custom.time_to_filter \u003d None\n\t\tself.custom.type_filters \u003d None\n\t\tself.custom.duration_filter \u003d None\n\t\tself.props.enabled \u003dTrue\n\t\t", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-type-filters", - "pageScope": true, - "script": "\tfilters \u003d payload[\"data\"]\n\tself.custom.type_filters \u003d filters", - "sessionScope": false, - "viewScope": false - }, - { - "messageType": "set-duration-filters", - "pageScope": true, - "script": "\tduration \u003d payload[\"data\"]\n\tself.custom.duration_filter \u003d duration", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.input.button" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "580px", - "grow": 1 - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Paginate" - }, - "position": { - "basis": "70px", - "shrink": 0 - }, - "props": { - "justify": "space-evenly" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Background-Styles/Grey-Background" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Historical_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "justify": "space-evenly" - }, - "type": "ia.container.flex" - } - ], - "custom": { - "shelvedAlarms": [] - }, - "meta": { - "name": "TabContainer" - }, - "position": { - "basis": "300px", - "grow": 1 - }, - "propConfig": { - "props.currentTabIndex": { - "onChange": { - "enabled": null, - "script": "\n\tif self.props.currentTabIndex !\u003d 0:\n\t\tpayload \u003d {}\n\t\tfilter_on \u003d \"false\"\n\t\tpayload[\"reset\"] \u003d filter_on\n\t\tsystem.perspective.sendMessage(\"reset-filters\", payload \u003dpayload, scope \u003d \"page\")\n\t\t\n\tif currentValue.value \u003d\u003d 1:\n\t shelved_info \u003d system.alarm.getShelvedPaths()\n\t alarms \u003d system.alarm.queryStatus(includeShelved\u003dTrue)\n\t \n\t tableData \u003d []\n\t \n\t for alarm in alarms:\n\t if alarm.isShelved() and not alarm.isAcked() and not alarm.isCleared():\n\t # Get alarm path as string\n\t alarm_path \u003d str(alarm.getSource())\n\t \n\t # Get active time\n\t activeData \u003d alarm.getActiveData()\n\t startTime \u003d activeData.getTimestamp() if activeData else None\n\t \n\t # Find shelved info for this alarm\n\t shelveEntry \u003d \"\"\n\t \n\t for shelved_item in shelved_info:\n\t shelved_str \u003d str(shelved_item)\n\t \n\t if alarm_path in shelved_str:\n\t # Extract the value part (after the first comma)\n\t if \",\" in shelved_str:\n\t start_idx \u003d shelved_str.find(\",\")\n\t shelveEntry \u003d shelved_str[start_idx + 1:].rstrip(\"}\")\n\t break\n\t \n\t # Parse shelved information\n\t expiration \u003d \"\"\n\t \n\t if shelveEntry:\n\t \n\t # Extract expiration (between \"expiration:\" and \",\")\n\t if \"expiration:\" in shelveEntry:\n\t exp_part \u003d shelveEntry.split(\"expiration:\")[1]\n\t if \",\" in exp_part:\n\t expiration \u003d exp_part.split(\",\")[0].strip()\n\t else:\n\t expiration \u003d exp_part.strip()\n\t \n\t tableData.append({\n\t \"name\": alarm.getName(),\n\t \"path\": alarm_path,\n\t \"activeTime\": system.date.format(system.date.fromMillis(startTime), \"yyyy-MM-dd HH:mm:ss\"),\n\t \"expirationTime\": expiration,\n\t \"priority\": str(alarm.getPriority())\n\t })\n\t \n\t self.custom.shelvedAlarms \u003d tableData\n\t \n\t\t\n\ttry:\n\t\tpageid \u003d self.view.custom.activityLogger.alt_pageid + \u0027/\u0027+ self.props.tabs[previousValue.value]\n\t\tpageid \u003d pageid.replace(\u0027 \u0027,\u0027\u0027)\n\t\tpayload \u003d activityLog.productMetrics.createActivityPayload(self.view, \u0027page\u0027, pageid, pageid)\n\t\tself.view.custom.activityLogger.start_time \u003d system.date.now()\n\t\tif payload:\n\t\t\tsystem.perspective.sendMessage(\u0027activityLogger-TabChanged\u0027, payload \u003d payload, scope \u003d \u0027page\u0027)\n\texcept:\n\t\tpass" - } - } - }, - "props": { - "contentStyle": { - "classes": "Background-Styles/Grey-Background" - }, - "currentTabIndex": 2, - "menuType": "modern", - "style": { - "classes": "Background-Styles/Grey-Background" - }, - "tabSize": { - "width": 140 - }, - "tabStyle": { - "active": { - "backgroundColor": "#EEEEEE", - "borderLeftColor": "#7FFF00", - "borderLeftStyle": "solid", - "borderLeftWidth": 5, - "borderTopLeftRadius": 5, - "borderTopRightRadius": 5, - "color": "#000000", - "fontFamily": "Arial", - "fontWeight": "bold", - "outlineStyle": "none", - "textDecoration": "underline" - }, - "inactive": { - "backgroundColor": "#D7D7D7", - "borderLeftColor": "#FFFFFF", - "borderTopLeftRadius": 5, - "borderTopRightRadius": 5, - "color": "#969696", - "fontFamily": "Arial" - } - }, - "tabs": [ - "Active Alarms", - "Alarm Hit List", - "Historical" - ] - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "root" - }, - "props": { - "style": { - "classes": "Background-Styles/Main-Background" - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "activityLogger-TabChanged", - "pageScope": true, - "script": "\t# implement your handler here\n\tif payload:\n\t\tactivityLog.productMetrics.callActivityLoggerAPI(payload)", - "sessionScope": false, - "viewScope": false - } - ] - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/a04ac16924c099df9b6edd389b1cbd65fa01685f563acacdcb230fab6bc387ed b/.resources/a04ac16924c099df9b6edd389b1cbd65fa01685f563acacdcb230fab6bc387ed deleted file mode 100644 index 15729c84..00000000 --- a/.resources/a04ac16924c099df9b6edd389b1cbd65fa01685f563acacdcb230fab6bc387ed +++ /dev/null @@ -1,617 +0,0 @@ -{ - "custom": { - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed" - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM01/Station/EPC/UL1_3_EPC1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 38, - "width": 25 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "PullChord_Part2" - }, - "position": { - "height": 1, - "width": 1, - "x": 0.0015, - "y": 0.0005 - }, - "propConfig": { - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if({view.custom.state} \u003d \"Closed\", \"#000000\", {view.custom.color})" - }, - "type": "expr" - } - }, - "props.elements[2].visibility": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.color} \u003d \"#FF0000\" \u0026\u0026 \r\n {parent.meta.visible},\r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)" - }, - "type": "expr" - } - }, - "props.elements[3].visibility": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.color} \u003d \"#00FF00\" \u0026\u0026 \r\n {parent.meta.visible} || {view.custom.state} \u003d \"Closed\",\r\n \u0027visible\u0027, \r\n \u0027hidden\u0027\r\n)" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0.01621377,0.01595147 H 25.93719 V 41.138171 H 0.01621377 Z", - "fill": { - "paint": "#AAAAAA" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 20.752995,30.343588 a 7.2578735,7.1963887 0 0 1 -7.257873,7.196389 7.2578735,7.1963887 0 0 1 -7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.2578736,-7.196389 7.2578735,7.1963887 0 0 1 7.257873,7.196389 z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 13.785537,6.4238337 -7.0747349,-3.1261989 -0.985,1.7060701 6.2447349,4.563801 z", - "fill": { - "paint": "#0000FF" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 12.141737,10.447495 -5.3573679,5.578853 1.2662916,1.509108 6.4243953,-4.30722 z", - "fill": { - "paint": "#0000FF" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - }, - { - "d": "m 21.18,10 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 5,-5 5,5 0 0 1 5,5 z", - "fill": { - "paint": "#0000FF" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": 1 - }, - "type": "path" - } - ], - "viewBox": "-0.5 -0.5 27 42" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-EPC\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_safety" - }, - "type": "property" - } - } - }, - "props": { - "aspectRatio": "25:38", - "mode": "percent", - "style": { - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/a1e7abbdbdd31c59ec1f995819f32b80d6f7c6a5bb445848ce44355dcd1f31b1 b/.resources/a1e7abbdbdd31c59ec1f995819f32b80d6f7c6a5bb445848ce44355dcd1f31b1 deleted file mode 100644 index 5e044fda..00000000 --- a/.resources/a1e7abbdbdd31c59ec1f995819f32b80d6f7c6a5bb445848ce44355dcd1f31b1 +++ /dev/null @@ -1 +0,0 @@ -{"onStartup":"\t# Auto-login for SAT9_SCADA\n\tif not session.props.auth.authenticated:\n\t # Auto-login with minimal credentials for local access\n\t try:\n\t system.perspective.login(username='auto', password='auto', force=True)\n\t except:\n\t pass\n\t\n\t# Initialize session properties from parent\n\ttags_to_read = system.tag.readBlocking([\"Configuration/FC\", \"Configuration/aws\"])\n\tsession.custom.fc = tags_to_read[0].value if tags_to_read[0].quality.isGood() else \"SAT9\"\n\ttry:\n\t aws = system.util.jsonDecode(tags_to_read[1].value) if tags_to_read[1].quality.isGood() else {\"prefix\": \"eu\", \"region\": \"eu-west-1\"}\n\t prefix = aws.get(\"prefix\", \"eu\")\n\t region = aws.get(\"region\", \"eu-west-1\")\n\t session.custom.aws.prefix = prefix\n\t session.custom.aws.region = region\n\texcept:\n\t session.custom.aws.prefix = \"eu\"\n\t session.custom.aws.region = \"eu-west-1\"\n\t\n\tsession.custom.covert = False\n\tsession.custom.download_url = None\n\tsession.custom.alarm_filter.show_map = False\n\tsession.custom.alarm_filter.magnificaiton = \"x2\"","onShutdown":"#\tsystem.perspective.logout()","onBarcodeDataReceived":"\t","onBluetoothReceived":"\t","onAccelerometerDataReceived":"\t","onNdefDataReceived":"\t"} \ No newline at end of file diff --git a/.resources/a512704ace52242d820bd7b6dde5b4c15fc27029700c4d570a54b53380b75e23 b/.resources/a512704ace52242d820bd7b6dde5b4c15fc27029700c4d570a54b53380b75e23 deleted file mode 100644 index bf6d08ca..00000000 --- a/.resources/a512704ace52242d820bd7b6dde5b4c15fc27029700c4d570a54b53380b75e23 +++ /dev/null @@ -1,591 +0,0 @@ -{ - "custom": { - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed", - "type": 0 - }, - "params": { - "directionLeft": false, - "tagProps": [ - "System/MCM04/Chute/FL_CHUTE/FL3012_1CH", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Chute_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.directionLeft": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 20, - "width": 29 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "position.rotate.angle": { - "binding": { - "config": { - "path": "view.params.directionLeft" - }, - "transforms": [ - { - "expression": "if({value}, \u0027180deg\u0027, \u00270deg\u0027)", - "type": "expression" - } - ], - "type": "property" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#FFFFFF\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 0 0 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": 3 - }, - "type": "path" - } - ], - "style": { - "overflow": "hidden" - }, - "viewBox": "-1.5 -1.5 73 63" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-SNP\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - } - }, - "props": { - "justify": "center", - "style": { - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/a9294388b0299ca5f48ec161c602587157dbc7a19dc46648440264308431e7e3 b/.resources/a9294388b0299ca5f48ec161c602587157dbc7a19dc46648440264308431e7e3 deleted file mode 100644 index 2632d09f..00000000 Binary files a/.resources/a9294388b0299ca5f48ec161c602587157dbc7a19dc46648440264308431e7e3 and /dev/null differ diff --git a/.resources/b58b442540dcc1fb34915137e91dd2a81d9468bd47a3705ca2dee7666ae04c2c b/.resources/b58b442540dcc1fb34915137e91dd2a81d9468bd47a3705ca2dee7666ae04c2c deleted file mode 100644 index cf3adaf3..00000000 --- a/.resources/b58b442540dcc1fb34915137e91dd2a81d9468bd47a3705ca2dee7666ae04c2c +++ /dev/null @@ -1,700 +0,0 @@ -{ - "custom": { - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed", - "type": "UNKNOWN" - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM06/Chute/NC/S02_203CH", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "1": "{view.custom.type}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{1}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "1": "", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{1}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "1": "{view.custom.type}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/{1}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 5, - "output": "Chute_JR" - }, - { - "input": 4, - "output": "GS" - }, - { - "input": 3, - "output": "PR" - }, - { - "input": 2, - "output": "Start" - }, - { - "input": 1, - "output": "JR" - }, - { - "input": 6, - "output": "Enable" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 25, - "width": 25 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "Button" - }, - "position": { - "height": 1, - "width": 1 - }, - "propConfig": { - "props.elements[1].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.style.classes": { - "binding": { - "config": { - "expression": "if({session.custom.colours.colour_impaired} \u003d True,\r\n{view.custom.state} + 100,\r\n{view.custom.state})" - }, - "enabled": false, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": 101, - "output": "State-Styles/State101" - }, - { - "input": 102, - "output": "State-Styles/State102" - }, - { - "input": 103, - "output": "State-Styles/State103" - }, - { - "input": 104, - "output": "State-Styles/State104" - }, - { - "input": 105, - "output": "State-Styles/State105" - }, - { - "input": 106, - "output": "State-Styles/State106" - }, - { - "input": 201, - "output": "State-Styles/State201" - }, - { - "input": 202, - "output": "State-Styles/State202" - }, - { - "input": 203, - "output": "State-Styles/State203" - }, - { - "input": 204, - "output": "State-Styles/State204" - }, - { - "input": 205, - "output": "State-Styles/State205" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0,0 H 20 V 20 H 0 Z", - "fill": { - "paint": "#AAAAAA" - }, - "name": "path", - "stroke": { - "paint": "#000000", - "width": "1.5" - }, - "type": "path" - }, - { - "d": "m 17,10.5 a 7,7 0 0 1 -7,7 7,7 0 0 1 -7,-7 7,7 0 0 1 7,-7 7,7 0 0 1 7,7 z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#000000", - "width": "1" - }, - "type": "path" - } - ], - "viewBox": "0 0 20 20" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-BTN\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\t\n\tfrom time import sleep\n\t\n\talarm \u003d []\n\tmessage \u003d None\n\t\n#\tsleep(0.5)\n\t\n\tif system.tag.exists(\"System/aws_data\"):\n\t\tif self.view.params.tagProps[0] !\u003d \"\":\n\t\t\ttags_to_read \u003d system.tag.readBlocking(\"System/aws_data\")\n\t\t\tdecode_alarm_data \u003d system.util.jsonDecode(tags_to_read[0].value)\n\t\t\talarm \u003d [decode_alarm_data[i] for i in decode_alarm_data\n\t\t\t\t\tif decode_alarm_data[i][\u0027sourceId\u0027].startswith(self.view.params.tagProps[0])]\n\t\tif alarm:\n\t\t\talarm \u003d sorted(alarm, key \u003d lambda t:t[\u0027timestamp\u0027], reverse\u003dTrue)\n\t\t\tmessage \u003d max(alarm, key \u003d lambda p:p[\u0027priority\u0027]).get(\u0027message\u0027)\n\t\t\tif len(alarm) \u003e 1:\n\t\t\t\tmessage +\u003d \" (+\" + str(len(alarm)-1) + \")\"\n\tself.view.custom.alarm_message \u003d message" - }, - "scope": "G", - "type": "script" - }, - "onMouseOut": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - }, - "onMouseOver": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_buttons" - }, - "type": "property" - } - } - }, - "props": { - "mode": "percent", - "style": { - "cursor": "pointer", - "transform": "scale(1)", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.coord" - } -} \ No newline at end of file diff --git a/.resources/b6278f9cc9ef0cff20c16f7ab7afa73cf09fd33347a94a616c265f8502ca44dd b/.resources/b6278f9cc9ef0cff20c16f7ab7afa73cf09fd33347a94a616c265f8502ca44dd deleted file mode 100644 index c067facb..00000000 --- a/.resources/b6278f9cc9ef0cff20c16f7ab7afa73cf09fd33347a94a616c265f8502ca44dd +++ /dev/null @@ -1,809 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "button_type": "UNKNOWN", - "type": 1 - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM06/Chute/NC/S02_203CH", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.button_type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 5, - "output": "Chute_JR" - }, - { - "input": 4, - "output": "GS" - }, - { - "input": 3, - "output": "PR" - }, - { - "input": 2, - "output": "Start" - }, - { - "input": 1, - "output": "JR" - }, - { - "input": 6, - "output": "Enable" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.type": { - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-CHPB\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[1]" - }, - "transforms": [ - { - "code": " return value.rsplit(\u0027/\u0027, 1)[-1]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "NameField" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "BUTTON LIGHT" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "PB_Light" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/bBeacon_Green" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "#C2C2C2", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "#CCFFCC" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/bBeacon_Green" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "OFF", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "ON" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - }, - "textStyle": { - "color": "#000000" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Commands/bBlockHost1\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": {} - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#0B0B0B" - } - }, - "style": { - "backgroundColor": "#00FF00", - "classes": "Background-Styles/Controller" - }, - "text": "ENABLE", - "textStyle": { - "color": "#FFFFFF" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Enable" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\ttag_name \u003d self.view.params.tagProps[0]\n\ttag_path \u003d \"[\" + self.session.custom.fc+ \"_SCADA_TAG_PROVIDER]\"+tag_name+\"/Commands/bUnblockHost1\"\n\tsystem.tag.writeBlocking([tag_path],[True])" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button", - "tooltip": {} - }, - "position": { - "basis": "80px", - "grow": 1 - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if({this.props.enabled},{this.props.text} +\u0027 Button\u0027,\"You do not have Maintenance or Administrator role!\")" - }, - "type": "expr" - } - }, - "props.enabled": { - "binding": { - "config": { - "expression": "indexOf({session.props.auth.user.roles}, \"Administrator\") \u003e\u003d 0 || indexOf({session.props.auth.user.roles}, \"Maintenance\") \u003e\u003d 0" - }, - "type": "expr" - } - } - }, - "props": { - "image": { - "icon": { - "color": "#0B0B0B" - } - }, - "style": { - "backgroundColor": "#FF0000", - "classes": "Background-Styles/Controller" - }, - "text": "DISABLE", - "textStyle": { - "color": "#FFFFFF" - } - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Disable" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "padding": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "100px", - "grow": 1 - }, - "props": { - "direction": "column", - "style": { - "gap": 6, - "paddingBottom": 20, - "paddingLeft": 10, - "paddingRight": 10, - "paddingTop": 13 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Commands_tab" - }, - "position": { - "tabIndex": 2 - }, - "props": { - "direction": "column", - "style": { - "paddingTop": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.tabs": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d 0 or value \u003d\u003d 3:\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "currentTabIndex": 1, - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - } - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/c0a3b4508029da8d9a3334a9bd6524683df4c406a9344c01062212d80b2356fe b/.resources/c0a3b4508029da8d9a3334a9bd6524683df4c406a9344c01062212d80b2356fe deleted file mode 100644 index 81283f0e..00000000 --- a/.resources/c0a3b4508029da8d9a3334a9bd6524683df4c406a9344c01062212d80b2356fe +++ /dev/null @@ -1,256 +0,0 @@ -{ - "pages": { - "/": { - "title": "", - "viewPath": "Main-Views/Home" - }, - "/Command": { - "title": "", - "viewPath": "Main-Views/CommandControl" - }, - "/Device-manager": { - "viewPath": "Main-Views/Device-Manager/DeviceManager" - }, - "/Help": { - "title": "Help", - "viewPath": "Main-Views/Help" - }, - "/MAP-Home": { - "title": "", - "viewPath": "Additional-Home-View/MAP-Home" - }, - "/Monitron": { - "viewPath": "Main-Views/Monitron" - }, - "/Oil": { - "viewPath": "Main-Views/OilMonitoring" - }, - "/Real-Time": { - "title": "", - "viewPath": "Alarm-Views/RealTime" - }, - "/Temperature": { - "title": "", - "viewPath": "Main-Views/TempMonitoring" - }, - "/Tools": { - "title": "Tools", - "viewPath": "Main-Views/ToolBox" - }, - "/Windows/Statistics": { - "title": "", - "viewPath": "" - }, - "/Windows/Status": { - "title": "", - "viewPath": "" - } - }, - "sharedDocks": { - "bottom": [ - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "show", - "iconUrl": "material/notifications_active", - "id": "Docked-South", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 165, - "viewParams": {}, - "viewPath": "Navigation-Views/Docked-South" - } - ], - "cornerPriority": "top-bottom", - "left": [ - { - "anchor": "fixed", - "autoBreakpoint": 805, - "content": "auto", - "handle": "autoHide", - "iconUrl": "", - "id": "Docked-West", - "modal": false, - "resizable": false, - "show": "auto", - "size": 70, - "viewParams": {}, - "viewPath": "Navigation-Views/Docked-West" - } - ], - "right": [ - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-Eas-TPR", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Tipper" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-EPC", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-EPC" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-VFD", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-VFD" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-SNP", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-StatusNonPowered" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-DS", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Device-Status" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-MCM", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-MCM" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-Extendo", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Extendo" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-BTN", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Button" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-SS-BTN", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-SS-Button" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "push", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-CH", - "modal": false, - "resizable": false, - "show": "visible", - "size": 150, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Chute" - }, - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "cover", - "handle": "hide", - "iconUrl": "", - "id": "Docked-East-CHPB", - "modal": false, - "resizable": false, - "show": "onDemand", - "size": 400, - "viewParams": {}, - "viewPath": "PopUp-Views/Controller-Equipment/Information-Docked-East-Chute-EN" - } - ], - "top": [ - { - "anchor": "fixed", - "autoBreakpoint": 480, - "content": "auto", - "handle": "hide", - "iconUrl": "", - "id": "", - "modal": false, - "resizable": false, - "show": "visible", - "size": 50, - "viewParams": {}, - "viewPath": "Framework/Breakpoint" - } - ] - } -} \ No newline at end of file diff --git a/.resources/c3fe143eb660b443cb6d239e66a24d323bc074285084eeeec45570f45e7c7dfe b/.resources/c3fe143eb660b443cb6d239e66a24d323bc074285084eeeec45570f45e7c7dfe deleted file mode 100644 index 232700e9..00000000 --- a/.resources/c3fe143eb660b443cb6d239e66a24d323bc074285084eeeec45570f45e7c7dfe +++ /dev/null @@ -1,1864 +0,0 @@ -{ - "custom": { - "PLC_list": [ - "MCM01", - "MCM02", - "MCM03", - "MCM04", - "MCM05" - ], - "button_type": "UNKNOWN", - "type": 0 - }, - "params": { - "forceFaultStatus": null, - "tagProps": [ - "System/MCM06/Chute/NC/S02_203CH", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.PLC_list": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "code": "\tdevices \u003d system.util.jsonDecode(value)\n\tplcList \u003d []\n\tfor k in devices.keys():\n\t\tplcList.append(k)\n\t\t\n\treturn(sorted(set(plcList)))\n", - "type": "script" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.button_type": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Button_Type" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": 5, - "output": "Chute_JR" - }, - { - "input": 4, - "output": "GS" - }, - { - "input": 3, - "output": "PR" - }, - { - "input": 2, - "output": "Start" - }, - { - "input": 1, - "output": "JR" - }, - { - "input": 6, - "output": "Enable" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.type": { - "persistent": true - }, - "params.forceFaultStatus": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "expression": "\u0027Source ID: \u0027 + {view.params.tagProps[0]}" - }, - "type": "expr" - } - } - }, - "props": { - "style": { - "color": "#FFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeDock(\u0027Docked-East-CH\u0027)\n\tself.getSibling(\"tabs\").props.currentTabIndex \u003d 0" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "enabled": true, - "style": { - "cursor": "pointer" - }, - "text": "Close faceplate" - } - }, - "props": { - "path": "material/close", - "style": { - "cursor": "pointer", - "marginBottom": 5, - "marginLeft": 5, - "marginRight": 5, - "marginTop": 5 - } - }, - "type": "ia.display.icon" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "style": { - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if({../AlarmTable.props.params.length_of_table_data} \u003d 0, True, False)" - }, - "enabled": false, - "type": "expr" - } - } - }, - "props": { - "style": { - "classes": "Labels/Label_1", - "marginTop": 20 - }, - "text": "No Active Alarms" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "AlarmStatusTable" - }, - "position": { - "basis": "400px", - "grow": 1 - }, - "propConfig": { - "props.filters.active.text": { - "binding": { - "config": { - "path": "view.params.tagProps[0]" - }, - "transforms": [ - { - "code": "\treturn value[1:]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "columns": { - "active": { - "displayPath": { - "enabled": false - }, - "priority": { - "enabled": false - }, - "source": { - "enabled": false - }, - "state": { - "enabled": false - } - } - }, - "filters": { - "active": { - "priorities": { - "critical": false, - "high": false, - "low": false, - "medium": false - }, - "states": { - "clearUnacked": false - } - } - }, - "refreshRate": 500, - "toolbar": { - "enabled": false - } - }, - "type": "ia.display.alarmstatustable" - } - ], - "meta": { - "name": "Active_tab" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NAME" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "DeviceName" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.tagProps[1]" - }, - "type": "property" - } - } - }, - "props": { - "style": { - "backgroundColor": "#FFFFFF", - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px" - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel", - "overflow": "hidden" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Name" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "FULL" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Full" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "FULL", - "output": "#D5D5D5" - }, - { - "input": "NOT FULL", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Full" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "FULL" - }, - { - "input": false, - "output": "NOT FULL" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "FULL", - "output": "#0008FF" - }, - { - "input": "NOT FULL", - "output": "#47FF47" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Full" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "JAM" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Jam" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "JAMMED", - "output": "#D5D5D5" - }, - { - "input": "NOT JAMMED", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Jam" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "JAMMED" - }, - { - "input": false, - "output": "NOT JAMMED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "JAMMED", - "output": "#FF8C00" - }, - { - "input": "NOT JAMMED", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Jam" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "DISABLED" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Disabled" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "TRUE", - "output": "#D5D5D5" - }, - { - "input": "FALSE", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Disabled" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus}, \"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "TRUE" - }, - { - "input": false, - "output": "FALSE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "TRUE", - "output": "#FF0000" - }, - { - "input": "FALSE", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Disabled" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "HALF FULL" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Half Full" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "HALF FULL", - "output": "#D5D5D5" - }, - { - "input": "NOT HALF FULL", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Half_Full" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "HALF FULL" - }, - { - "input": false, - "output": "NOT HALF FULL" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "HALF FULL", - "output": "#FFF000" - }, - { - "input": "NOT HALF FULL", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Half Full" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "NO CONTAINER" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "No Container" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "NO CONTAINER", - "output": "#D5D5D5" - }, - { - "input": "CONTAINER PRESENT", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/No_Container" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "NO CONTAINER" - }, - { - "input": false, - "output": "CONTAINER PRESENT" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "NO CONTAINER", - "output": "#FF4487" - }, - { - "input": "CONTAINER PRESENT", - "output": "#008000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "No Container" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "CONVEYOR NOT READY" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Conveyor Not Ready" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#D5D5D5" - }, - { - "input": "NOT READY", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Conveyor_Not_Ready" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "NOT READY" - }, - { - "input": false, - "output": "READY" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#008000" - }, - { - "input": "NOT READY", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Conveyor Not Ready" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "BLOCKED BY BG" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Blocked By BG" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#D5D5D5" - }, - { - "input": "NOT READY", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Blocked_By_BG" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "BLOCKED" - }, - { - "input": false, - "output": "NOT BLOCKED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#008000" - }, - { - "input": "NOT READY", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Blocked_By_BG" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "BLOCKED BY OPERATOR" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Conveyor Not Ready" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#D5D5D5" - }, - { - "input": "NOT READY", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/Blocked_By_Operator" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "BLOCKED" - }, - { - "input": false, - "output": "NOT BLOCKED" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "READY", - "output": "#008000" - }, - { - "input": "NOT READY", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Blocked_By_Operator" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "children": [ - { - "meta": { - "name": "Name" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "props": { - "style": { - "paddingLeft": 20 - }, - "text": "ZMX SENSOR ERROR" - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "Conveyor Not Ready" - }, - "position": { - "basis": "50%", - "grow": 1 - }, - "propConfig": { - "props.style.backgroundColor": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#FFFFFF", - "inputType": "scalar", - "mappings": [ - { - "input": "FALSE", - "output": "#D5D5D5" - }, - { - "input": "TRUE", - "output": "#D5D5D5" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarm/ZMX_Sensor_Error" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"UNKNOWN\")", - "type": "expression" - }, - { - "fallback": "UNKNOWN", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "TRUE" - }, - { - "input": false, - "output": "FALSE" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - }, - "props.textStyle.color": { - "binding": { - "config": { - "path": "this.props.text" - }, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": "FALSE", - "output": "#008000" - }, - { - "input": "TRUE", - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Text-Styles/Ariel-Bold-12pt", - "paddingLeft": 10 - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "Property" - }, - "position": { - "basis": "35px", - "shrink": 2 - }, - "props": { - "style": { - "classes": "PopUp-Styles/InfoLabel" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "ZMX_Sensor_Error" - }, - "position": { - "basis": "35px" - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Info_tab" - }, - "position": { - "tabIndex": 1 - }, - "props": { - "direction": "column", - "style": { - "margin-left": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "tabs" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "props.tabs": { - "binding": { - "config": { - "path": "view.custom.type" - }, - "transforms": [ - { - "code": "\t# This script runs whenever view.custom.type changes\n\tif value \u003d\u003d 0 or value \u003d\u003d 3:\n\t\treturn [\"Alarms\", \"Info\"]\n\telse:\n\t\treturn [\"Alarms\", \"Info\", \"Commands\"]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "menuType": "modern", - "tabSize": { - "width": 1000 - }, - "tabStyle": { - "active": { - "classes": "", - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - }, - "inactive": { - "classes": "", - "color": "#B8B8B8", - "fontFamily": "Arial", - "fontSize": 14, - "fontWeight": "bold", - "paddingLeft": 10 - } - } - }, - "type": "ia.container.tab" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "670px", - "grow": 1 - }, - "props": { - "style": { - "border-top": "1px solid white", - "gap": "" - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "800px", - "grow": 1 - }, - "props": { - "direction": "column" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "direction": "column", - "style": { - "classes": "Buttons/Button-Menu" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/c5240ba44c0af2c7fc40af9c251db6514835c33cef6d11cce79e679bde87d9e4 b/.resources/c5240ba44c0af2c7fc40af9c251db6514835c33cef6d11cce79e679bde87d9e4 deleted file mode 100644 index c1cc6f09..00000000 --- a/.resources/c5240ba44c0af2c7fc40af9c251db6514835c33cef6d11cce79e679bde87d9e4 +++ /dev/null @@ -1,650 +0,0 @@ -{ - "custom": { - "alarm_message": null, - "color": "#C2C2C2", - "priority": "No Active Alarms", - "state": "Closed" - }, - "params": { - "angle": 0, - "directionLeft": false, - "tagProps": [ - "System/MCM01/Conveyor/VFD/UL1_3_VFD1", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value", - "value" - ] - }, - "propConfig": { - "custom.color": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Color" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "#C2C2C2" - }, - { - "input": 1, - "output": "#FF0000" - }, - { - "input": 2, - "output": "#FFA500" - }, - { - "input": 3, - "output": "#0008FF" - }, - { - "input": 4, - "output": "#00FF00" - }, - { - "input": 5, - "output": "#FFF700" - }, - { - "input": 6, - "output": "#87CEEB" - }, - { - "input": 7, - "output": "#90EE90" - }, - { - "input": 8, - "output": "#964B00" - }, - { - "input": 9, - "output": "#FFFFFF" - }, - { - "input": 10, - "output": "#000000" - }, - { - "input": 11, - "output": "#8B0000" - }, - { - "input": 12, - "output": "#808080" - }, - { - "input": 13, - "output": "#8B8000" - }, - { - "input": 14, - "output": "#006400" - }, - { - "input": 15, - "output": "#FFFFC5" - }, - { - "input": 16, - "output": "#00008B" - }, - { - "input": 17, - "output": "#FF7276" - }, - { - "input": 18, - "output": "#556B2F" - }, - { - "input": 19, - "output": "#B43434" - }, - { - "input": 20, - "output": "#4682B4" - }, - { - "input": 21, - "output": "#FFD700" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.priority": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Priority" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": null, - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "No Active Alarms" - }, - { - "input": 1, - "output": "High" - }, - { - "input": 2, - "output": "Medium" - }, - { - "input": 3, - "output": "Low" - }, - { - "input": 4, - "output": "Diagnostic" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "custom.state": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/State" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},0)", - "type": "expression" - }, - { - "fallback": "Unknown", - "inputType": "scalar", - "mappings": [ - { - "input": 0, - "output": "Closed" - }, - { - "input": 1, - "output": "Actuated" - }, - { - "input": 2, - "output": "Communication Faulted" - }, - { - "input": 3, - "output": "Conveyor Running In Maintenance Mode" - }, - { - "input": 4, - "output": "Disabled" - }, - { - "input": 5, - "output": "Disconnected" - }, - { - "input": 6, - "output": "Stopped" - }, - { - "input": 7, - "output": "Enabled Not Running" - }, - { - "input": 8, - "output": "Encoder Fault" - }, - { - "input": 9, - "output": "Energy Management" - }, - { - "input": 10, - "output": "ESTOP Was Actuated" - }, - { - "input": 11, - "output": "EStopped" - }, - { - "input": 12, - "output": "EStopped Locally" - }, - { - "input": 13, - "output": "Extended Faulted" - }, - { - "input": 14, - "output": "Full" - }, - { - "input": 15, - "output": "Gaylord Start Pressed" - }, - { - "input": 16, - "output": "Jam Fault" - }, - { - "input": 17, - "output": "Jammed" - }, - { - "input": 18, - "output": "Loading Allowed" - }, - { - "input": 19, - "output": "Loading Not Allowed" - }, - { - "input": 20, - "output": "Low Air Pressure Fault Was Present" - }, - { - "input": 21, - "output": "Maintenance Mode" - }, - { - "input": 22, - "output": "Conveyor Stopped In Maintenance Mode" - }, - { - "input": 23, - "output": "Motor Faulted" - }, - { - "input": 24, - "output": "Motor Was Faulted" - }, - { - "input": 25, - "output": "Normal" - }, - { - "input": 26, - "output": "Off Inactive" - }, - { - "input": 27, - "output": "Open" - }, - { - "input": 28, - "output": "PLC Ready To Run" - }, - { - "input": 29, - "output": "Package Release Pressed" - }, - { - "input": 30, - "output": "Power Branch Was Faulted" - }, - { - "input": 31, - "output": "Pressed" - }, - { - "input": 32, - "output": "Ready To Receive" - }, - { - "input": 33, - "output": "Running" - }, - { - "input": 34, - "output": "Started" - }, - { - "input": 35, - "output": "Stopped" - }, - { - "input": 36, - "output": "System Started" - }, - { - "input": 37, - "output": "Unknown" - }, - { - "input": 38, - "output": "VFD Fault" - }, - { - "input": 39, - "output": "Conveyor Running In Power Saving Mode" - }, - { - "input": 40, - "output": "Conveyor Jogging In Maintenance Mode" - }, - { - "input": 41, - "output": "VFD Reset Required" - }, - { - "input": 42, - "output": "Jam Reset Push Button Pressed" - }, - { - "input": 43, - "output": "Start Push Button Pressed" - }, - { - "input": 44, - "output": "Stop Push Button Pressed" - }, - { - "input": 45, - "output": "No Container" - }, - { - "input": 46, - "output": "Ready To Be Enabled" - }, - { - "input": 47, - "output": "Half Full" - }, - { - "input": 48, - "output": "Enabled" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - }, - "persistent": true - }, - "params.angle": { - "paramDirection": "input", - "persistent": true - }, - "params.directionLeft": { - "paramDirection": "input", - "persistent": true - }, - "params.tagProps": { - "paramDirection": "inout", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 20, - "width": 29 - } - }, - "root": { - "children": [ - { - "meta": { - "name": "RunningStatus" - }, - "position": { - "grow": 1 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "if(({view.custom.display_icon} || ({view.custom.show_running} \u0026\u0026 !{view.custom.show_error})) \u0026\u0026 !{view.params.directionLeft}, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.elements[0].fill.paint": { - "binding": { - "config": { - "expression": "if(\r\n {view.custom.state} \u003d \"Closed\",\r\n \"#000000\",\r\n {view.custom.color}\r\n)\r\n" - }, - "type": "expr" - } - }, - "props.style.transform": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "0": "{view.params.tagProps[0]}", - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Maintenance/Direction" - }, - "transforms": [ - { - "expression": "coalesce({value},{view.params.forceFaultStatus},\"\")", - "type": "expression" - }, - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "scaleX(-1)" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "tag" - } - } - }, - "props": { - "elements": [ - { - "d": "M 0 0 L 40 0 L 40 0 L 70 30 L 40 60 L 40 60 L 0 60 L 30 30 Z", - "fill": {}, - "name": "path", - "stroke": { - "paint": "#4c4c4c", - "width": "2" - }, - "type": "path" - } - ], - "style": { - "overflow": "hidden" - }, - "viewBox": "-1.5 -1.5 73 63" - }, - "type": "ia.shapes.svg" - } - ], - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.openDock(\u0027Docked-East-VFD\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})" - }, - "scope": "G", - "type": "script" - }, - "onDoubleClick": { - "config": { - "script": "\ttagProps \u003d self.view.params.tagProps\n\tsystem.perspective.openPopup(\"StatusPopUP\", \"PopUp-Views/Controller-Equipment/Information\", params \u003d{\"tagProps\":tagProps})\n\t" - }, - "enabled": false, - "scope": "G", - "type": "script" - }, - "onMouseEnter": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(2)\"" - }, - "scope": "G", - "type": "script" - }, - "onMouseLeave": { - "config": { - "script": "\tself.props.style.transform \u003d \"scale(1)\"" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "root", - "tooltip": { - "enabled": true, - "location": "top-left", - "style": {} - } - }, - "propConfig": { - "meta.tooltip.style.classes": { - "binding": { - "config": { - "expression": "{view.custom.priority}" - }, - "transforms": [ - { - "fallback": "Alarms-Styles/NoAlarm", - "inputType": "scalar", - "mappings": [ - { - "input": "High", - "output": "Alarms-Styles/High" - }, - { - "input": "Medium", - "output": "Alarms-Styles/Medium" - }, - { - "input": "Low", - "output": "Alarms-Styles/Low" - }, - { - "input": "Diagnostic", - "output": "Alarms-Styles/Diagnostic" - } - ], - "outputType": "style-list", - "type": "map" - } - ], - "type": "expr" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "if(\n {view.custom.state} !\u003d \"Closed\",\n \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n \"Device Disconnected\"\n)\n" - }, - "type": "expr" - } - }, - "meta.visible": { - "binding": { - "config": { - "path": "session.custom.alarm_filter.show_running" - }, - "type": "property" - } - }, - "props.style.borderStyle": { - "binding": { - "config": { - "path": "view.custom.disconnected" - }, - "enabled": false, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "solid" - }, - { - "input": false, - "output": "none" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "justify": "center", - "style": { - "borderColor": "#FF0000", - "borderStyle": "none", - "borderWidth": "2px", - "cursor": "pointer", - "transform": "scale(1)", - "transformOrigin": "50% 50%", - "transition": "transform 100ms linear" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/c9c0c6be92f5466c32314ac9000aebd58d434ca4d6961416d49ef0e7a6e69608 b/.resources/c9c0c6be92f5466c32314ac9000aebd58d434ca4d6961416d49ef0e7a6e69608 deleted file mode 100644 index 06317571..00000000 --- a/.resources/c9c0c6be92f5466c32314ac9000aebd58d434ca4d6961416d49ef0e7a6e69608 +++ /dev/null @@ -1,152 +0,0 @@ -import re -import os -import json -import sys -#Stores the page configuration for the project. -#This global variable is accesible form all gateway scoped events using "." notation -#congig.project_config.global_project_page_ids -global_project_page_ids = {} - - - -def get_project_config(): - """ - Function searches through the project directory Detailed-Views. - It looks for all the source ids on each Detailed-View and returns a - Dict with source ids as the keys and page ids as the values. - - Args: - param1: self. refrence to the object being called. - param2: source_id. The source_id of the alarm. - - Returns: - N/A. - - Raises: - KeyError: Will log an error message to the console if the basepath is not found. - logger = {whid}_get_project_config - """ - if not global_project_page_ids: - try: - basePath = os.getcwd().replace('\\','/') + '/data/projects/' + system.util.getProjectName() + '/com.inductiveautomation.perspective/views/Detailed-Views' - files = os.listdir(basePath) - files_found = True - except: - whid = system.tag.readBlocking("Configuration/FC")[0].value - logger = system.util.getLogger("%s-get_project_config" % (whid)) - exc_type, exc_obj, tb = sys.exc_info() - lineno = tb.tb_lineno -# logger.error("Error: %s, %s, %s" % (lineno, exc_type, exc_obj)) #JCM - files_found = False - if files_found: - for i in files: - jsonPath = basePath+'/'+str(i)+'/view.json' - with open(jsonPath, 'r') as f: - data= f.read() - obj = json.loads(data) - for child in obj['root']['children']: - tag_props = child.get("props",{}).get("params", {}).get("tagProps") - if tag_props: - source_id = tag_props[0] - global global_project_page_ids - global_project_page_ids[source_id] = i - -def open_pop_up(message): - error_message = message - system.perspective.openPopup("ErrorPopUP", "PopUp-Views/Error", - params ={"Error_message":error_message}, - showCloseIcon = False, modal = True, - viewportBound = True, - draggable = False, - overlayDismiss = True - ) - - - - -def navigate_to_url(self, source_id, page_id): - url_to_navigate = "/DetailedView/%s/%s" % (page_id, page_id) - navigation.amzl_navigation.set_session_variables(self, source_id, False) - system.perspective.navigate(page = url_to_navigate) - - -def reset_highlights(self): - """ - Clears highlights, closes docks and popups, and resets session variables. - """ - # 1. Reset session variables - self.session.custom.searchId = "" - self.session.custom.deviceSearchId = "" - - # 2. Close popup and docks - system.perspective.closePopup(id="TagSearch") - for dock_id in ["Docked-East-VFD", "Docked-East-MCM", "Docked-East-SNP", "Docked-East-TPR", "Docked-East-DS", "Docked-East-SS-BTN", "Docked-East-EPC", "Docked-East-BTN", "Docked-East-Extendo", "Docked-East-CH", "Docked-East-CHPB"]: - system.perspective.closeDock(dock_id) - - # 3. Trigger CLEAR state via navigate to same view - current_page = self.page.props.primaryView - system.perspective.navigate( - view=current_page, - params={"highlightTagPath": "CLEAR"} - ) - -def source_id_lookup(self, source_id): - if not source_id: - return - - page_id = global_project_page_ids.get(source_id) - found = False - final_source_id = source_id - - if not page_id: - items = source_id.split("/") - length_of_items = len(items) - 1 - - while length_of_items > 0: - items.pop() - candidate_id = "/".join(items) - page_id = global_project_page_ids.get(candidate_id) - if page_id: - found = True - final_source_id = candidate_id - break - length_of_items -= 1 - else: - found = True - - if not found or not page_id: - open_pop_up("No page id found") - return - - parts = final_source_id.split("/") - device = parts[-1] - - if "MCM" in device: - pathToDevice = "/".join(parts[:3]) - else: - idx = final_source_id.find(device) - pathToDevice = final_source_id[:idx + len(device)] if idx != -1 else final_source_id - - highlight_path = pathToDevice + "||High" - - view_prefix = "Detailed-Views/" - page_path = page_id - if not page_id.startswith("/"): - page_path = view_prefix + page_id - - system.perspective.navigate( - view=page_path, - params={"highlightTagPath": highlight_path} - ) - -def get_child_scada_projects(): - """ - This function returns an alphabetically sorted list of - child SCADA projects, that inherit the SCADA_PERSPECTIVE_PARENT_PROJECT. - Each of these projects follow the naming convention "{WHID}_SCADA" - - :return: List[str]; List of project names on gateway - """ - pattern = '[A-Z]{3}[0-9]|K[A-Z]{3}_SCADA' - all_projects = system.project.getProjectNames() - return sorted([x for x in all_projects if re.match(pattern, x)]) diff --git a/.resources/d62420d51993c93f7c9728ea7b7a5114de208e24928321bb1dcaf837c0b09065 b/.resources/d62420d51993c93f7c9728ea7b7a5114de208e24928321bb1dcaf837c0b09065 deleted file mode 100644 index efc3c27f..00000000 Binary files a/.resources/d62420d51993c93f7c9728ea7b7a5114de208e24928321bb1dcaf837c0b09065 and /dev/null differ diff --git a/.resources/dcabe955b9dbe475ef32e2b223760fd8f795d53f436a75312d8535926d4d514e b/.resources/dcabe955b9dbe475ef32e2b223760fd8f795d53f436a75312d8535926d4d514e deleted file mode 100644 index 4d6ddb02..00000000 --- a/.resources/dcabe955b9dbe475ef32e2b223760fd8f795d53f436a75312d8535926d4d514e +++ /dev/null @@ -1,1206 +0,0 @@ -{ - "custom": { - "activityLogger": { - "alt_pageid": "Header", - "start_time": { - "$": [ - "ts", - 192, - 1758619353064 - ], - "$ts": 1758619353063 - } - } - }, - "events": { - "system": { - "onShutdown": { - "config": { - "script": "\tactivityLog.productMetrics.callLogger(self, \u0027page\u0027)" - }, - "scope": "G", - "type": "script" - }, - "onStartup": { - "config": { - "script": "\tself.custom.activityLogger.start_time \u003d system.date.now()" - }, - "scope": "G", - "type": "script" - } - } - }, - "params": { - "params": {}, - "size": "medium" - }, - "propConfig": { - "custom.activityLogger": { - "persistent": true - }, - "custom.activityLogger.pageid": { - "binding": { - "config": { - "path": "page.props.path" - }, - "transforms": [ - { - "code": " if value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n return self.custom.activityLogger.alt_pageid.lower()\n else:\n return value[1:].lower()\n\treturn value", - "type": "script" - } - ], - "type": "property" - } - }, - "params.params": { - "paramDirection": "input", - "persistent": true - }, - "params.size": { - "paramDirection": "input" - } - }, - "props": { - "defaultSize": { - "height": 58 - } - }, - "root": { - "children": [ - { - "children": [ - { - "events": { - "dom": { - "onDoubleClick": { - "config": { - "page": "/Monitron" - }, - "scope": "C", - "type": "nav" - } - } - }, - "meta": { - "name": "Icon" - }, - "position": { - "basis": "30px" - }, - "props": { - "color": "#FFFFFF", - "path": "material/vibration", - "style": { - "classes": "" - } - }, - "type": "ia.display.icon" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "41px" - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "direct", - "tagPath": "[IEC_SCADA_TAG_PROVIDER]Monitron/monitron_data" - }, - "transforms": [ - { - "code": "\treturn value.getRowCount()", - "type": "script" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "color": "#FFFFFF", - "textAlign": "center" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "80px", - "display": false - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "events": { - "dom": { - "onDoubleClick": { - "config": { - "page": "/Oil" - }, - "scope": "C", - "type": "nav" - } - } - }, - "meta": { - "name": "Icon" - }, - "position": { - "basis": "30px" - }, - "props": { - "color": "#FFFFFF", - "path": "material/opacity", - "style": { - "classes": "" - } - }, - "type": "ia.display.icon" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "41px" - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "direct", - "tagPath": "[IEC_SCADA_TAG_PROVIDER]Oil/oil_condition_monitoring" - }, - "transforms": [ - { - "code": "\treturn value.getRowCount()", - "type": "script" - } - ], - "type": "tag" - } - } - }, - "props": { - "style": { - "color": "#FFFFFF", - "textAlign": "center" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer_1" - }, - "position": { - "basis": "80px", - "display": false - }, - "type": "ia.container.flex" - }, - { - "meta": { - "name": "Image" - }, - "position": { - "basis": "120px" - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "{view.params.size} \u003d \"large\"" - }, - "type": "expr" - } - } - }, - "props": { - "fit": { - "height": 30, - "mode": "fill" - }, - "source": "/system/images/Builtin/amazon_rme_logo.png" - }, - "type": "ia.display.image" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer Start" - }, - "position": { - "basis": "16px", - "shrink": 0 - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "id": "Docked-West", - "type": "toggle" - }, - "scope": "C", - "type": "dock" - } - } - }, - "meta": { - "name": "Menu Dock" - }, - "position": { - "basis": "24px", - "shrink": 0 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "{view.params.size} !\u003d \"large\"" - }, - "type": "expr" - } - } - }, - "props": { - "color": "#FFFFFF", - "path": "material/menu", - "style": { - "classes": "Header/Icon", - "marginRight": "10px" - } - }, - "type": "ia.display.icon" - }, - { - "children": [ - { - "meta": { - "name": "FlexContainer" - }, - "position": { - "basis": "550px", - "grow": 1 - }, - "type": "ia.container.flex" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "300px", - "shrink": 0 - }, - "propConfig": { - "custom.area": { - "binding": { - "config": { - "expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"Area\"),\"\"))" - }, - "type": "expr" - } - }, - "custom.lookup_path": { - "binding": { - "config": { - "expression": "try(if({this.custom.path}[1,0]\u003d\"DetailedView\", {this.custom.path}[2,0],\r\n\"\"), \"\")\r\n" - }, - "type": "expr" - } - }, - "custom.path": { - "binding": { - "config": { - "path": "page.props.path" - }, - "transforms": [ - { - "expression": "split({value},\"/\")", - "type": "expression" - } - ], - "type": "property" - } - }, - "custom.path_to_display": { - "binding": { - "config": { - "expression": "if(len({this.custom.lookup_path})\u003c1, \"\",\r\nif(len({this.custom.area}) \u003c1, {this.custom.lookup_path},\r\nif(len({this.custom.sub_area}) \u003e 0, concat({this.custom.lookup_path} + \" / \" + {this.custom.area} + \" / \" + {this.custom.sub_area}),\r\nconcat({this.custom.lookup_path} + \" / \" + {this.custom.area}))))" - }, - "type": "expr" - } - }, - "custom.plc_dict": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]Configuration/PLC" - }, - "transforms": [ - { - "expression": "jsonGet({value},{this.custom.lookup_path})", - "type": "expression" - } - ], - "type": "tag" - } - }, - "custom.sub_area": { - "binding": { - "config": { - "expression": "if(isNull({this.custom.lookup_path}), \"\",\r\ntry(jsonGet({this.custom.plc_dict},\"SubArea\"), \"\"))" - }, - "type": "expr" - } - }, - "position.display": { - "binding": { - "config": { - "expression": "{view.params.size} \u003d \"large\"" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "path": "this.custom.path_to_display" - }, - "type": "property" - } - } - }, - "props": { - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontWeight": "bold", - "textAlign": "center" - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": "150px", - "grow": 1 - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Area" - }, - "position": { - "basis": "200px", - "grow": 1 - }, - "type": "ia.container.flex" - }, - { - "meta": { - "name": "Icon_1", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "30px" - }, - "propConfig": { - "meta.tooltip.text": { - "binding": { - "config": { - "expression": "{[System]Gateway/Database/MariaDB/Available}" - }, - "transforms": [ - { - "fallback": "Database Connection Status: LOST", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "Database Connection Status: GOOD" - }, - { - "input": false, - "output": "Database Connection Status: LOST" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "expr" - } - }, - "props.color": { - "binding": { - "config": { - "expression": "{[System]Gateway/Database/MariaDB/Available}" - }, - "transforms": [ - { - "fallback": "#FF0000", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "#47FF47" - }, - { - "input": false, - "output": "#FF0000" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "expr" - }, - "onChange": { - "enabled": null, - "script": " db_tag_path \u003d \"[System]Gateway/Database/MariaDB/Available\"\n\t\n if not (system.tag.readBlocking([db_tag_path])[0].value):\n \tsystem.perspective.openPopup(\"errorPopup\",\u0027PopUp-Views/DatabaseError\u0027, title\u003d\"Database Error\")\n\t" - }, - "persistent": true - } - }, - "props": { - "color": "#47FF47", - "path": "material/table_chart" - }, - "type": "ia.display.icon" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer 1" - }, - "position": { - "basis": "20px" - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - }, - { - "custom": { - "buttonid": "HeaderNotifyIcon", - "entries": [ - { - "PrimaryKey": "2024-05-08 10:17:51", - "author": "pll", - "body": "Introducing our brand new Announcement Feature! 🎉 Stay in the loop with important updates, new features, planned downtime events, all in one place. Never miss out again! Check it out now and stay tuned for the latest updates. 🔊", - "childproj": "https://eu-preprod.scada2.rme.amazon.dev: MAN2", - "expire": "2024-05-09 05:00:00", - "link1": "https://", - "link1title": "", - "link2": "https://", - "link2title": "", - "priority": "Healthy", - "publish": "2024-05-08 10:08:33", - "title": "📢 Exciting News! 📢", - "whids": "" - } - ], - "entryCount": 1, - "highestPriority": 5 - }, - "events": { - "dom": { - "onClick": [ - { - "config": { - "draggable": true, - "id": "ioNP2CXn", - "modal": true, - "overlayDismiss": true, - "resizable": true, - "showCloseIcon": true, - "title": "Notifications", - "type": "open", - "viewParams": { - "entryCount": "{/root/Icon_0.custom.entryCount}", - "instances": "{/root/Icon_0.custom.entries}" - }, - "viewPath": "PopUp-Views/Notify-Tool/Notify-Popup", - "viewportBound": false - }, - "scope": "C", - "type": "popup" - }, - { - "config": { - "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - ] - } - }, - "meta": { - "name": "Icon_0", - "tooltip": { - "enabled": true, - "location": "bottom-right", - "style": { - "whiteSpace": "pre" - }, - "text": "📢 Exciting News! 📢\n" - } - }, - "position": { - "basis": "30px" - }, - "propConfig": { - "custom.refreshMSG": { - "binding": { - "config": { - "expression": "now(600000)" - }, - "type": "expr" - }, - "onChange": { - "enabled": null, - "script": "\tsystem.perspective.sendMessage(\u0027refreshNotifyIcon\u0027)" - } - }, - "position.display": { - "binding": { - "config": { - "path": "view.custom.EntriesList" - }, - "transforms": [ - { - "code": "\tfrom datetime import datetime\n\t\n#\tRead entries from dynamo table\n\treturns \u003d notifyTool.ReadFromDynamo.DynamoReader()\n\tEntriesList \u003d returns[\u0027Items\u0027]\n\tEntriesList.reverse()\n#\treturn EntriesList\n\n#\tCreate empty list and now string\n\tpublishdates \u003d []\n\tnow \u003d datetime.now()\n\tnowstr \u003d str(now)[:19]\n\tactiveNotify \u003d False\n\twhid \u003d self.session.custom.fc\n\tstates \u003d {\u0027Healthy\u0027:5,\u0027Diagnostic\u0027:4, \u0027Low\u0027:3, \u0027Medium\u0027:2, \u0027High\u0027:1}\n#\tCheck EntriesList for active entries based on publish and expire times\n\tactiveEntries \u003d []\n\ttooltip \u003d []\n\tcount \u003d 0\n\thighestPriority \u003d 5\n\tfor e in EntriesList:\n\t\t\n\t\tif len(e[\u0027whids\u0027])\u003e0:\n\t\t\tif whid in e[\u0027whids\u0027]:\n\t\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\t\tactiveEntries.append(e)\n\t\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\t\tactiveNotify \u003d True\n\t\t\t\t\tcount +\u003d1\n\t\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\t\telse:\n\t\t\tif nowstr \u003e\u003d e[\u0027publish\u0027] and nowstr\u003c\u003dstr( e[\u0027expire\u0027]):\n\t\t\t\tactiveEntries.append(e)\n\t\t\t\ttooltip.append(e[\u0027title\u0027])\n\t\t\t\tactiveNotify \u003d True\t\t\n\t\t\t\tcount +\u003d1\t\n\t\t\t\tif states[e[\u0027priority\u0027]] \u003c highestPriority:\n\t\t\t\t\thighestPriority \u003d states[e[\u0027priority\u0027]]\n\n\t\t\t\n\ttooltiptext \u003d \u0027\u0027\n\tfor i in tooltip:\n\t\ttooltiptext+\u003d i+\u0027\\n\u0027\n\tself.custom.entries \u003d activeEntries\n\tself.custom.highestPriority \u003d highestPriority\n\tself.custom.entryCount \u003d count\n\tself.meta.tooltip.text \u003d tooltiptext\t\n\n\n#\treturn returns\n#\treturn activeEntries\n\treturn activeNotify", - "type": "script" - } - ], - "type": "property" - } - }, - "props.color": { - "binding": { - "config": { - "path": "this.custom.highestPriority" - }, - "transforms": [ - { - "fallback": "state5", - "inputType": "scalar", - "mappings": [ - { - "input": 1, - "output": "state1" - }, - { - "input": 2, - "output": "state2" - }, - { - "input": 3, - "output": "state3" - }, - { - "input": 4, - "output": "state4" - }, - { - "input": 5, - "output": "state5" - } - ], - "outputType": "scalar", - "type": "map" - }, - { - "code": "\ttest \u003d self.session.custom.colours.colour_impaired\n\tstatecolor \u003d self.session.custom.colours[value]\n\treturn statecolor", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "path": "material/campaign", - "style": { - "marginLeft": 5, - "marginRight": 5 - } - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "refreshNotifyIcon", - "pageScope": true, - "script": "\n\tself.refreshBinding(\u0027props.color\u0027)\n\tself.refreshBinding(\u0027position.display\u0027)", - "sessionScope": true, - "viewScope": false - } - ] - }, - "type": "ia.display.icon" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer End_3" - }, - "position": { - "basis": "20px", - "shrink": 0 - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - }, - { - "custom": { - "buttonid": "HeaderLegendIcon" - }, - "events": { - "dom": { - "onClick": [ - { - "config": { - "draggable": false, - "id": "TZyBcXB7", - "modal": true, - "overlayDismiss": true, - "resizable": false, - "showCloseIcon": false, - "type": "open", - "viewPath": "PopUp-Views/Legend_Popup/Legend-popup-view", - "viewportBound": true - }, - "scope": "C", - "type": "popup" - }, - { - "config": { - "script": "\tbuttonid \u003d self.custom.buttonid\n\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - ] - } - }, - "meta": { - "name": "Icon", - "tooltip": { - "delay": 250, - "enabled": true, - "sustain": 1000, - "text": "Legend" - } - }, - "position": { - "basis": "35px" - }, - "props": { - "color": "#FFFFFF", - "path": "material/legend_toggle", - "style": { - "classes": "", - "marginRight": 20 - } - }, - "type": "ia.display.icon" - }, - { - "children": [ - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.navigate(page \u003d \"/Real-Time\")" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon" - }, - "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": { - "path": "material/notifications_active", - "style": { - "classes": "" - } - }, - "type": "ia.display.icon" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "41px" - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "polling": { - "enabled": true, - "rate": "3" - }, - "queryPath": "GetActiveAlarmsByLocationAndPriority", - "returnFormat": "json" - }, - "transforms": [ - { - "code": "\ttotal \u003d sum(row[\"Count\"] for row in value if \"Count\" in row and row[\"Count\"] is not None)\n\treturn total", - "type": "script" - } - ], - "type": "query" - } - } - }, - "props": { - "style": { - "color": "#FFFFFF", - "textAlign": "center" - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "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": { - "cursor": "pointer" - } - }, - "type": "ia.container.flex" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer End_2" - }, - "position": { - "basis": "20px", - "shrink": 0 - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - }, - { - "custom": { - "covert": true - }, - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tdevice_list \u003d tags.tag_utilities.get_devices(self.session.custom.fc)\n\ttags.tag_utilities.reset_disconnect_tags(self.session.custom.fc, device_list)\n\tAWS.wbsckt_abort.close_websckt()" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Icon_2", - "tooltip": { - "enabled": true - } - }, - "position": { - "basis": "30px" - }, - "propConfig": { - "custom.heartbeat_received": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_heartbeat_interval" - }, - "transforms": [ - { - "expression": "if(secondsBetween(todate({value}),todate(now())) \u003e 70, False, True)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "custom.wbsckt_running": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "indirect", - "references": { - "fc": "{session.custom.fc}" - }, - "tagPath": "[{fc}_SCADA_TAG_PROVIDER]System/wbsckt_running" - }, - "transforms": [ - { - "expression": "if({value} \u003d True \u0026\u0026 ({this.custom.heartbeat_received} \u003d True) , True, False)", - "type": "expression" - } - ], - "type": "tag" - } - }, - "meta.tooltip.text": { - "binding": { - "config": { - "path": "this.custom.wbsckt_running" - }, - "transforms": [ - { - "fallback": "", - "inputType": "scalar", - "mappings": [ - { - "input": true, - "output": "websocket running" - }, - { - "input": false, - "output": "websocket disconnected" - } - ], - "outputType": "scalar", - "type": "map" - } - ], - "type": "property" - } - }, - "props.color": { - "binding": { - "config": { - "path": "this.custom.wbsckt_running" - }, - "enabled": false, - "transforms": [ - { - "fallback": "#000000", - "inputType": "scalar", - "mappings": [ - { - "input": false, - "output": "#FF4747" - }, - { - "input": true, - "output": "#FFFFFF" - } - ], - "outputType": "color", - "type": "map" - } - ], - "type": "property" - } - } - }, - "props": { - "color": "#FFFFFF", - "path": "material/location_city", - "style": { - "cursor": "pointer" - } - }, - "type": "ia.display.icon" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "shrink": 0 - }, - "propConfig": { - "position.basis": { - "binding": { - "config": { - "expression": "len({this.props.text}) * 11 + \"px\"" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "fallbackDelay": 2.5, - "mode": "direct", - "tagPath": "Configuration/FC" - }, - "type": "tag" - } - } - }, - "props": { - "icon": "material/building", - "style": { - "borderWidth": "0.25px", - "color": "#FFFFFF", - "textAlign": "", - "textIndent": 10 - }, - "textStyle": { - "lineBreak": "auto" - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer End" - }, - "position": { - "basis": "20px", - "shrink": 0 - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "User" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "path": "material/person", - "style": { - "classes": "Header/Icon", - "color": "#FFFFFF" - } - }, - "type": "ia.display.icon" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tif self.session.props.auth.authenticated:\n\t\tsystem.perspective.logout()\n\telse:\n\t\tsystem.perspective.login()" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "hasDelegate": true, - "name": "Sign In" - }, - "position": { - "basis": "50px", - "shrink": 0 - }, - "propConfig": { - "position.display": { - "binding": { - "config": { - "expression": "{view.params.size} !\u003d \"small\"" - }, - "type": "expr" - } - }, - "props.text": { - "binding": { - "config": { - "path": "session.props.auth.user.userName" - }, - "transforms": [ - { - "code": " try:\n if quality is not None and hasattr(quality, \"isGood\") and not quality.isGood():\n return \"LOGIN\"\n except:\n pass\n\n if value is None:\n return \"LOGIN\"\n s \u003d unicode(value) if not isinstance(value, basestring) else value # Py2/Jython\n if not s or s.strip().lower() in (\"null\", \"none\"):\n return \"LOGIN\"\n\n return s.split(\"@\", 1)[0]", - "type": "script" - } - ], - "type": "property" - } - } - }, - "props": { - "style": { - "classes": "Header/Icon", - "color": "#FFFFFF", - "cursor": "pointer", - "marginLeft": "4px" - } - }, - "type": "ia.display.label" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer End_0" - }, - "position": { - "basis": "20px", - "shrink": 0 - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - }, - { - "events": { - "dom": { - "onClick": { - "config": { - "script": "\tsystem.perspective.closeSession()" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Exit", - "tooltip": { - "enabled": true, - "location": "bottom-left", - "style": { - "fontFamily": "Arial", - "fontSize": 12 - }, - "tail": false, - "text": "Exit Application" - } - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "path": "material/exit_to_app", - "style": { - "classes": "Header/Icon", - "color": "#FFFFFF", - "cursor": "pointer" - } - }, - "type": "ia.display.icon" - }, - { - "meta": { - "hasDelegate": true, - "name": "Spacer End_1" - }, - "position": { - "basis": "16px", - "shrink": 0 - }, - "props": { - "text": " " - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "root" - }, - "props": { - "justify": "flex-end" - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/ddc5cf82edfe7fe3ce76f82636d529350733b1f462ab8b1364de146e0fb506b2 b/.resources/ddc5cf82edfe7fe3ce76f82636d529350733b1f462ab8b1364de146e0fb506b2 deleted file mode 100644 index 5bd3c648..00000000 --- a/.resources/ddc5cf82edfe7fe3ce76f82636d529350733b1f462ab8b1364de146e0fb506b2 +++ /dev/null @@ -1,956 +0,0 @@ -{ - "custom": { - "activityLogger": { - "alt_pageid": "home" - } - }, - "params": { - "viewFocus": "value" - }, - "propConfig": { - "custom.activityLogger": { - "persistent": true - }, - "custom.activityLogger.pageid": { - "binding": { - "config": { - "expression": "{page.props.path}" - }, - "transforms": [ - { - "code": "\tif value \u003d\u003d\u0027/\u0027 or value \u003d\u003d \u0027\u0027 or value \u003d\u003d None:\n\t\treturn self.custom.activityLogger.alt_pageid.lower()\n\telse:\n\t\treturn value[1:].lower()", - "type": "script" - } - ], - "type": "expr" - } - }, - "custom.activityLogger.start_time": { - "binding": { - "config": { - "expression": "now()" - }, - "type": "expr" - } - }, - "params.viewFocus": { - "paramDirection": "input", - "persistent": true - } - }, - "props": { - "defaultSize": { - "height": 326, - "width": 400 - } - }, - "root": { - "children": [ - { - "children": [ - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "36px", - "shrink": 0 - }, - "props": { - "style": { - "background-color": "#555555", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Status Filters" - }, - "type": "ia.display.label" - }, - { - "children": [ - { - "custom": { - "buttonid": "status_filters/all" - }, - "events": { - "component": { - "onActionPerformed": [ - { - "config": { - "script": "\tpayload \u003d {}\n\tif self.props.selected:\n\t\tvalue \u003d True\n\telse:\n\t\tvalue \u003d False\n\t\n\tpayload[\"data\"] \u003d value\n\t\n\tsystem.perspective.sendMessage(\"select-all-filters\", \n\t\t\t\t\t\t\t\t\tpayload \u003d payload, \n\t\t\t\t\t\t\t\t\tscope \u003d \"view\")" - }, - "scope": "G", - "type": "script" - }, - { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - ] - } - }, - "meta": { - "name": "Select-All", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "expression": "if({session.custom.alarm_filter.show_diagnostic} \u0026\u0026 \r\n{session.custom.alarm_filter.show_gateways} \u0026\u0026\r\n{session.custom.alarm_filter.show_low_alarm} \u0026\u0026\r\n{session.custom.alarm_filter.show_running} \u0026\u0026\r\n{session.custom.alarm_filter.show_camera_jams} \u0026\u0026\r\n{session.custom.alarm_filter.show_fio} \u0026\u0026\r\n{session.custom.alarm_filter.show_safety}, True, False)" - }, - "type": "expr" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Select All" - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/low_alarms" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Low Alarms", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_low_alarm" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show Low Alarms" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data\n\tsystem.perspective.print(data)", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/diagnostic_alarms" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Diagnostic", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_diagnostic" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show Diagnostic Alarms" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/running_status" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Running", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_running" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show Running Status" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/low_alarms" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Show-Buttons", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_buttons" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show Buttons" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data\n\tsystem.perspective.print(data)", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/estops_pullChords" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "E-Stops", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_safety" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show E-Stops \u0026 Pull Chords" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/gateways" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Show-DPM-MCM", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_gateways" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show DPM \u0026 MCM" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/camera_jams" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Show-Camera-Jams", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_camera_jams" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show Camera Jams" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - }, - { - "custom": { - "buttonid": "status_filters/fio_sio" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif not self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Show-Fios", - "tooltip": { - "delay": 250 - } - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.enabled": { - "binding": { - "config": { - "expression": "if ({session.custom.alarm_filter.show_map}\u003dTrue \u0026\u0026 {session.custom.view_in_focus}\u003d\u0027/MAP-Home\u0027, True, False)" - }, - "enabled": false, - "type": "expr" - } - }, - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.show_fio" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Show FIO \u0026 SIO" - }, - "scripts": { - "customMethods": [], - "extensionFunctions": null, - "messageHandlers": [ - { - "messageType": "select-all-filters", - "pageScope": false, - "script": "\tdata \u003d payload[\"data\"]\n\tself.props.selected \u003d data", - "sessionScope": false, - "viewScope": true - } - ] - }, - "type": "ia.input.checkbox" - } - ], - "meta": { - "name": "FlexContainer" - }, - "position": { - "grow": 1 - }, - "props": { - "direction": "column", - "justify": "space-between" - }, - "type": "ia.container.flex" - }, - { - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tsystem.perspective.closePopup(\u0027\u0027)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Button" - }, - "position": { - "basis": "30px", - "shrink": 0 - }, - "props": { - "box-shadow": "5px 5px 5px", - "style": { - "backgroundColor": "#555555", - "classes": "Background-Styles/Controller", - "marginBottom": 5, - "marginLeft": 20, - "marginRight": 20, - "marginTop": 5 - }, - "text": "Close" - }, - "type": "ia.input.button" - } - ], - "meta": { - "name": "Status" - }, - "position": { - "basis": "200px", - "shrink": 0 - }, - "props": { - "direction": "column", - "style": { - "borderColor": "#FFFFFF", - "borderStyle": "solid", - "borderWidth": 1 - } - }, - "type": "ia.container.flex" - }, - { - "children": [ - { - "meta": { - "name": "Label_0" - }, - "position": { - "basis": "36px", - "shrink": 0 - }, - "props": { - "style": { - "background-color": "#555555", - "fontWeight": "bold", - "textAlign": "center" - }, - "text": "Home Card View" - }, - "type": "ia.display.label" - }, - { - "children": [ - { - "custom": { - "buttonid": "status_filters/orderby" - }, - "events": { - "component": { - "onActionPerformed": { - "config": { - "script": "\tif self.props.selected:\n\t\tbuttonid \u003d self.custom.buttonid\n\t\tactivityLog.logger.callLogger(self.view, \u0027click\u0027, buttonid)\n\t\tactivityLog.productMetrics.callLogger(self.view, \u0027click\u0027, buttonid)" - }, - "scope": "G", - "type": "script" - } - } - }, - "meta": { - "name": "Order-By" - }, - "position": { - "basis": "36px" - }, - "propConfig": { - "props.selected": { - "binding": { - "config": { - "bidirectional": true, - "path": "session.custom.alarm_filter.orderby" - }, - "type": "property" - } - } - }, - "props": { - "checkedIcon": { - "color": { - "disabled": "#FFFFFF", - "enabled": "#FFFFFF" - } - }, - "style": { - "color": "#FFFFFF", - "fontFamily": "Arial", - "fontSize": 12, - "fontWeight": "bold", - "marginLeft": 10, - "marginRight": 10 - }, - "text": "Order Cards By Area" - }, - "type": "ia.input.checkbox" - }, - { - "meta": { - "name": "Label" - }, - "position": { - "basis": "32px", - "display": false - }, - "propConfig": { - "props.text": { - "binding": { - "config": { - "path": "view.params.viewFocus" - }, - "transforms": [ - { - "code": "#\tvalue \u003d value.split(\u0027/\u0027)\n#\tvalue \u003d value.pop()\n\n\treturn value", - "type": "script" - } - ], - "type": "property" - } - } - }, - "type": "ia.display.label" - } - ], - "meta": { - "name": "FlexContainer_0" - }, - "position": { - "basis": 65, - "grow": 1 - }, - "props": { - "direction": "column", - "justify": "space-between" - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "Accessibility" - }, - "position": { - "basis": "200px", - "shrink": 0 - }, - "props": { - "direction": "column", - "style": { - "borderColor": "#FFFFFF", - "borderStyle": "solid", - "borderWidth": 1 - } - }, - "type": "ia.container.flex" - } - ], - "meta": { - "name": "root" - }, - "props": { - "style": { - "classes": "Background-Styles/Controller" - } - }, - "type": "ia.container.flex" - } -} \ No newline at end of file diff --git a/.resources/de1a5ffc0c934d46e6485750f7264d3c33fec8318737b27013dadf7f8564633b b/.resources/de1a5ffc0c934d46e6485750f7264d3c33fec8318737b27013dadf7f8564633b deleted file mode 100644 index 7c18889b..00000000 Binary files a/.resources/de1a5ffc0c934d46e6485750f7264d3c33fec8318737b27013dadf7f8564633b and /dev/null differ diff --git a/.resources/eafcf8840cc7e2bcc83034928589acaffb80e3e1b693c936042bbc78b7c3c9bb b/.resources/eafcf8840cc7e2bcc83034928589acaffb80e3e1b693c936042bbc78b7c3c9bb deleted file mode 100644 index 4d4f186d..00000000 Binary files a/.resources/eafcf8840cc7e2bcc83034928589acaffb80e3e1b693c936042bbc78b7c3c9bb and /dev/null differ diff --git a/.resources/ec712aeed83accc8330aa4aec745561ec63e149d7137017994130778962781b6 b/.resources/ec712aeed83accc8330aa4aec745561ec63e149d7137017994130778962781b6 deleted file mode 100644 index c88c1c70..00000000 Binary files a/.resources/ec712aeed83accc8330aa4aec745561ec63e149d7137017994130778962781b6 and /dev/null differ diff --git a/.resources/fea40964842c9b1d6f1d8175d18d613b81aa89a80a86447d98eda0fa0fe7c279 b/.resources/fea40964842c9b1d6f1d8175d18d613b81aa89a80a86447d98eda0fa0fe7c279 deleted file mode 100644 index 26f9fbe2..00000000 Binary files a/.resources/fea40964842c9b1d6f1d8175d18d613b81aa89a80a86447d98eda0fa0fe7c279 and /dev/null differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlActions/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlActions/resource.json index 5772079b..78df90f0 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlActions/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlActions/resource.json @@ -9,9 +9,9 @@ ], "attributes": { "lastModification": { - "actor": "external", - "timestamp": "2025-08-28T09:46:53Z" + "actor": "admin", + "timestamp": "2025-10-01T12:25:15Z" }, - "lastModificationSignature": "ea40a1ce01b7292f5c19db61f25a18478f889e68fc3bebd1a04452d4234a35ad" + "lastModificationSignature": "d072e5e8ea47c667e8140f35d9030a336078988e05d2802c61f9d5e76a6d6b5f" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/resource.json index c8e18238..84b147a0 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-02T11:00:18Z" + "timestamp": "2025-10-01T12:28:39Z" }, - "lastModificationSignature": "b6a45e00501159a82bfca120fa0854856d024b93252a11351944a7de76fc7b85" + "lastModificationSignature": "e4067b173a2029ae19a5b0c7ce6519f39e0ff159563e5740bf4634e8040f95b6" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/view.json index f05b47d3..3814eaf2 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlAlarms/view.json @@ -12,21 +12,30 @@ "$": [ "ds", 192, - 1756810816047 + 1759321718962 ], "$columns": [ { - "data": [], + "data": [ + "MCM02", + "MCM02" + ], "name": "Location", "type": "String" }, { - "data": [], + "data": [ + "High", + "Low" + ], "name": "Priority", "type": "String" }, { - "data": [], + "data": [ + 1, + 2 + ], "name": "Count", "type": "Long" } @@ -60,7 +69,7 @@ "enabled": true, "rate": "3" }, - "queryPath": "Alarms-autStand/GetActiveAlarmsByLocationAndPriority" + "queryPath": "autStand/Alarms/GetActiveAlarmsByLocationAndPriority" }, "type": "query" }, diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json index 62618cb4..ba66dab9 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T14:52:55Z" + "timestamp": "2025-10-01T12:28:39Z" }, - "lastModificationSignature": "82fe10033dc0f7d34622625de96b56b94cdd37e8a748941e2989f86af46b003f" + "lastModificationSignature": "d2241e6430ee1be9ff7a1c067bd62784deae5b573948cd9867cb1a92625a6885" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json index 0d580a1f..2ad54416 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/CommandControlStatus/view.json @@ -4,26 +4,29 @@ "$": [ "ds", 192, - 1758293575644 + 1759321718962 ], "$columns": [ { "data": [ - "MCM01" + "MCM02", + "MCM02" ], "name": "Location", "type": "String" }, { "data": [ - "Diagnostic" + "High", + "Low" ], "name": "Priority", "type": "String" }, { "data": [ - 1 + 1, + 2 ], "name": "Count", "type": "Long" @@ -56,7 +59,7 @@ "enabled": true, "rate": "1" }, - "queryPath": "Alarms-autStand/GetActiveAlarmsByLocationAndPriority" + "queryPath": "autStand/Alarms/GetActiveAlarmsByLocationAndPriority" }, "type": "query" }, diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/resource.json index 898b7ba3..92720a13 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T13:57:26Z" + "timestamp": "2025-10-01T12:26:29Z" }, - "lastModificationSignature": "f9757d8cadae4ed13438f09285a0c19e3da471b488c9796efed1f16309b5227e" + "lastModificationSignature": "6ace5242e481b8101ad177cdc5c4750510d44eb2ed196660cc28b3a20d1434db" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/thumbnail.png index 7a610d41..1562f67e 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/view.json index ddabfe71..9b7d94e3 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Equipment/Controller-Views/ControllerStatus/view.json @@ -226,7 +226,6 @@ }, "props": { "params": { - "key": "value", "value": { "tagProps": [ null, @@ -515,7 +514,7 @@ "basis": "32px" }, "props": { - "text": 1, + "text": 0, "textStyle": { "fontSize": 10, "textAlign": "center" @@ -544,7 +543,7 @@ "basis": "32px" }, "props": { - "text": 1, + "text": 0, "textStyle": { "fontSize": 10, "textAlign": "center" @@ -609,7 +608,7 @@ "custom": { "counts": { "Critical": 0, - "Diagnostic": 1, + "Diagnostic": 0, "High": 0, "Low": 0, "Medium": 0 @@ -750,7 +749,7 @@ "enabled": true, "rate": "3" }, - "queryPath": "Alarms-autStand/GetActiveAlarmsByLocationAndPriority" + "queryPath": "autStand/Alarms/GetActiveAlarmsByLocationAndPriority" }, "type": "query" }, diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/resource.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/resource.json index 0d6493cd..d5f3e3c2 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/resource.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/resource.json @@ -10,8 +10,8 @@ "attributes": { "lastModification": { "actor": "admin", - "timestamp": "2025-09-19T13:52:23Z" + "timestamp": "2025-10-01T12:22:35Z" }, - "lastModificationSignature": "b3adc90e497ab6fff6603c0e67a6cbd1f86aa1d98b889b7d8677a38d2fccb942" + "lastModificationSignature": "924aff73ff04d86b5ca2184a2ac40de2d5000f710bf27f9a90623e62d13913f6" } } \ No newline at end of file diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/thumbnail.png b/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/thumbnail.png index 17018c84..b8e69569 100644 Binary files a/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/thumbnail.png and b/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/thumbnail.png differ diff --git a/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/view.json b/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/view.json index 0650e751..07b75fe9 100644 --- a/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/view.json +++ b/BNA8/com.inductiveautomation.perspective/views/autStand/Overview/Home/view.json @@ -1,7 +1,5 @@ { - "custom": { - "pageid": "card_view" - }, + "custom": {}, "params": {}, "props": { "defaultSize": { @@ -41,7 +39,7 @@ }, "subarea": "", "tagProps": [ - "MCM01", + "System/MCM01/MCM01", "value", "value", "value", @@ -68,7 +66,7 @@ }, "subarea": "", "tagProps": [ - "MCM02", + "System/MCM02/MCM02", "value", "value", "value",