Phase 2: dashboard tabs + popups, chart fixes, shell relocation
Built via parallel Workflow (5 builders + adversarial verifiers), then live-rendered and fixed in a headless browser against the running gateway. Tabs (PrimeControls/Tabs/*): - Overview: priority cards, KPI status row, alarm-rate timeline, insights, top-5 - Analysis: hour x day heatmap, priority donut vs ISA 80/15/5, MTTA/MTTR, floods - BadActors: chattering/standing/fleeting tables, focus chip, AlarmDetail wiring - Journal: paginated getJournalPage table, CSV export, EventDetail wiring Popups (PrimeControls/Popups/*): HealthScore, ShiftReport, AlarmDetail, EventDetail Chart fixes (verified rendering in-browser): - Overview timeline: seeded dataSources.rate, switched to static fills, split flood bins into their own red stacked series (per-point deriveFieldsFromData fill was crashing render with React.cloneElement null). - BadActors: removed the dual-axis Pareto XY chart (scaling was unusable); replaced with a ranked "Top Sources" table (share-of-total progress bar + cumulative %). Same insight, no axis scaling to break. Structural / hygiene: - Relocated Header + FilterBar from Dashboard/ to Shell/ and updated the two embed paths. A Perspective view cannot resolve sub-views nested inside another view's folder, so both were rendering as "view does not exist" placeholders. - Set persistent:false on all view input params. persistent:true caused the gateway to bake the live bundle (with sim tag paths) into Tabs/Analysis on render; nulled that baked data and reset the session query range to 0. lint_project.py: 0 failures / 0 warnings. Verified in-browser: Overview, BadActors. NOT yet live-verified: Analysis, Journal, and the four popups (schema-verified only). Header content is next phase (renders now, but a benign cloneElement console warning remains). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -207,7 +207,8 @@ Critical `#D64550`. Accent: `#3B7DD8`. Agents may ADD classes only under
|
||||
|
||||
## View ownership (Phase 2/3)
|
||||
|
||||
A: `Dashboard/Header` + `Dashboard/FilterBar` · B: `Tabs/Overview` · C: `Tabs/Analysis` ·
|
||||
A: `Shell/Header` + `Shell/FilterBar` (relocated out of `Dashboard/` — a view cannot
|
||||
nest sub-views under another view's folder) · B: `Tabs/Overview` · C: `Tabs/Analysis` ·
|
||||
D: `Tabs/BadActors` · E: `Tabs/Journal` · F: `Popups/HealthScore`+`Popups/ShiftReport` ·
|
||||
G: `Popups/AlarmDetail`+`Popups/EventDetail` · H: `Components/HealthGauge` upgrade.
|
||||
Integrator-only: `Dashboard/view.json`, session-props, page-config, shared Components,
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
"custom": {
|
||||
"PrimeControls": {
|
||||
"query": {
|
||||
"startMs": 0,
|
||||
"endMs": 0,
|
||||
"rangePreset": "8h",
|
||||
"priorities": [],
|
||||
"areas": [],
|
||||
"states": [],
|
||||
"endMs": 0,
|
||||
"priorities": [],
|
||||
"rangePreset": "8h",
|
||||
"refreshToken": 0,
|
||||
"search": "",
|
||||
"refreshToken": 0
|
||||
"startMs": 0,
|
||||
"states": []
|
||||
},
|
||||
"ui": {
|
||||
"selectedTab": 0,
|
||||
"badActorFocus": ""
|
||||
"badActorFocus": "",
|
||||
"selectedTab": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -68,15 +68,28 @@
|
||||
"props.lastActivity": {
|
||||
"access": "SYSTEM",
|
||||
"persistent": false
|
||||
},
|
||||
"props.offline.capable": {
|
||||
"access": "SYSTEM",
|
||||
"persistent": false
|
||||
},
|
||||
"props.offline.enabled": {
|
||||
"access": "SYSTEM",
|
||||
"persistent": false
|
||||
},
|
||||
"props.offline.lastSynced": {
|
||||
"access": "SYSTEM",
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"address": "172.18.0.5",
|
||||
"address": "172.23.0.1",
|
||||
"device": {},
|
||||
"geolocation": {},
|
||||
"locale": "en-US",
|
||||
"offline": {},
|
||||
"securityLevels": [],
|
||||
"theme": "light-cool",
|
||||
"timeZoneId": "America/Los_Angeles"
|
||||
"timeZoneId": "America/Chicago"
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,11 @@
|
||||
"propConfig": {
|
||||
"params.icon": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.message": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"propConfig": {
|
||||
"params.health": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"count": 0,
|
||||
"max": 0
|
||||
"count": null,
|
||||
"max": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.count": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.max": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
"custom": {},
|
||||
"params": {
|
||||
"icon": null,
|
||||
"severity": 3,
|
||||
"severity": null,
|
||||
"tab": null,
|
||||
"text": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.icon": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.severity": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.tab": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.text": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
"custom": {},
|
||||
"params": {
|
||||
"delta": null,
|
||||
"label": "KPI",
|
||||
"label": null,
|
||||
"unit": null,
|
||||
"value": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.delta": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.label": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.unit": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.value": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"count": 0,
|
||||
"count": null,
|
||||
"pct": null,
|
||||
"priority_name": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.count": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.pct": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.priority_name": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
"propConfig": {
|
||||
"params.detail": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.key": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.label": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.score": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.weight": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"count": 0,
|
||||
"count": null,
|
||||
"label": null,
|
||||
"pct": null,
|
||||
"rank": null,
|
||||
@@ -10,23 +10,23 @@
|
||||
"propConfig": {
|
||||
"params.count": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.label": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.pct": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.rank": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.source": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"index": 0,
|
||||
"title": "Tab"
|
||||
"index": null,
|
||||
"title": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.index": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
},
|
||||
"params.title": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"bundle": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.bundle": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ph"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Empty"
|
||||
},
|
||||
"text": "Filter bar - built in Phase 2"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "evt"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.bundle"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttry:\n\t\treturn 'bundle: %s events in range' % value['meta']['event_count']\n\texcept:\n\t\treturn 'bundle: not loaded'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Text/Muted"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"alignItems": "center",
|
||||
"classes": "PrimeControls/Card",
|
||||
"justifyContent": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"bundle": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.bundle": {
|
||||
"paramDirection": "input",
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ph"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Empty"
|
||||
},
|
||||
"text": "Header - built in Phase 2"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "evt"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.bundle"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttry:\n\t\treturn 'bundle: %s events in range' % value['meta']['event_count']\n\texcept:\n\t\treturn 'bundle: not loaded'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Text/Muted"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"alignItems": "center",
|
||||
"classes": "PrimeControls/Card",
|
||||
"justifyContent": "center"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"custom": {
|
||||
"bundle": null
|
||||
},
|
||||
"custom": {},
|
||||
"events": {
|
||||
"system": {
|
||||
"onStartup": {
|
||||
@@ -44,7 +42,6 @@
|
||||
},
|
||||
"position": {
|
||||
"basis": "150px",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
@@ -58,8 +55,7 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Dashboard/Header"
|
||||
"path": "PrimeControls/Shell/Header"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -69,7 +65,6 @@
|
||||
},
|
||||
"position": {
|
||||
"basis": "56px",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
@@ -83,8 +78,7 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Dashboard/FilterBar"
|
||||
"path": "PrimeControls/Shell/FilterBar"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
@@ -164,11 +158,9 @@
|
||||
},
|
||||
"position": {
|
||||
"basis": "42px",
|
||||
"grow": 0,
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"direction": "row",
|
||||
"style": {
|
||||
"borderBottomColor": "var(--neutral-40)",
|
||||
"borderBottomStyle": "solid",
|
||||
@@ -205,7 +197,6 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Tabs/Overview"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
@@ -236,7 +227,6 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Tabs/Analysis"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
@@ -267,7 +257,6 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Tabs/BadActors"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
@@ -298,7 +287,6 @@
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Tabs/Journal"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
|
||||
@@ -0,0 +1,792 @@
|
||||
{
|
||||
"custom": {
|
||||
"detail": null
|
||||
},
|
||||
"params": {
|
||||
"label": null,
|
||||
"source": null
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.detail": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{view.params.source} + '|' + {session.custom.PrimeControls.query.startMs} + '|' + {session.custom.PrimeControls.query.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\tq = self.session.custom.PrimeControls.query\n\t\treturn PrimeControls.alarms.getSourceDetail(src, q.startMs, q.endMs)\n\texcept:\n\t\treturn None",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "expr"
|
||||
}
|
||||
},
|
||||
"params.label": {
|
||||
"paramDirection": "input",
|
||||
"persistent": false
|
||||
},
|
||||
"params.source": {
|
||||
"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": "PrimeControls/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": "PrimeControls/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 PrimeControls.fmt.num(value['stats']['count'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Activations"
|
||||
},
|
||||
"path": "PrimeControls/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 PrimeControls.fmt.dur(value['stats']['avg_tta_ms'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Avg Time to Ack"
|
||||
},
|
||||
"path": "PrimeControls/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 PrimeControls.fmt.dur(value['stats']['avg_active_ms'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Avg Active Time"
|
||||
},
|
||||
"path": "PrimeControls/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 PrimeControls.fmt.num(value['stats']['fleeting_count'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Fleeting"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "statsRow"
|
||||
},
|
||||
"position": {
|
||||
"basis": "88px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "stretch",
|
||||
"style": {
|
||||
"gap": "10px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblDailyTitle"
|
||||
},
|
||||
"position": {
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/CardTitle"
|
||||
},
|
||||
"text": "Daily activity"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "repDaily"
|
||||
},
|
||||
"position": {
|
||||
"basis": "30px",
|
||||
"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": {
|
||||
"direction": "row",
|
||||
"elementPosition": {
|
||||
"basis": "12px",
|
||||
"grow": 1,
|
||||
"shrink": 1
|
||||
},
|
||||
"path": "PrimeControls/Components/HeatmapCell"
|
||||
},
|
||||
"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' % (PrimeControls.fmt.day_clock(daily[0]['t0']), PrimeControls.fmt.day_clock(daily[-1]['t0']))\n\texcept:\n\t\treturn 'Activations per day'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Text/Muted"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "cardDaily"
|
||||
},
|
||||
"position": {
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "PrimeControls/Card",
|
||||
"gap": "6px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblAckTitle"
|
||||
},
|
||||
"position": {
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/CardTitle"
|
||||
},
|
||||
"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": "PrimeControls/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": "PrimeControls/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": "PrimeControls/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": "PrimeControls/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": "PrimeControls/Card",
|
||||
"gap": "6px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblEvTitle"
|
||||
},
|
||||
"position": {
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/CardTitle"
|
||||
},
|
||||
"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": {
|
||||
"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,
|
||||
"top": false
|
||||
}
|
||||
},
|
||||
"type": "ia.display.table"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "cardEvents"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "PrimeControls/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": "PrimeControls/Components/EmptyState"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closePopup('PC_AlarmDetail')"
|
||||
},
|
||||
"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": "PrimeControls/PageBg",
|
||||
"gap": "10px",
|
||||
"padding": "16px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,660 @@
|
||||
{
|
||||
"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 = PrimeControls.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": "PrimeControls/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 'PrimeControls/State/Acked'\n\tif s == 'clear':\n\t\treturn 'PrimeControls/State/Cleared'\n\treturn 'PrimeControls/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 'PrimeControls/Priority/' + p",
|
||||
"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": "PrimeControls/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 PrimeControls.fmt.day_clock(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": "PrimeControls/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": "PrimeControls/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": "PrimeControls/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": "PrimeControls/Card",
|
||||
"gap": "4px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblPropsTitle"
|
||||
},
|
||||
"position": {
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/CardTitle"
|
||||
},
|
||||
"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": {
|
||||
"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": "PrimeControls/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": "PrimeControls/Components/EmptyState"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closePopup('PC_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": "PrimeControls/PageBg",
|
||||
"gap": "10px",
|
||||
"padding": "16px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json"
|
||||
],
|
||||
"attributes": {}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
{
|
||||
"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 'PrimeControls/Grade/' + (g 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": "PrimeControls/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' % PrimeControls.fmt.num(s, 1)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/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": "PrimeControls/CardTitle"
|
||||
},
|
||||
"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": "PrimeControls/Components/ScoreBar",
|
||||
"style": {
|
||||
"overflowY": "auto"
|
||||
}
|
||||
},
|
||||
"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": "PrimeControls/Components/EmptyState"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "cardSubs"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "PrimeControls/Card",
|
||||
"gap": "6px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblCaption"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1,
|
||||
"shrink": 1
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/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('PC_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": "PrimeControls/PageBg",
|
||||
"gap": "12px",
|
||||
"padding": "16px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json"
|
||||
],
|
||||
"attributes": {}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"custom": {
|
||||
"report": null
|
||||
},
|
||||
"params": {},
|
||||
"propConfig": {
|
||||
"custom.report": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.PrimeControls.query.refreshToken}"
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttry:\n\t\tr = PrimeControls.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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "PrimeControls/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' % (PrimeControls.fmt.day_clock(s), PrimeControls.fmt.day_clock(e))",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/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": "PrimeControls/Card",
|
||||
"overflowY": "auto"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
},
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.closePopup('PC_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": "PrimeControls/PageBg",
|
||||
"gap": "12px",
|
||||
"padding": "16px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json"
|
||||
],
|
||||
"attributes": {}
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"bundle": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.bundle": {
|
||||
"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": {
|
||||
"bidirectional": true,
|
||||
"config": {
|
||||
"path": "session.custom.PrimeControls.query.priorities"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"multiSelect": true,
|
||||
"placeholder": {
|
||||
"text": "Priority"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"bidirectional": true,
|
||||
"config": {
|
||||
"path": "session.custom.PrimeControls.query.areas"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"multiSelect": true,
|
||||
"placeholder": {
|
||||
"text": "Area"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.dropdown"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "ddState"
|
||||
},
|
||||
"position": {
|
||||
"basis": "170px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"props.value": {
|
||||
"binding": {
|
||||
"bidirectional": true,
|
||||
"config": {
|
||||
"path": "session.custom.PrimeControls.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"
|
||||
}
|
||||
},
|
||||
"type": "ia.input.dropdown"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "txtSearch"
|
||||
},
|
||||
"position": {
|
||||
"basis": "240px",
|
||||
"shrink": 1
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"bidirectional": true,
|
||||
"config": {
|
||||
"path": "session.custom.PrimeControls.query.search"
|
||||
},
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"deferUpdates": true,
|
||||
"placeholder": "Search source/label..."
|
||||
},
|
||||
"type": "ia.input.text-field"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tq = self.session.custom.PrimeControls.query\n\tq.refreshToken = q.refreshToken + 1"
|
||||
},
|
||||
"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": "\tq = self.session.custom.PrimeControls.query\n\tq.priorities = []\n\tq.areas = []\n\tq.states = []\n\tq.search = ''\n\tq.refreshToken = q.refreshToken + 1"
|
||||
},
|
||||
"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' % PrimeControls.fmt.num(n)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Text/Muted"
|
||||
},
|
||||
"textStyle": {
|
||||
"textAlign": "right"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "center",
|
||||
"direction": "row",
|
||||
"style": {
|
||||
"classes": "PrimeControls/Toolbar",
|
||||
"gap": "8px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"scope": "G",
|
||||
"version": 1,
|
||||
"restricted": false,
|
||||
"overridable": true,
|
||||
"files": [
|
||||
"view.json"
|
||||
],
|
||||
"attributes": {}
|
||||
}
|
||||
@@ -0,0 +1,674 @@
|
||||
{
|
||||
"custom": {},
|
||||
"params": {
|
||||
"bundle": null
|
||||
},
|
||||
"propConfig": {
|
||||
"params.bundle": {
|
||||
"paramDirection": "input",
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 150,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblTitle"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Text/Big"
|
||||
},
|
||||
"text": "Alarm Analysis"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "lblSubtitle"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Text/Muted"
|
||||
},
|
||||
"text": "Prime Controls Build-a-Thon"
|
||||
},
|
||||
"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": "PrimeControls/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": "PrimeControls/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": "\tspans = {'4h': 4, '8h': 8, '24h': 24, '7d': 168}\n\tpreset = event.value\n\tif preset in spans:\n\t\tq = self.session.custom.PrimeControls.query\n\t\tnow = system.date.toMillis(system.date.now())\n\t\tq.endMs = now\n\t\tq.startMs = now - spans[preset] * 3600 * 1000\n\t\tq.refreshToken = q.refreshToken + 1"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "ddRange"
|
||||
},
|
||||
"position": {
|
||||
"basis": "150px",
|
||||
"shrink": 0
|
||||
},
|
||||
"propConfig": {
|
||||
"props.value": {
|
||||
"binding": {
|
||||
"bidirectional": true,
|
||||
"config": {
|
||||
"path": "session.custom.PrimeControls.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": "\tq = self.session.custom.PrimeControls.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"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "btnRefresh"
|
||||
},
|
||||
"position": {
|
||||
"basis": "90px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"primary": false,
|
||||
"text": "Refresh"
|
||||
},
|
||||
"type": "ia.input.button"
|
||||
},
|
||||
{
|
||||
"events": {
|
||||
"component": {
|
||||
"onActionPerformed": {
|
||||
"config": {
|
||||
"script": "\tsystem.perspective.openPopup('PC_ShiftReport', 'PrimeControls/Popups/ShiftReport', params = {}, showCloseIcon = True, draggable = True)"
|
||||
},
|
||||
"scope": "G",
|
||||
"type": "script"
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"name": "btnShiftReport"
|
||||
},
|
||||
"position": {
|
||||
"basis": "120px",
|
||||
"shrink": 0
|
||||
},
|
||||
"props": {
|
||||
"primary": true,
|
||||
"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": "52px",
|
||||
"grow": 0,
|
||||
"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": {
|
||||
"params": {},
|
||||
"path": "PrimeControls/Components/HealthGauge"
|
||||
},
|
||||
"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 PrimeControls.fmt.num(value['kpis']['activations']['value'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Activations"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"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 PrimeControls.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": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"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 PrimeControls.fmt.num(value['kpis']['active_now']['value'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Active Now"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"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 PrimeControls.fmt.num(value['kpis']['unacked_now']['value'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Unacked"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"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 PrimeControls.fmt.dur(value['kpis']['mtta_ms']['value'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "MTTA"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"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 PrimeControls.fmt.pct(value['kpis']['flood_pct']['value'], 1)\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Flood Time"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"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 PrimeControls.fmt.num(value['kpis']['chatter_count']['value'])\n\texcept:\n\t\treturn '--'",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"params": {
|
||||
"label": "Chattering"
|
||||
},
|
||||
"path": "PrimeControls/Components/KpiCard"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "rowKpis"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"alignItems": "stretch",
|
||||
"style": {
|
||||
"gap": "10px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "root"
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "PrimeControls/Toolbar",
|
||||
"gap": "8px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,55 +1,463 @@
|
||||
{
|
||||
"custom": {},
|
||||
"custom": {
|
||||
"page": 0,
|
||||
"pageData": null
|
||||
},
|
||||
"params": {
|
||||
"bundle": null
|
||||
},
|
||||
"propConfig": {
|
||||
"custom.pageData": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"expression": "{session.custom.PrimeControls.query.refreshToken} + '|' + {session.custom.PrimeControls.query.startMs} + '|' + {session.custom.PrimeControls.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.session.custom.PrimeControls.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 PrimeControls.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": true
|
||||
"persistent": false
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"defaultSize": {
|
||||
"height": 800,
|
||||
"width": 1600
|
||||
}
|
||||
},
|
||||
"props": {},
|
||||
"root": {
|
||||
"children": [
|
||||
{
|
||||
"meta": {
|
||||
"name": "ph"
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/Empty"
|
||||
"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' % PrimeControls.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"
|
||||
},
|
||||
"text": "Journal - built in Phase 2"
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"name": "evt"
|
||||
},
|
||||
"propConfig": {
|
||||
"props.text": {
|
||||
"binding": {
|
||||
"config": {
|
||||
"path": "view.params.bundle"
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"transforms": [
|
||||
{
|
||||
"code": "\ttry:\n\t\treturn 'bundle: %s events in range' % value['meta']['event_count']\n\texcept:\n\t\treturn 'bundle: not loaded'",
|
||||
"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": "PrimeControls/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"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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' % (PrimeControls.fmt.num(page + 1), PrimeControls.fmt.num(pages))\n\texcept:\n\t\treturn 'Page %d of %d' % (page + 1, pages)",
|
||||
"type": "script"
|
||||
}
|
||||
],
|
||||
"type": "property"
|
||||
}
|
||||
}
|
||||
},
|
||||
"props": {
|
||||
"style": {
|
||||
"classes": "PrimeControls/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.session.custom.PrimeControls.query\n\t\tcsv = PrimeControls.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": "PrimeControls/Text/Muted"
|
||||
"classes": "PrimeControls/Toolbar",
|
||||
"gap": "8px"
|
||||
}
|
||||
},
|
||||
"type": "ia.display.label"
|
||||
"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('PC_EventDetail', 'PrimeControls/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': 'PrimeControls/State/Active', 'ack': 'PrimeControls/State/Acked', 'clear': 'PrimeControls/State/Cleared'}\n\tprio_cls = {'Diagnostic': 'PrimeControls/PrioritySoft/Diagnostic', 'Low': 'PrimeControls/PrioritySoft/Low', 'Medium': 'PrimeControls/PrioritySoft/Medium', 'High': 'PrimeControls/PrioritySoft/High', 'Critical': 'PrimeControls/PrioritySoft/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": {
|
||||
"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": "PrimeControls/Components/EmptyState"
|
||||
},
|
||||
"type": "ia.display.view"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
"name": "cardTable"
|
||||
},
|
||||
"position": {
|
||||
"grow": 1
|
||||
},
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"classes": "PrimeControls/Card"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
@@ -58,9 +466,7 @@
|
||||
"props": {
|
||||
"direction": "column",
|
||||
"style": {
|
||||
"alignItems": "center",
|
||||
"classes": "PrimeControls/Card",
|
||||
"justifyContent": "center"
|
||||
"gap": "12px"
|
||||
}
|
||||
},
|
||||
"type": "ia.container.flex"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user