exchange work

This commit is contained in:
2026-09-15 13:06:45 -05:00
parent 8a3a0acb75
commit 58610c1e1a
265 changed files with 33534 additions and 69 deletions

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,93 @@
{
"custom": {},
"params": {
"icon": null,
"message": null
},
"propConfig": {
"params.icon": {
"paramDirection": "input",
"persistent": false
},
"params.message": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "48px",
"shrink": 0
},
"propConfig": {
"props.path": {
"binding": {
"config": {
"path": "view.params.icon"
},
"transforms": [
{
"code": "\treturn 'material/' + (value or 'inbox')",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"color": "var(--neutral-50)",
"path": "material/inbox",
"style": {
"fontSize": "40px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Msg"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.message"
},
"transforms": [
{
"code": "\treturn value or 'No alarm events in the selected range'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/empty-state/empty"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"alignItems": "center",
"justifyContent": "center"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,16 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {
"lastModificationSignature": "44b87b06b842940d391b9bafd34557de0ac8a5005f6ee91844ac9dd2f18c0f04",
"lastModification": {
"actor": "admin",
"timestamp": "2026-07-16T20:14:21Z"
}
}
}

View File

@@ -0,0 +1,136 @@
{
"custom": {},
"params": {
"health": null
},
"propConfig": {
"params.health": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Grade"
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\tg = value['grade']\n\texcept:\n\t\tg = None\n\treturn 'exchange/alarm-analysis/grade/' + (g.lower() if g in ['A', 'B', 'C', 'D', 'F'] else 'na')",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['grade'] or 'N/A'\n\texcept:\n\t\treturn 'N/A'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "30px",
"paddingBottom": "2px",
"paddingLeft": "14px",
"paddingRight": "14px",
"paddingTop": "2px",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "Title"
},
"props": {
"style": {
"fontSize": "13px",
"fontWeight": "bold"
},
"text": "Alarm Health"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Score"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\ts = value['score']\n\t\treturn 'Score %d - click for detail' % round(s) if s is not None else 'no data in range'\n\texcept:\n\t\treturn 'no data in range'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "ScoreCol"
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.openPopup('exchange.alarmAnalysis.healthScore', 'Exchange/AlarmAnalysis/Popups/HealthScore', params = {'health': self.view.params.health}, showCloseIcon = True, draggable = True)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"props": {
"style": {
"alignItems": "center",
"cursor": "pointer",
"gap": "10px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,94 @@
{
"custom": {},
"params": {
"count": null,
"max": null
},
"propConfig": {
"params.count": {
"paramDirection": "input",
"persistent": false
},
"params.max": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Cell"
},
"position": {
"grow": 1
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.params.count"
},
"transforms": [
{
"code": "\ttry:\n\t\tm = self.view.params.max\n\t\tc = value or 0\n\t\tif not m or m <= 0 or c <= 0:\n\t\t\treturn 'rgba(59,125,216,0.06)'\n\t\ta = 0.15 + 0.85 * (float(c) / m)\n\t\treturn 'rgba(59,125,216,%.2f)' % min(a, 1.0)\n\texcept:\n\t\treturn 'rgba(59,125,216,0.06)'",
"type": "script"
}
],
"type": "property"
}
},
"props.style.color": {
"binding": {
"config": {
"path": "view.params.count"
},
"transforms": [
{
"code": "\ttry:\n\t\tm = self.view.params.max\n\t\tif m and value and float(value) / m > 0.55:\n\t\t\treturn '#FFFFFF'\n\texcept:\n\t\tpass\n\treturn 'var(--neutral-90)'",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.count"
},
"transforms": [
{
"code": "\treturn '' if not value else value",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"borderRadius": "2px",
"fontSize": "10px",
"marginBottom": "1px",
"marginRight": "1px",
"textAlign": "center"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "row",
"style": {
"alignItems": "stretch"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,121 @@
{
"custom": {},
"params": {
"icon": null,
"severity": null,
"tab": null,
"text": null
},
"propConfig": {
"params.icon": {
"paramDirection": "input",
"persistent": false
},
"params.severity": {
"paramDirection": "input",
"persistent": false
},
"params.tab": {
"paramDirection": "input",
"persistent": false
},
"params.text": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Icon"
},
"position": {
"basis": "24px",
"shrink": 0
},
"propConfig": {
"props.color": {
"binding": {
"config": {
"path": "view.params.severity"
},
"transforms": [
{
"code": "\tcolors = {0: '#D64550', 1: '#E8883A', 2: '#3B7DD8', 3: 'var(--neutral-60)'}\n\treturn colors.get(value, 'var(--neutral-60)')",
"type": "script"
}
],
"type": "property"
}
},
"props.path": {
"binding": {
"config": {
"path": "view.params.icon"
},
"transforms": [
{
"code": "\treturn 'material/' + (value or 'insights')",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"path": "material/insights",
"style": {
"fontSize": "18px"
}
},
"type": "ia.display.icon"
},
{
"meta": {
"name": "Text"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.text"
},
"transforms": [
{
"code": "\treturn value or ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "13px"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "row",
"style": {
"alignItems": "center",
"gap": "8px",
"paddingBottom": "4px",
"paddingTop": "4px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,16 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {
"lastModificationSignature": "75b1aa709e8638ac045f15b7a6d3543d023b8f3e886e2f9f1c263c0390c4fe9d",
"lastModification": {
"actor": "admin",
"timestamp": "2026-07-16T20:45:13Z"
}
}
}

View File

@@ -0,0 +1,204 @@
{
"custom": {},
"params": {
"delta": null,
"label": null,
"unit": null,
"value": null
},
"propConfig": {
"params.delta": {
"paramDirection": "input",
"persistent": false
},
"params.label": {
"paramDirection": "input",
"persistent": false
},
"params.unit": {
"paramDirection": "input",
"persistent": false
},
"params.value": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Lbl"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.label"
},
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted",
"lineHeight": "1.1"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "Value"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.value"
},
"transforms": [
{
"code": "\treturn value if value is not None else '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/kpi",
"lineHeight": "1.1"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Unit"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.unit"
},
"transforms": [
{
"code": "\treturn value or ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted",
"lineHeight": "1.1"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "ValueRow"
},
"position": {
"basis": "auto",
"grow": 1,
"shrink": 1
},
"props": {
"style": {
"alignItems": "baseline",
"gap": "4px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Chip"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.delta"
},
"transforms": [
{
"code": "\treturn value is not None",
"type": "script"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "view.params.delta"
},
"transforms": [
{
"code": "\tbase = 'exchange/alarm-analysis/chip/flat'\n\ttry:\n\t\tif value and value['good'] == True:\n\t\t\tbase = 'exchange/alarm-analysis/chip/good'\n\t\telif value and value['good'] == False:\n\t\t\tbase = 'exchange/alarm-analysis/chip/bad'\n\texcept:\n\t\tpass\n\treturn base",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.delta"
},
"transforms": [
{
"code": "\tif not value:\n\t\treturn ''\n\ttry:\n\t\tchip = exchange.alarmAnalysis.fmt.deltaChip(value)\n\t\treturn '%s %s' % (chip['arrow'], chip['text'])\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"alignSelf": "flex-start",
"padding": "0 6px"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"justifyContent": "space-between",
"overflow": "hidden",
"padding": "6px 12px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,137 @@
{
"custom": {},
"params": {
"count": null,
"pct": null,
"priorityName": null
},
"propConfig": {
"params.count": {
"paramDirection": "input",
"persistent": false
},
"params.pct": {
"paramDirection": "input",
"persistent": false
},
"params.priorityName": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Name"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.priorityName"
},
"transforms": [
{
"code": "\treturn value or 'Unknown'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "13px",
"fontWeight": "bold"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Count"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.count"
},
"transforms": [
{
"code": "\treturn exchange.alarmAnalysis.fmt.num(value)",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/big"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Pct"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.pct"
},
"transforms": [
{
"code": "\treturn exchange.alarmAnalysis.fmt.pct(value) + ' of events' if value is not None else ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"path": "view.params.priorityName"
},
"transforms": [
{
"code": "\tnames = ['Diagnostic', 'Low', 'Medium', 'High', 'Critical']\n\tn = value if value in names else 'Diagnostic'\n\treturn 'exchange/alarm-analysis/card exchange/alarm-analysis/priority-soft/' + n.lower()",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "column",
"style": {
"alignItems": "center",
"classes": "exchange/alarm-analysis/card",
"gap": "2px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,207 @@
{
"custom": {},
"params": {
"detail": null,
"key": null,
"label": null,
"score": null,
"weight": null
},
"propConfig": {
"params.detail": {
"paramDirection": "input",
"persistent": false
},
"params.key": {
"paramDirection": "input",
"persistent": false
},
"params.label": {
"paramDirection": "input",
"persistent": false
},
"params.score": {
"paramDirection": "input",
"persistent": false
},
"params.weight": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "Lbl"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.label"
},
"transforms": [
{
"code": "\treturn value or ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "13px",
"fontWeight": "bold"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Score"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.score"
},
"transforms": [
{
"code": "\treturn '%d' % round(value) if value is not None else 'N/A'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "13px",
"fontWeight": "bold"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "TopRow"
},
"props": {
"direction": "row",
"style": {
"justifyContent": "space-between"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [],
"meta": {
"name": "Fill"
},
"propConfig": {
"props.style.backgroundColor": {
"binding": {
"config": {
"path": "view.params.score"
},
"transforms": [
{
"code": "\ttry:\n\t\ts = float(value)\n\texcept:\n\t\treturn 'var(--neutral-40)'\n\tif s >= 80:\n\t\treturn '#2E9E5B'\n\tif s >= 60:\n\t\treturn '#E5C453'\n\treturn '#D64550'",
"type": "script"
}
],
"type": "property"
}
},
"props.style.width": {
"binding": {
"config": {
"path": "view.params.score"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn '%d%%' % max(0, min(100, round(value)))\n\texcept:\n\t\treturn '0%'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "row",
"style": {
"borderRadius": "4px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "Track"
},
"position": {
"basis": "8px",
"shrink": 0
},
"props": {
"direction": "row",
"style": {
"backgroundColor": "var(--neutral-30)",
"borderRadius": "4px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "Detail"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.detail"
},
"transforms": [
{
"code": "\treturn value or ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"gap": "2px",
"paddingBottom": "8px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,192 @@
{
"custom": {},
"params": {
"count": null,
"label": null,
"pct": null,
"rank": null,
"source": null
},
"propConfig": {
"params.count": {
"paramDirection": "input",
"persistent": false
},
"params.label": {
"paramDirection": "input",
"persistent": false
},
"params.pct": {
"paramDirection": "input",
"persistent": false
},
"params.rank": {
"paramDirection": "input",
"persistent": false
},
"params.source": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"meta": {
"name": "Rank"
},
"position": {
"basis": "24px",
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.rank"
},
"transforms": [
{
"code": "\treturn '#%s' % value if value is not None else ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Lbl"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.label"
},
"transforms": [
{
"code": "\treturn value or ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "13px",
"fontWeight": "bold"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Count"
},
"position": {
"basis": "56px",
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.count"
},
"transforms": [
{
"code": "\treturn exchange.alarmAnalysis.fmt.num(value)",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "13px",
"fontWeight": "bold",
"textAlign": "right"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Pct"
},
"position": {
"basis": "48px",
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.pct"
},
"transforms": [
{
"code": "\treturn exchange.alarmAnalysis.fmt.pct(value) if value is not None else ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted",
"textAlign": "right"
}
},
"type": "ia.display.label"
}
],
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.sendMessage('exchange.alarmAnalysis.focusSource', payload = {'source': self.view.params.source}, scope = 'page')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "root"
},
"props": {
"direction": "row",
"style": {
"alignItems": "center",
"borderBottomColor": "var(--neutral-30)",
"borderBottomStyle": "solid",
"borderBottomWidth": "1px",
"cursor": "pointer",
"gap": "8px",
"paddingBottom": "4px",
"paddingTop": "4px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,74 @@
{
"custom": {},
"params": {
"index": null,
"selectedTab": null,
"title": null
},
"propConfig": {
"params.index": {
"paramDirection": "input",
"persistent": false
},
"params.selectedTab": {
"paramDirection": "input",
"persistent": false
},
"params.title": {
"paramDirection": "input",
"persistent": false
}
},
"props": {},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tsystem.perspective.sendMessage('exchange.alarmAnalysis.setTab', payload = {'index': self.view.params.index}, scope = 'page')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "Btn"
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"expression": "if({view.params.index} = {view.params.selectedTab}, 'exchange/alarm-analysis/tab/active', 'exchange/alarm-analysis/tab/inactive')"
},
"type": "expr"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.title"
},
"type": "property"
}
}
},
"props": {},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "row",
"style": {
"alignItems": "center",
"justifyContent": "center"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,16 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {
"lastModificationSignature": "04bdfb9c4eecc4f8cf35a85994e6790ef8d62a1d1aa00553e4dc4193e171a110",
"lastModification": {
"actor": "admin",
"timestamp": "2026-07-16T20:31:35Z"
}
}
}

View File

@@ -0,0 +1,487 @@
{
"custom": {
"bundle": null,
"query": {
"areas": [],
"endMs": 0,
"priorities": [],
"rangePreset": "8h",
"refreshToken": 0,
"search": "",
"startMs": 0,
"states": []
},
"ui": {
"badActorFocus": "",
"selectedTab": 0
}
},
"events": {
"system": {
"onStartup": {
"config": {
"script": "\tq = self.view.custom.query\n\tif not q.startMs or q.startMs == 0:\n\t\tnow = system.date.toMillis(system.date.now())\n\t\tq.endMs = now\n\t\tq.startMs = now - 8 * 3600 * 1000\n\t\tq.rangePreset = '8h'"
},
"scope": "G",
"type": "script"
}
}
},
"params": {},
"propConfig": {
"custom.bundle": {
"binding": {
"config": {
"expression": "{view.custom.query.refreshToken} + '|' + {view.custom.query.startMs} + '|' + {view.custom.query.endMs}"
},
"transforms": [
{
"code": "\tq = self.view.custom.query\n\tif not q.startMs or not q.endMs:\n\t\treturn None\n\treturn exchange.alarmAnalysis.alarms.getDashboardBundle(q.startMs, q.endMs, {'priorities': list(q.priorities), 'areas': list(q.areas), 'states': list(q.states), 'search': q.search})",
"type": "script"
}
],
"type": "expr"
}
},
"custom.query": {
"persistent": false
},
"custom.ui": {
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 900,
"width": 1600
}
},
"root": {
"children": [
{
"meta": {
"name": "Header"
},
"position": {
"basis": "150px",
"shrink": 0
},
"propConfig": {
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
},
"props.params.query": {
"binding": {
"config": {
"path": "view.custom.query"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Shell/Header"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "FilterBar"
},
"position": {
"basis": "auto",
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.custom.ui.selectedTab} != 0"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
},
"props.params.query": {
"binding": {
"config": {
"path": "view.custom.query"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Shell/FilterBar",
"style": {
"minHeight": "56px"
}
},
"type": "ia.display.view"
},
{
"children": [
{
"meta": {
"name": "TabBtn0"
},
"position": {
"basis": "140px",
"shrink": 0
},
"propConfig": {
"props.params.selectedTab": {
"binding": {
"config": {
"path": "view.custom.ui.selectedTab"
},
"type": "property"
}
}
},
"props": {
"params": {
"index": 0,
"title": "Overview"
},
"path": "Exchange/AlarmAnalysis/Components/TabButton"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabBtn1"
},
"position": {
"basis": "140px",
"shrink": 0
},
"propConfig": {
"props.params.selectedTab": {
"binding": {
"config": {
"path": "view.custom.ui.selectedTab"
},
"type": "property"
}
}
},
"props": {
"params": {
"index": 1,
"title": "Analysis"
},
"path": "Exchange/AlarmAnalysis/Components/TabButton"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabBtn2"
},
"position": {
"basis": "140px",
"shrink": 0
},
"propConfig": {
"props.params.selectedTab": {
"binding": {
"config": {
"path": "view.custom.ui.selectedTab"
},
"type": "property"
}
}
},
"props": {
"params": {
"index": 2,
"title": "Bad Actors"
},
"path": "Exchange/AlarmAnalysis/Components/TabButton"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabBtn3"
},
"position": {
"basis": "140px",
"shrink": 0
},
"propConfig": {
"props.params.selectedTab": {
"binding": {
"config": {
"path": "view.custom.ui.selectedTab"
},
"type": "property"
}
}
},
"props": {
"params": {
"index": 3,
"title": "Journal"
},
"path": "Exchange/AlarmAnalysis/Components/TabButton"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "TabBar"
},
"position": {
"basis": "42px",
"shrink": 0
},
"props": {
"style": {
"borderBottomColor": "var(--neutral-40)",
"borderBottomStyle": "solid",
"borderBottomWidth": "1px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "TabOverview"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.custom.ui.selectedTab} = 0"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Tabs/Overview"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabAnalysis"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.custom.ui.selectedTab} = 1"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Tabs/Analysis"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabBadActors"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.custom.ui.selectedTab} = 2"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
},
"props.params.focus": {
"binding": {
"config": {
"path": "view.custom.ui.badActorFocus"
},
"type": "property"
}
},
"props.params.query": {
"binding": {
"config": {
"path": "view.custom.query"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Tabs/BadActors"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "TabJournal"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{view.custom.ui.selectedTab} = 3"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
},
"props.params.query": {
"binding": {
"config": {
"path": "view.custom.query"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Tabs/Journal"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "TabContent"
},
"position": {
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/page-bg",
"gap": "10px"
}
},
"scripts": {
"customMethods": [],
"extensionFunctions": null,
"messageHandlers": [
{
"messageType": "exchange.alarmAnalysis.setTab",
"pageScope": true,
"script": "\ttry:\n\t\tself.view.custom.ui.selectedTab = int(payload['index'])\n\texcept:\n\t\tpass",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exchange.alarmAnalysis.focusSource",
"pageScope": true,
"script": "\ttry:\n\t\tself.view.custom.ui.badActorFocus = payload['source'] or ''\n\t\tself.view.custom.ui.selectedTab = 2\n\texcept:\n\t\tpass",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exchange.alarmAnalysis.clearFocus",
"pageScope": true,
"script": "\tself.view.custom.ui.badActorFocus = ''",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exchange.alarmAnalysis.applyFilters",
"pageScope": true,
"script": "\tq = self.view.custom.query\n\ttry:\n\t\tq.priorities = list(payload['priorities'] or [])\n\t\tq.areas = list(payload['areas'] or [])\n\t\tq.states = list(payload['states'] or [])\n\t\tq.search = str(payload['search'] or '')\n\texcept:\n\t\tpass\n\tq.refreshToken = q.refreshToken + 1",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exchange.alarmAnalysis.clearFilters",
"pageScope": true,
"script": "\tq = self.view.custom.query\n\tq.priorities = []\n\tq.areas = []\n\tq.states = []\n\tq.search = ''\n\tq.refreshToken = q.refreshToken + 1",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exchange.alarmAnalysis.setRange",
"pageScope": true,
"script": "\tspans = {'4h': 4, '8h': 8, '24h': 24, '7d': 168}\n\ttry:\n\t\tpreset = payload['preset']\n\texcept:\n\t\treturn\n\tif preset not in spans:\n\t\treturn\n\tq = self.view.custom.query\n\tnow = system.date.toMillis(system.date.now())\n\tq.endMs = now\n\tq.startMs = now - spans[preset] * 3600 * 1000\n\tq.rangePreset = preset\n\tq.refreshToken = q.refreshToken + 1",
"sessionScope": false,
"viewScope": false
},
{
"messageType": "exchange.alarmAnalysis.refresh",
"pageScope": true,
"script": "\tq = self.view.custom.query\n\tspans = {'4h': 4, '8h': 8, '24h': 24, '7d': 168}\n\tnow = system.date.toMillis(system.date.now())\n\thours = spans.get(q.rangePreset)\n\tif hours is not None:\n\t\tspan = hours * 3600 * 1000\n\telse:\n\t\tspan = q.endMs - q.startMs\n\tif span > 0:\n\t\tq.endMs = now\n\t\tq.startMs = now - span\n\tq.refreshToken = q.refreshToken + 1",
"sessionScope": false,
"viewScope": false
}
]
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,16 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {
"lastModificationSignature": "1d6feda3a22e57c52a032bea5ed828b0b7836e249e46a68faa58af39207b9119",
"lastModification": {
"actor": "admin",
"timestamp": "2026-07-16T20:41:00Z"
}
}
}

View File

@@ -0,0 +1,805 @@
{
"custom": {
"detail": null
},
"params": {
"endMs": null,
"label": null,
"source": null,
"startMs": null
},
"propConfig": {
"custom.detail": {
"binding": {
"config": {
"expression": "{view.params.source} + '|' + {view.params.startMs} + '|' + {view.params.endMs}"
},
"transforms": [
{
"code": "\ttry:\n\t\tsrc = self.view.params.source\n\texcept:\n\t\tsrc = None\n\tif not src:\n\t\treturn None\n\ttry:\n\t\treturn exchange.alarmAnalysis.alarms.getSourceDetail(src, self.view.params.startMs, self.view.params.endMs)\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "expr"
}
},
"params.endMs": {
"paramDirection": "input",
"persistent": false
},
"params.label": {
"paramDirection": "input",
"persistent": false
},
"params.source": {
"paramDirection": "input",
"persistent": false
},
"params.startMs": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 660,
"width": 720
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "LblTitle"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.label"
},
"transforms": [
{
"code": "\tif value:\n\t\treturn value\n\ttry:\n\t\treturn self.view.params.source or 'Alarm Detail'\n\texcept:\n\t\treturn 'Alarm Detail'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/big"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LblArea"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['area'] or ''\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "HeaderCol"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"meta": {
"name": "KpiCount"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.value": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['stats']['count'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Activations"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiTta"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.value": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.dur(value['stats']['avg_tta_ms'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Avg Time to Ack"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiActive"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.value": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.dur(value['stats']['avg_active_ms'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Avg Active Time"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiFleeting"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.value": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['stats']['fleeting_count'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Fleeting"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "StatsRow"
},
"position": {
"basis": "88px",
"shrink": 0
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblDailyTitle"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/card-title"
},
"text": "Daily activity"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "RepDaily"
},
"position": {
"basis": "72px",
"shrink": 0
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\tdaily = list(value['daily'] or [])\n\texcept:\n\t\tdaily = []\n\tcounts = []\n\tfor d in daily:\n\t\ttry:\n\t\t\tcounts.append(int(d['count']))\n\t\texcept:\n\t\t\tcounts.append(0)\n\tif not counts:\n\t\treturn []\n\tm = max(counts)\n\treturn [{'count': c, 'max': m} for c in counts]",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"elementPosition": {
"basis": "8px"
},
"path": "Exchange/AlarmAnalysis/Components/HeatmapCell",
"style": {
"gap": "2px"
},
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
},
{
"meta": {
"name": "LblDailyRange"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\tdaily = list(value['daily'] or [])\n\texcept:\n\t\tdaily = []\n\tif not daily:\n\t\treturn 'No activity in range'\n\ttry:\n\t\treturn 'Activations per day, %s - %s' % (exchange.alarmAnalysis.fmt.dayClock(daily[0]['t0']), exchange.alarmAnalysis.fmt.dayClock(daily[-1]['t0']))\n\texcept:\n\t\treturn 'Activations per day'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "CardDaily"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"gap": "6px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblAckTitle"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/card-title"
},
"text": "Top ack users"
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "Ack0"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn len(value['stats']['top_ack_users']) > 0\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\tu = value['stats']['top_ack_users'][0]\n\t\treturn '%s (%d)' % (u['user'], u['count'])\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/chip/flat",
"paddingBottom": "2px",
"paddingTop": "2px"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Ack1"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn len(value['stats']['top_ack_users']) > 1\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\tu = value['stats']['top_ack_users'][1]\n\t\treturn '%s (%d)' % (u['user'], u['count'])\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/chip/flat",
"paddingBottom": "2px",
"paddingTop": "2px"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "Ack2"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn len(value['stats']['top_ack_users']) > 2\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\tu = value['stats']['top_ack_users'][2]\n\t\treturn '%s (%d)' % (u['user'], u['count'])\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/chip/flat",
"paddingBottom": "2px",
"paddingTop": "2px"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LblNoAcks"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn len(value['stats']['top_ack_users']) == 0\n\texcept:\n\t\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": "No acknowledgements in range"
},
"type": "ia.display.label"
}
],
"meta": {
"name": "AckRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"gap": "6px"
},
"wrap": "wrap"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "CardAcks"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"gap": "6px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblEvTitle"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/card-title"
},
"text": "Recent events"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "TblEvents"
},
"position": {
"grow": 1
},
"propConfig": {
"props.data": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\tout = []\n\ttry:\n\t\trows = list(value['events'] or [])\n\texcept:\n\t\trows = []\n\tfor r in rows[:25]:\n\t\ttry:\n\t\t\tout.append({'time_label': r['time_label'], 'state_label': r['state_label'], 'ack_user': r['ack_user'] or ''})\n\t\texcept:\n\t\t\tpass\n\treturn out",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"cells": {
"style": {
"padding": "5px"
}
},
"columns": [
{
"field": "time_label",
"header": {
"title": "Time"
},
"render": "string",
"sortable": false,
"strictWidth": true,
"width": 160
},
{
"field": "state_label",
"header": {
"title": "State"
},
"render": "string",
"sortable": false,
"strictWidth": true,
"width": 110
},
{
"field": "ack_user",
"header": {
"title": "Ack by"
},
"render": "string",
"sortable": false
}
],
"emptyMessage": {
"noData": {
"text": "No events in range"
}
},
"pager": {
"bottom": false
}
},
"type": "ia.display.table"
}
],
"meta": {
"name": "CardEvents"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"gap": "6px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "BodyCol"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\tif value is None:\n\t\treturn False\n\ttry:\n\t\treturn not value['error']\n\texcept:\n\t\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "column",
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "EmptyWrap"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.detail"
},
"transforms": [
{
"code": "\tif value is None:\n\t\treturn True\n\ttry:\n\t\treturn bool(value['error'])\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"icon": "notifications_off",
"message": "No journal data for this alarm in the selected range"
},
"path": "Exchange/AlarmAnalysis/Components/EmptyState"
},
"type": "ia.display.view"
},
{
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.closePopup('exchange.alarmAnalysis.alarmDetail')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnClose"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"text": "Close"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FooterRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"justify": "flex-end"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/page-bg",
"gap": "10px",
"padding": "16px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,665 @@
{
"custom": {
"props": []
},
"params": {
"event": null
},
"propConfig": {
"custom.props": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\tev = value\n\tif not ev:\n\t\treturn []\n\ttry:\n\t\tres = exchange.alarmAnalysis.alarms.getEventData(ev['id'], ev['time_ms'], ev['source'])\n\t\treturn res['props'] or []\n\texcept:\n\t\treturn []",
"type": "script"
}
],
"type": "property"
}
},
"params.event": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 580,
"width": 580
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "LblTitle"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['label'] or value['source'] or 'Event Detail'\n\texcept:\n\t\treturn 'Event Detail'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/big"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "ChipState"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\treturn value is not None",
"type": "script"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\ts = value['state']\n\texcept:\n\t\ts = None\n\tif s == 'ack':\n\t\treturn 'exchange/alarm-analysis/state/acked'\n\tif s == 'clear':\n\t\treturn 'exchange/alarm-analysis/state/cleared'\n\treturn 'exchange/alarm-analysis/state/active'",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['state_label'] or ''\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"borderRadius": "10px",
"fontSize": "11px",
"paddingBottom": "2px",
"paddingLeft": "8px",
"paddingRight": "8px",
"paddingTop": "2px"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "ChipPriority"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\treturn value is not None",
"type": "script"
}
],
"type": "property"
}
},
"props.style.classes": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\tp = value['priority_name']\n\texcept:\n\t\tp = None\n\tif p not in ['Diagnostic', 'Low', 'Medium', 'High', 'Critical']:\n\t\tp = 'Diagnostic'\n\treturn 'exchange/alarm-analysis/priority/' + p.lower()",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['priority_name'] or ''\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"borderRadius": "10px",
"fontSize": "11px",
"paddingBottom": "2px",
"paddingLeft": "8px",
"paddingRight": "8px",
"paddingTop": "2px"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "HeaderRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"gap": "8px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "K"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": "Time"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "V"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['time_label'] or exchange.alarmAnalysis.fmt.dayClock(value['time_ms'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {},
"type": "ia.display.label"
}
],
"meta": {
"name": "RowTime"
},
"props": {
"style": {
"gap": "8px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "K"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": "Source"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "V"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['source'] or '--'\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"overflowWrap": "anywhere"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "RowSource"
},
"props": {
"style": {
"gap": "8px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "K"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": "Area"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "V"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['area'] or '--'\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {},
"type": "ia.display.label"
}
],
"meta": {
"name": "RowArea"
},
"props": {
"style": {
"gap": "8px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "K"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": "Ack by"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "V"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['ack_user'] or '--'\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {},
"type": "ia.display.label"
}
],
"meta": {
"name": "RowAck"
},
"props": {
"style": {
"gap": "8px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "CardCore"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"gap": "4px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblPropsTitle"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/card-title"
},
"text": "Event properties"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "TblProps"
},
"position": {
"grow": 1
},
"propConfig": {
"props.data": {
"binding": {
"config": {
"path": "view.custom.props"
},
"transforms": [
{
"code": "\tout = []\n\tfor p in (value or []):\n\t\ttry:\n\t\t\tv = p['value']\n\t\t\tout.append({'name': '%s' % p['name'], 'value': '' if v is None else '%s' % v})\n\t\texcept:\n\t\t\tpass\n\treturn out",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"cells": {
"style": {
"padding": "5px"
}
},
"columns": [
{
"field": "name",
"header": {
"title": "Property"
},
"render": "string",
"sortable": false,
"strictWidth": true,
"width": 180
},
{
"field": "value",
"header": {
"title": "Value"
},
"render": "string",
"sortable": false
}
],
"emptyMessage": {
"noData": {
"text": "No extended properties for this event"
}
},
"pager": {
"bottom": false,
"top": false
}
},
"type": "ia.display.table"
}
],
"meta": {
"name": "CardProps"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"gap": "6px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "BodyCol"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\treturn value is not None",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "column",
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "EmptyWrap"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.event"
},
"transforms": [
{
"code": "\treturn value is None",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"icon": "info",
"message": "No event selected"
},
"path": "Exchange/AlarmAnalysis/Components/EmptyState"
},
"type": "ia.display.view"
},
{
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.closePopup('exchange.alarmAnalysis.eventDetail')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnClose"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"primary": true,
"text": "Close"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FooterRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"justify": "flex-end"
},
"type": "ia.container.flex"
}
],
"custom": {},
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/page-bg",
"gap": "10px",
"padding": "16px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,318 @@
{
"custom": {},
"params": {
"health": null
},
"propConfig": {
"params.health": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 540,
"width": 540
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "GradeChip"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.style.classes": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\tg = value['grade']\n\texcept:\n\t\tg = None\n\treturn 'exchange/alarm-analysis/grade/' + (g.lower() if g in ['A', 'B', 'C', 'D', 'F'] else 'na')",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['grade'] or 'N/A'\n\texcept:\n\t\treturn 'N/A'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontSize": "38px",
"paddingBottom": "4px",
"paddingLeft": "18px",
"paddingRight": "18px",
"paddingTop": "4px",
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"children": [
{
"meta": {
"name": "LblTitle"
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/big"
},
"text": "Alarm Health Score"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LblScore"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\ts = value['score']\n\texcept:\n\t\ts = None\n\tif s is None:\n\t\treturn 'No data in selected range'\n\treturn 'Overall score %s / 100' % exchange.alarmAnalysis.fmt.num(s, 1)",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "TitleCol"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"justify": "center"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "HeaderRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"gap": "14px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblSubsTitle"
},
"position": {
"shrink": 0
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/card-title"
},
"text": "Component scores"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "RepSubs"
},
"position": {
"grow": 1
},
"propConfig": {
"props.instances": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\tsubs = value['subs'] or []\n\texcept:\n\t\tsubs = []\n\tout = []\n\tfor s in subs:\n\t\ttry:\n\t\t\tout.append({'key': s['key'], 'label': s['label'], 'score': s['score'], 'weight': s['weight'], 'detail': s['detail']})\n\t\texcept:\n\t\t\tpass\n\treturn out",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"direction": "column",
"elementPosition": {
"basis": "64px",
"grow": 0,
"shrink": 0
},
"path": "Exchange/AlarmAnalysis/Components/ScoreBar",
"style": {
"overflowY": "auto"
},
"useDefaultViewHeight": false,
"useDefaultViewWidth": false
},
"type": "ia.display.flex-repeater"
},
{
"meta": {
"name": "EmptyWrap"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.health"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn not (value and value['subs'])\n\texcept:\n\t\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"icon": "assessment",
"message": "No health data in the selected range"
},
"path": "Exchange/AlarmAnalysis/Components/EmptyState"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "CardSubs"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"gap": "6px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblCaption"
},
"position": {
"grow": 1,
"shrink": 1
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": "Weighted ISA-18.2 composite: rate, flood, chattering, standing, priority mix"
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.closePopup('exchange.alarmAnalysis.healthScore')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnClose"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"primary": true,
"text": "Close"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FooterRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"justify": "space-between",
"style": {
"gap": "12px"
}
},
"type": "ia.container.flex"
}
],
"custom": {},
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/page-bg",
"gap": "12px",
"padding": "16px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,210 @@
{
"custom": {
"report": null
},
"params": {
"refreshToken": null
},
"propConfig": {
"custom.report": {
"binding": {
"config": {
"expression": "{view.params.refreshToken}"
},
"transforms": [
{
"code": "\ttry:\n\t\tr = exchange.alarmAnalysis.alarms.getShiftReportText()\n\t\tif r and r['text']:\n\t\t\treturn r\n\texcept:\n\t\tpass\n\treturn {'text': 'Report unavailable', 'start_ms': 0, 'end_ms': 0, 'label': ''}",
"type": "script"
}
],
"type": "expr"
}
},
"params.refreshToken": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 560,
"width": 620
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "LblTitle"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.report"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['label'] or 'Shift Report'\n\texcept:\n\t\treturn 'Shift Report'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/big"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LblWindow"
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.report"
},
"transforms": [
{
"code": "\ttry:\n\t\ts = value['start_ms']\n\t\te = value['end_ms']\n\texcept:\n\t\treturn ''\n\tif not s or not e:\n\t\treturn ''\n\treturn '%s - %s' % (exchange.alarmAnalysis.fmt.dayClock(s), exchange.alarmAnalysis.fmt.dayClock(e))",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "HeaderCol"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "LblText"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.report"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['text'] or 'Report unavailable'\n\texcept:\n\t\treturn 'Report unavailable'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"fontFamily": "monospace",
"fontSize": "12px",
"lineHeight": "1.5",
"whiteSpace": "pre-wrap"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "CardText"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card",
"overflowY": "auto"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.closePopup('exchange.alarmAnalysis.shiftReport')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnClose"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"primary": true,
"text": "Close"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "FooterRow"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"justify": "flex-end"
},
"type": "ia.container.flex"
}
],
"custom": {},
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/page-bg",
"gap": "12px",
"padding": "16px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,282 @@
{
"custom": {},
"params": {
"bundle": null,
"query": null
},
"propConfig": {
"params.bundle": {
"paramDirection": "input",
"persistent": false
},
"params.query": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 56,
"width": 1600
}
},
"root": {
"children": [
{
"meta": {
"name": "DdPriority"
},
"position": {
"basis": "170px",
"shrink": 0
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": "view.params.bundle.meta.priorities_seen"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn [{'value': p['value'], 'label': p['label']} for p in (value or [])]\n\texcept:\n\t\treturn []",
"type": "script"
}
],
"type": "property"
}
},
"props.value": {
"binding": {
"config": {
"path": "view.params.query.priorities"
},
"type": "property"
}
}
},
"props": {
"multiSelect": true,
"placeholder": {
"text": "Priority"
},
"style": {
"maxWidth": "280px"
},
"wrapMultiSelectValues": true
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "DdArea"
},
"position": {
"basis": "170px",
"shrink": 0
},
"propConfig": {
"props.options": {
"binding": {
"config": {
"path": "view.params.bundle.meta.areas"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn [{'value': a, 'label': a} for a in (value or [])]\n\texcept:\n\t\treturn []",
"type": "script"
}
],
"type": "property"
}
},
"props.value": {
"binding": {
"config": {
"path": "view.params.query.areas"
},
"type": "property"
}
}
},
"props": {
"multiSelect": true,
"placeholder": {
"text": "Area"
},
"style": {
"maxWidth": "280px"
},
"wrapMultiSelectValues": true
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "DdState"
},
"position": {
"basis": "170px",
"shrink": 0
},
"propConfig": {
"props.value": {
"binding": {
"config": {
"path": "view.params.query.states"
},
"type": "property"
}
}
},
"props": {
"multiSelect": true,
"options": [
{
"label": "Active",
"value": "active"
},
{
"label": "Cleared",
"value": "cleared"
},
{
"label": "Acked",
"value": "acked"
},
{
"label": "Unacked",
"value": "unacked"
}
],
"placeholder": {
"text": "State"
},
"style": {
"maxWidth": "280px"
},
"wrapMultiSelectValues": true
},
"type": "ia.input.dropdown"
},
{
"meta": {
"name": "TxtSearch"
},
"position": {
"basis": "240px",
"shrink": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.query.search"
},
"type": "property"
}
}
},
"props": {
"deferUpdates": true,
"placeholder": "Search source/label..."
},
"type": "ia.input.text-field"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttry:\n\t\tfilters = {\n\t\t\t'priorities': list(self.getSibling('DdPriority').props.value or []),\n\t\t\t'areas': list(self.getSibling('DdArea').props.value or []),\n\t\t\t'states': list(self.getSibling('DdState').props.value or []),\n\t\t\t'search': str(self.getSibling('TxtSearch').props.text or '')\n\t\t}\n\texcept:\n\t\tfilters = {'priorities': [], 'areas': [], 'states': [], 'search': ''}\n\tsystem.perspective.sendMessage('exchange.alarmAnalysis.applyFilters', payload = filters, scope = 'page')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnApply"
},
"position": {
"basis": "80px",
"shrink": 0
},
"props": {
"primary": true,
"text": "Apply"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttry:\n\t\tself.getSibling('DdPriority').props.value = []\n\t\tself.getSibling('DdArea').props.value = []\n\t\tself.getSibling('DdState').props.value = []\n\t\tself.getSibling('TxtSearch').props.text = ''\n\texcept:\n\t\tpass\n\tsystem.perspective.sendMessage('exchange.alarmAnalysis.clearFilters', payload = {}, scope = 'page')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnClear"
},
"position": {
"basis": "80px",
"shrink": 0
},
"props": {
"primary": false,
"text": "Clear"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "LblEventCount"
},
"position": {
"grow": 1
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\tn = value['meta']['event_count']\n\texcept:\n\t\tn = None\n\tif n is None:\n\t\treturn ''\n\treturn '%s events in range' % exchange.alarmAnalysis.fmt.num(n)",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"textStyle": {
"textAlign": "right"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"props": {
"alignItems": "center",
"direction": "row",
"style": {
"classes": "exchange/alarm-analysis/toolbar",
"gap": "8px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,16 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {
"lastModificationSignature": "ad9c36584854ed67b341f681e7992b6264caf658ed334102fa088a1cc84012fd",
"lastModification": {
"actor": "admin",
"timestamp": "2026-07-16T20:47:54Z"
}
}
}

View File

@@ -0,0 +1,704 @@
{
"custom": {},
"params": {
"bundle": null,
"query": null
},
"propConfig": {
"params.bundle": {
"paramDirection": "input",
"persistent": false
},
"params.query": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 165,
"width": 1600
}
},
"root": {
"children": [
{
"children": [
{
"children": [
{
"meta": {
"name": "LblTitle"
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/big"
},
"text": "Alarm Analysis"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LblSubtitle"
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"text": ""
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Titles"
},
"position": {
"shrink": 0
},
"props": {
"direction": "column",
"justify": "center"
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "ChipTruncated"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn bool(value['meta']['truncated'])\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted",
"color": "#E8883A"
},
"text": "data truncated \u2014 narrow the range"
},
"type": "ia.display.label"
},
{
"meta": {
"name": "ChipError"
},
"position": {
"shrink": 0
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn bool(value['meta']['error'])\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['meta']['error'] or ''\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted",
"color": "#D64550"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "Chips"
},
"position": {
"grow": 1
},
"props": {
"alignItems": "center",
"justify": "flex-end",
"style": {
"gap": "8px",
"paddingRight": "12px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage('exchange.alarmAnalysis.setRange', payload = {'preset': event.value}, scope = 'page')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DdRange"
},
"position": {
"basis": "150px",
"shrink": 0
},
"propConfig": {
"props.value": {
"binding": {
"config": {
"path": "view.params.query.rangePreset"
},
"type": "property"
}
}
},
"props": {
"options": [
{
"label": "Last 4 hours",
"value": "4h"
},
{
"label": "Last 8 hours",
"value": "8h"
},
{
"label": "Last 24 hours",
"value": "24h"
},
{
"label": "Last 7 days",
"value": "7d"
}
],
"placeholder": {
"text": "Range"
}
},
"type": "ia.input.dropdown"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.sendMessage('exchange.alarmAnalysis.refresh', payload = {}, scope = 'page')"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnRefresh"
},
"position": {
"basis": "90px",
"shrink": 0
},
"props": {
"image": {
"height": 15
},
"primary": false,
"text": "Refresh"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\tsystem.perspective.openPopup('exchange.alarmAnalysis.shiftReport', 'Exchange/AlarmAnalysis/Popups/ShiftReport', params = {'refreshToken': self.view.params.query.refreshToken}, showCloseIcon = True, draggable = True)"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnShiftReport"
},
"position": {
"basis": "120px",
"shrink": 0
},
"props": {
"image": {
"height": 15
},
"text": "Shift Report"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Controls"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"gap": "8px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "RowTop"
},
"position": {
"basis": "55px",
"shrink": 0
},
"props": {
"alignItems": "center",
"justify": "space-between",
"style": {
"gap": "12px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"meta": {
"name": "Gauge"
},
"position": {
"basis": "230px",
"shrink": 0
},
"propConfig": {
"props.params.health": {
"binding": {
"config": {
"path": "view.params.bundle.health"
},
"type": "property"
}
}
},
"props": {
"path": "Exchange/AlarmAnalysis/Components/HealthGauge",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiActivations"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['activations']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['kpis']['activations']['value'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Activations"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiRate"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['rate_per_hr']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['kpis']['rate_per_hr']['value'], 1)\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Rate",
"unit": "/hr"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiActiveNow"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['active_now']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['kpis']['active_now']['value'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Active Now"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiUnacked"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['unacked_now']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['kpis']['unacked_now']['value'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Unacked"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiMtta"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['mtta_ms']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.dur(value['kpis']['mtta_ms']['value'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "MTTA"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiFlood"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['flood_pct']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.pct(value['kpis']['flood_pct']['value'], 1)\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Flood Time"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
},
{
"meta": {
"name": "KpiChatter"
},
"position": {
"basis": "100px",
"grow": 1
},
"propConfig": {
"props.params.delta": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['kpis']['chatter_count']\n\texcept:\n\t\treturn None",
"type": "script"
}
],
"type": "property"
}
},
"props.params.value": {
"binding": {
"config": {
"path": "view.params.bundle"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn exchange.alarmAnalysis.fmt.num(value['kpis']['chatter_count']['value'])\n\texcept:\n\t\treturn '--'",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"label": "Chattering"
},
"path": "Exchange/AlarmAnalysis/Components/KpiCard",
"style": {
"overflow": "hidden"
}
},
"type": "ia.display.view"
}
],
"meta": {
"name": "RowKpis"
},
"position": {
"grow": 1
},
"props": {
"style": {
"gap": "10px"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/toolbar",
"gap": "8px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,16 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {
"lastModificationSignature": "7504c7695ab45f2fc1d0d6dc8071e96746ac068f99e878d3ca1dcf804c9eea76",
"lastModification": {
"actor": "admin",
"timestamp": "2026-07-16T20:38:41Z"
}
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}

View File

@@ -0,0 +1,484 @@
{
"custom": {
"page": 0,
"pageData": null
},
"params": {
"bundle": null,
"query": null
},
"propConfig": {
"custom.pageData": {
"binding": {
"config": {
"expression": "{view.params.query.refreshToken} + '|' + {view.params.query.startMs} + '|' + {view.params.query.endMs} + '|' + {view.custom.page}"
},
"transforms": [
{
"code": "\tsafe = {'rows': [], 'total': 0, 'page': 0, 'page_size': 50, 'truncated': False, 'error': None}\n\ttry:\n\t\tq = self.view.params.query\n\t\tif not q.startMs or not q.endMs:\n\t\t\treturn safe\n\t\ttry:\n\t\t\tpage = max(0, int(self.view.custom.page or 0))\n\t\texcept:\n\t\t\tpage = 0\n\t\treturn exchange.alarmAnalysis.alarms.getJournalPage(q.startMs, q.endMs, {'priorities': list(q.priorities), 'areas': list(q.areas), 'states': list(q.states), 'search': q.search}, page, 50)\n\texcept:\n\t\timport sys\n\t\tsafe['error'] = '%s' % (sys.exc_info()[1],)\n\t\treturn safe",
"type": "script"
}
],
"type": "expr"
}
},
"params.bundle": {
"paramDirection": "input",
"persistent": false
},
"params.query": {
"paramDirection": "input",
"persistent": false
}
},
"props": {
"defaultSize": {
"height": 800,
"width": 1600
}
},
"root": {
"children": [
{
"children": [
{
"meta": {
"name": "LblTotal"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\ttotal = int(value['total'] or 0)\n\texcept:\n\t\ttotal = 0\n\ttry:\n\t\ttxt = '%s events' % exchange.alarmAnalysis.fmt.num(total)\n\texcept:\n\t\ttxt = '%d events' % total\n\ttry:\n\t\tif value['truncated']:\n\t\t\ttxt = txt + ' (truncated)'\n\texcept:\n\t\tpass\n\treturn txt",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"textStyle": {
"fontWeight": "bold"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "LblError"
},
"position": {
"shrink": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn bool(value['error'])\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
},
"props.text": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn value['error'] or ''\n\texcept:\n\t\treturn ''",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted",
"color": "#D64550"
}
},
"type": "ia.display.label"
},
{
"children": [],
"meta": {
"name": "Spacer"
},
"position": {
"grow": 1
},
"props": {},
"type": "ia.container.flex"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttry:\n\t\tp = int(self.view.custom.page or 0)\n\texcept:\n\t\tp = 0\n\tif p > 0:\n\t\tself.view.custom.page = p - 1"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnPrev"
},
"position": {
"basis": "80px",
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn int(value['page'] or 0) > 0\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"primary": false,
"text": "Prev"
},
"type": "ia.input.button"
},
{
"meta": {
"name": "LblPage"
},
"position": {
"shrink": 0
},
"propConfig": {
"props.text": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\ttotal = int(value['total'] or 0)\n\t\tsize = int(value['page_size'] or 50)\n\t\tpage = int(value['page'] or 0)\n\texcept:\n\t\ttotal = 0\n\t\tsize = 50\n\t\tpage = 0\n\tif size < 1:\n\t\tsize = 50\n\tpages = (total + size - 1) // size\n\tif pages < 1:\n\t\tpages = 1\n\ttry:\n\t\treturn 'Page %s of %s' % (exchange.alarmAnalysis.fmt.num(page + 1), exchange.alarmAnalysis.fmt.num(pages))\n\texcept:\n\t\treturn 'Page %d of %d' % (page + 1, pages)",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"style": {
"classes": "exchange/alarm-analysis/text/muted"
},
"textStyle": {
"textAlign": "center"
}
},
"type": "ia.display.label"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttry:\n\t\tp = int(self.view.custom.page or 0)\n\texcept:\n\t\tp = 0\n\ttry:\n\t\td = self.view.custom.pageData\n\t\ttotal = int(d['total'] or 0)\n\t\tsize = int(d['page_size'] or 50)\n\texcept:\n\t\ttotal = 0\n\t\tsize = 50\n\tif size < 1:\n\t\tsize = 50\n\tpages = (total + size - 1) // size\n\tif pages < 1:\n\t\tpages = 1\n\tif p < pages - 1:\n\t\tself.view.custom.page = p + 1"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnNext"
},
"position": {
"basis": "80px",
"shrink": 0
},
"propConfig": {
"props.enabled": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\ttotal = int(value['total'] or 0)\n\t\tsize = int(value['page_size'] or 50)\n\t\tpage = int(value['page'] or 0)\n\texcept:\n\t\treturn False\n\tif size < 1:\n\t\tsize = 50\n\treturn (page + 1) * size < total",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"primary": false,
"text": "Next"
},
"type": "ia.input.button"
},
{
"events": {
"component": {
"onActionPerformed": {
"config": {
"script": "\ttry:\n\t\tq = self.view.params.query\n\t\tcsv = exchange.alarmAnalysis.alarms.journalCsv(q.startMs, q.endMs, {'priorities': list(q.priorities), 'areas': list(q.areas), 'states': list(q.states), 'search': q.search})\n\t\tsystem.perspective.download('alarm_journal.csv', csv)\n\texcept:\n\t\tpass"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "BtnExport"
},
"position": {
"basis": "110px",
"shrink": 0
},
"props": {
"primary": true,
"text": "Export CSV"
},
"type": "ia.input.button"
}
],
"meta": {
"name": "Toolbar"
},
"position": {
"shrink": 0
},
"props": {
"alignItems": "center",
"style": {
"classes": "exchange/alarm-analysis/toolbar",
"gap": "8px"
}
},
"type": "ia.container.flex"
},
{
"children": [
{
"events": {
"component": {
"onRowClick": {
"config": {
"script": "\trow = event.value\n\tevt = {}\n\ttry:\n\t\tfor k in row:\n\t\t\tv = row[k]\n\t\t\ttry:\n\t\t\t\tevt[k] = v['value']\n\t\t\texcept:\n\t\t\t\tevt[k] = v\n\texcept:\n\t\tevt = {}\n\ttry:\n\t\tif evt:\n\t\t\tsystem.perspective.openPopup('exchange.alarmAnalysis.eventDetail', 'Exchange/AlarmAnalysis/Popups/EventDetail', params = {'event': evt}, showCloseIcon = True, draggable = True)\n\texcept:\n\t\tpass"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "TblJournal"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn len(value['rows'] or []) > 0\n\texcept:\n\t\treturn False",
"type": "script"
}
],
"type": "property"
}
},
"props.data": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\tstate_cls = {'active': 'exchange/alarm-analysis/state/active', 'ack': 'exchange/alarm-analysis/state/acked', 'clear': 'exchange/alarm-analysis/state/cleared'}\n\tprio_cls = {'Diagnostic': 'exchange/alarm-analysis/priority-soft/diagnostic', 'Low': 'exchange/alarm-analysis/priority-soft/low', 'Medium': 'exchange/alarm-analysis/priority-soft/medium', 'High': 'exchange/alarm-analysis/priority-soft/high', 'Critical': 'exchange/alarm-analysis/priority-soft/critical'}\n\ttry:\n\t\trows = value['rows'] or []\n\texcept:\n\t\trows = []\n\tout = []\n\tfor r in rows:\n\t\ttry:\n\t\t\tsc = state_cls.get(r['state'], '')\n\t\t\tpc = prio_cls.get(r['priority_name'], '')\n\t\t\tout.append({'time_label': r['time_label'] or '', 'state_label': {'value': r['state_label'] or '', 'style': {'classes': sc}}, 'priority_name': {'value': r['priority_name'] or '', 'style': {'classes': pc}}, 'label': r['label'] or '', 'area': r['area'] or '', 'ack_user': r['ack_user'] or '', 'id': r['id'] or '', 'time_ms': r['time_ms'] or 0, 'source': r['source'] or '', 'state': r['state'] or '', 'priority': r['priority']})\n\t\texcept:\n\t\t\tpass\n\treturn out",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"cells": {
"style": {
"padding": "5px"
}
},
"columns": [
{
"field": "time_label",
"header": {
"title": "Time"
},
"sortable": false,
"strictWidth": true,
"width": 150
},
{
"field": "state_label",
"header": {
"title": "State"
},
"justify": "center",
"sortable": false,
"strictWidth": true,
"width": 110
},
{
"field": "priority_name",
"header": {
"title": "Priority"
},
"justify": "center",
"sortable": false,
"strictWidth": true,
"width": 110
},
{
"field": "label",
"header": {
"title": "Alarm"
},
"sortable": false
},
{
"field": "area",
"header": {
"title": "Area"
},
"sortable": false,
"strictWidth": true,
"width": 160
},
{
"field": "ack_user",
"header": {
"title": "Ack By"
},
"sortable": false,
"strictWidth": true,
"width": 120
},
{
"field": "id",
"visible": false
},
{
"field": "time_ms",
"visible": false
},
{
"field": "source",
"visible": false
},
{
"field": "state",
"visible": false
},
{
"field": "priority",
"visible": false
}
],
"pager": {
"bottom": false,
"top": false
}
},
"type": "ia.display.table"
},
{
"meta": {
"name": "Empty"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"path": "view.custom.pageData"
},
"transforms": [
{
"code": "\ttry:\n\t\treturn len(value['rows'] or []) == 0\n\texcept:\n\t\treturn True",
"type": "script"
}
],
"type": "property"
}
}
},
"props": {
"params": {
"icon": "search",
"message": "No events match the current filters"
},
"path": "Exchange/AlarmAnalysis/Components/EmptyState"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "CardTable"
},
"position": {
"grow": 1
},
"props": {
"direction": "column",
"style": {
"classes": "exchange/alarm-analysis/card"
}
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"gap": "12px"
}
},
"type": "ia.container.flex"
}
}

View File

@@ -0,0 +1,10 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json"
],
"attributes": {}
}