Lead gateway overview with readable fault context

This commit is contained in:
Joseph Doherty
2026-11-13 19:30:52 -05:00
parent c9a6c31cb8
commit b06921ce85
42 changed files with 2113 additions and 47 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,605 @@
{
"cases": [
{
"scene": "healthy",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "healthy",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "healthy",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": {
"x": 255.390625,
"y": 153.109375,
"width": 1149.21875,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": {
"x": 28.984375,
"y": 230.21875,
"width": 332.03125,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": {
"x": 35.3984375,
"y": 196.6171875,
"width": 649.203125,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
}
],
"errors": []
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@@ -0,0 +1,605 @@
{
"cases": [
{
"scene": "healthy",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "healthy",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "healthy",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": {
"x": 255.390625,
"y": 147.109375,
"width": 1149.21875,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": {
"x": 28.984375,
"y": 224.21875,
"width": 332.03125,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": {
"x": 35.3984375,
"y": 190.6171875,
"width": 649.203125,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
}
],
"errors": []
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@@ -0,0 +1,605 @@
{
"cases": [
{
"scene": "healthy",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "healthy",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "healthy",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": {
"x": 924,
"y": 160.734375,
"width": 480.609375,
"withinFirstViewport": true
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": {
"x": 450.1875,
"y": 237.84375,
"width": 333,
"withinFirstViewport": false
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "mixed",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": {
"x": 456.578125,
"y": 204.234375,
"width": 333.0078125,
"withinFirstViewport": false
},
"metrics": [
{
"label": "Open sessions",
"value": "1"
},
{
"label": "Workers running",
"value": "1"
},
{
"label": "Event queue depth",
"value": "3"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 1440,
"dpr": 1,
"scroll": 1440,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 390,
"dpr": 1,
"scroll": 390,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
},
{
"scene": "zero",
"width": 720,
"dpr": 2,
"scroll": 720,
"firstFaultMessage": null,
"metrics": [
{
"label": "Open sessions",
"value": "0"
},
{
"label": "Workers running",
"value": "0"
},
{
"label": "Event queue depth",
"value": "0"
},
{
"label": "Uptime",
"value": "03:00:00"
},
{
"label": "Commands failed",
"value": "104"
},
{
"label": "Events received",
"value": "105"
},
{
"label": "Faults",
"value": "106"
},
{
"label": "Queue overflows",
"value": "107"
},
{
"label": "Last deploy",
"value": "2026-11-13 20:00:00 UTC"
},
{
"label": "Objects",
"value": "201"
},
{
"label": "Attributes",
"value": "203"
},
{
"label": "Historized",
"value": "204"
},
{
"label": "Alarms",
"value": "205"
},
{
"label": "Last refresh",
"value": "2026-11-13 20:00:00 UTC"
}
]
}
],
"errors": []
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -0,0 +1,7 @@
ZB.MOM.WW.MxGateway.Contracts -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Contracts/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Server/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Server.dll
ZB.MOM.WW.MxGateway.Tests -> /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll
Test run for /Users/dohertj2/Desktop/MxAccessGateway/src/ZB.MOM.WW.MxGateway.Tests/bin/Debug/net10.0/ZB.MOM.WW.MxGateway.Tests.dll (.NETCoreApp,Version=v10.0)
A total of 1 test files matched the specified pattern.
Passed! - Failed: 0, Passed: 3, Skipped: 0, Total: 3, Duration: 41 ms - ZB.MOM.WW.MxGateway.Tests.dll (net10.0)
@@ -0,0 +1,11 @@
Determining projects to restore...
All projects are up-to-date for restore.
ZB.MOM.WW.MxGateway.Contracts -> /tmp/mx-ui-overview-artifacts/bin/ZB.MOM.WW.MxGateway.Contracts/release_net10.0/ZB.MOM.WW.MxGateway.Contracts.dll
ZB.MOM.WW.MxGateway.Server -> /tmp/mx-ui-overview-artifacts/bin/ZB.MOM.WW.MxGateway.Server/release/ZB.MOM.WW.MxGateway.Server.dll
MxUiCanary -> /tmp/mx-ui-overview-artifacts/bin/MxUiCanary/release/MxUiCanary.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.58
@@ -0,0 +1,5 @@
@namespace MxUiCanary.Components
@page "/overview-fixture"
@inject IJSRuntime JS
<ThemeShell Product="Synthetic MX overview"><ChildContent><DashboardHome/></ChildContent></ThemeShell>
@code { protected override async Task OnAfterRenderAsync(bool firstRender){if(firstRender)await JS.InvokeVoidAsync("mxCanaryReady");} }
+18 -9
View File
@@ -7,16 +7,24 @@ using ZB.MOM.WW.MxGateway.Server.Security.Authorization;
internal sealed class StubSnapshotService : IDashboardSnapshotService
{
/// <inheritdoc />
public DashboardSnapshot GetSnapshot() => new(
GeneratedAt: DateTimeOffset.UnixEpoch,
GatewayStartedAt: DateTimeOffset.UnixEpoch,
GatewayUptime: TimeSpan.Zero,
GatewayStatus: "Healthy",
public string Scene { get; set; } = "mixed";
public DashboardSnapshot GetSnapshot()
{
string scene = Scene;
var at = new DateTimeOffset(2026, 11, 13, 20, 0, 0, TimeSpan.Zero);
bool mixed = scene == "mixed";
return new(
GeneratedAt: at,
GatewayStartedAt: at.AddHours(-3),
GatewayUptime: TimeSpan.FromHours(3),
GatewayStatus: mixed ? "Degraded" : "Healthy",
GatewayVersion: "test",
Sessions: [],
Sessions: scene == "zero" ? [] : [new("fixture-session", "synthetic", mixed ? ZB.MOM.WW.MxGateway.Contracts.Proto.SessionState.Faulted : ZB.MOM.WW.MxGateway.Contracts.Proto.SessionState.Ready,
null, null, null, at, at, null, 123, null, null, 0, mixed ? "Synthetic fixture fault" : null)],
Workers: [],
Metrics: [],
Faults: [],
Metrics: [new("mxgateway.sessions.open", scene == "zero" ? 0 : 1), new("mxgateway.workers.running", scene == "zero" ? 0 : 1), new("mxgateway.events.worker_queue.depth", mixed ? 3 : 0),
new("mxgateway.commands.failed", 104), new("mxgateway.events.received", 105), new("mxgateway.faults", 106), new("mxgateway.queues.overflows", 107)],
Faults: mixed ? [new("Worker", "fixture-session", 123, "Faulted", "Synthetic worker stopped responding. " + new string('x', 300) + " <script>fixture</script>", at)] : [],
ApiKeys:
[
new DashboardApiKeySummary(
@@ -37,7 +45,8 @@ using ZB.MOM.WW.MxGateway.Server.Security.Authorization;
RevokedUtc: null),
],
Configuration: null!,
Galaxy: null!);
Galaxy: DashboardGalaxySummary.Unknown with { Status = DashboardGalaxyStatus.Healthy, LastDeployTime = at, LastSuccessAt = at, LastQueriedAt = at, ObjectCount = 201, AreaCount = 202, AttributeCount = 203, HistorizedAttributeCount = 204, AlarmAttributeCount = 205 });
}
/// <inheritdoc />
public IAsyncEnumerable<DashboardSnapshot> WatchSnapshotsAsync(CancellationToken cancellationToken) =>
+4
View File
@@ -20,5 +20,9 @@ var app = builder.Build();
app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(Path.GetFullPath("../../../src/ZB.MOM.WW.MxGateway.Server/wwwroot")) });
app.UseStaticFiles();app.UseAntiforgery();
app.MapRazorComponents<FixtureApp>().AddInteractiveServerRenderMode();
app.MapPost("/fixtures/snapshot/{scene}",(string scene, IDashboardSnapshotService source) => {
if (scene is not ("healthy" or "mixed" or "zero")) return Results.BadRequest();
((StubSnapshotService)source).Scene = scene; return Results.Ok(new { scene, syntheticOnly=true });
});
app.MapGet("/provenance",()=>new { theme=typeof(ZB.MOM.WW.Theme.ThemeShell).Assembly.GetName().Version?.ToString(), syntheticOnly=true });
app.Run();
+26
View File
@@ -0,0 +1,26 @@
import json,sys
from pathlib import Path
from playwright.sync_api import sync_playwright
ROOT=Path(__file__).resolve().parent
sys.path.insert(0,'/Users/dohertj2/.codex/worktrees/scada-ui-consistency/scadaproj/components/ui-theme/validation/theme-1.0.0/canary')
from browser_zoom import zoom_browser,set_browser_zoom
BASE=json.load(open('/tmp/mx-ui-overview-state.json'))['origin'];OUT=ROOT/'evidence/mx04/browser-first';OUT.mkdir(exist_ok=True);rows=[];errors=[]
with sync_playwright() as p:
with zoom_browser(p) as (ctx,worker):
page=ctx.new_page();page.on('pageerror',lambda e:errors.append(str(e)))
for scene in ['healthy','mixed','zero']:
page.request.post(BASE+'/fixtures/snapshot/'+scene)
for width,zoom in [(1440,1),(390,1),(1440,2)]:
page.set_viewport_size({'width':width,'height':900});page.goto(BASE+'/overview-fixture');page.wait_for_selector('html[data-mx-ready="true"]');set_browser_zoom(worker,page,zoom);page.evaluate('document.fonts.ready')
visible=page.locator('.overview-faults').evaluate('''e=>{const d=e.querySelector('td:last-child');if(!d)return null;const r=d.getBoundingClientRect();return {x:r.x,y:r.y,width:r.width,withinFirstViewport:r.x>=0&&r.y>=0&&r.right<=innerWidth&&r.bottom<=innerHeight}}''')
page.screenshot(path=str(OUT/f'{scene}-{width}-zoom{zoom}.png'),full_page=False)
summary=page.locator('details.supporting-counters > summary');summary.focus();page.keyboard.press('Enter')
metrics=page.locator('.agg-card').evaluate_all('(es)=>es.map(e=>({label:e.querySelector(".agg-label").textContent.trim(),value:e.querySelector(".agg-value").textContent.trim()}))')
assert len(metrics)==14
rows.append({'scene':scene,'width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'scroll':page.evaluate('document.documentElement.scrollWidth'),'firstFaultMessage':visible,'metrics':metrics})
if scene=='mixed':
page.locator('.fault-diagnostic > summary').first.focus();page.keyboard.press('Enter')
assert len(page.locator('.fault-diagnostic pre').first.inner_text())>300
assert page.locator('.fault-diagnostic pre script').count()==0
set_browser_zoom(worker,page,1)
(OUT/'results.json').write_text(json.dumps({'cases':rows,'errors':errors},indent=2));print(json.dumps({'cases':len(rows),'overflow':[(r['scene'],r['width'],r['scroll']) for r in rows if r['scroll']>r['width']],'firstViewportMessages':[(r['scene'],r['width'],r['firstFaultMessage']) for r in rows if r['scene']=='mixed'],'errors':errors},indent=2))
@@ -0,0 +1,28 @@
import json,sys
from pathlib import Path
from playwright.sync_api import sync_playwright
ROOT=Path(__file__).resolve().parent
sys.path.insert(0,'/Users/dohertj2/.codex/worktrees/scada-ui-consistency/scadaproj/components/ui-theme/validation/theme-1.0.0/canary')
from browser_zoom import zoom_browser,set_browser_zoom
BASE=json.load(open('/tmp/mx-ui-overview-state.json'))['origin'];OUT=ROOT/'evidence/mx04/browser-confirmation';OUT.mkdir(exist_ok=True);rows=[];errors=[]
with sync_playwright() as p:
with zoom_browser(p) as (ctx,worker):
page=ctx.new_page();page.on('pageerror',lambda e:errors.append(str(e)))
for scene in ['healthy','mixed','zero']:
page.request.post(BASE+'/fixtures/snapshot/'+scene)
for width,zoom in [(1440,1),(390,1),(1440,2)]:
page.set_viewport_size({'width':width,'height':900});page.goto(BASE+'/overview-fixture');page.wait_for_selector('html[data-mx-ready="true"]');set_browser_zoom(worker,page,zoom);page.evaluate('document.fonts.ready');page.evaluate('Promise.all(document.getAnimations().map(a=>a.finished.catch(()=>{})))');page.evaluate('scrollTo(0,0)');page.wait_for_timeout(100)
visible=page.locator('.overview-faults').evaluate('''e=>{const d=e.querySelector('.fault-diagnostic > summary,p');if(!d)return null;const r=d.getBoundingClientRect();return {x:r.x,y:r.y,width:r.width,withinFirstViewport:r.x>=0&&r.y>=0&&r.right<=innerWidth&&r.bottom<=innerHeight}}''')
page.screenshot(path=str(OUT/f'{scene}-{width}-zoom{zoom}.png'),full_page=False)
summary=page.locator('details.supporting-counters > summary');summary.focus();page.keyboard.press('Enter')
metrics=page.locator('.agg-card').evaluate_all('(es)=>es.map(e=>({label:e.querySelector(".agg-label").textContent.trim(),value:e.querySelector(".agg-value").textContent.trim()}))')
assert len(metrics)==14
assert page.evaluate('document.documentElement.scrollWidth<=innerWidth')
if scene=='mixed':assert visible['withinFirstViewport'],visible
rows.append({'scene':scene,'width':page.evaluate('innerWidth'),'dpr':page.evaluate('devicePixelRatio'),'scroll':page.evaluate('document.documentElement.scrollWidth'),'firstFaultMessage':visible,'metrics':metrics})
if scene=='mixed':
page.locator('.fault-diagnostic > summary').first.focus();page.keyboard.press('Enter')
assert len(page.locator('.fault-diagnostic pre').first.inner_text())>300
assert page.locator('.fault-diagnostic pre script').count()==0
set_browser_zoom(worker,page,1)
(OUT/'results.json').write_text(json.dumps({'cases':rows,'errors':errors},indent=2));print(json.dumps({'cases':len(rows),'overflow':[(r['scene'],r['width'],r['scroll']) for r in rows if r['scroll']>r['width']],'firstViewportMessages':[(r['scene'],r['width'],r['firstFaultMessage']) for r in rows if r['scene']=='mixed'],'errors':errors},indent=2))
@@ -0,0 +1,9 @@
# Technical-Light overview verification
MX-04 leads with fault records and affected-session links, followed by session/worker/queue context. Supporting counters and repository details retain all14 existing label/value pairs; no fetch, feed, projection, counter semantics or worker behavior changes. Healthy, mixed and zero-session snapshots remain distinct. A lifetime fault counter does not invent an active fault record.
The Overview uses compact fault summaries so the message remains visible at390px and real browser200% zoom. Every fault record retains source/state/time/session/worker/message. Other consumers retain the detailed table. Long diagnostics use native keyboard disclosure with escaped complete text; session links encode existing route identifiers.
Three focused framework HtmlRenderer tests passed, with the original failing behavior recorded in the task's implementation checkpoint. The actual synthetic browser matrix covers healthy/mixed/zero at1440/390px and720CSSpx from real200% zoom. All14 counters retain values, all three mixed fault messages fit the first viewport, and no document overflow/page errors occur. Scripts and raw JSON/screenshots are in evidence/mx04. No real worker, COM, historian or secret operation runs.
First browser inspection found the wide fault table put its message offscreen at390/720CSSpx; compact Overview summaries correct this. Initial captures ran before existing entrance animations finished and retained prior scroll position, so they were unsuitable appearance evidence; retained under browser-confirmation-before-settle. The final harness awaits actual animation completion and resets scroll before capture. Final screenshot inspection confirms the message/context lead at390px. This changes measurement timing only; no product animation workaround was introduced.
@@ -12,49 +12,56 @@ else
<div class="dashboard-page-header">
<div>
<h1>Overview</h1>
<div class="text-secondary">Generated @DashboardDisplay.DateTime(Snapshot.GeneratedAt)</div>
<div class="text-secondary">Sampled @DashboardDisplay.DateTime(Snapshot.GeneratedAt)</div>
</div>
<StatusBadge Text="@Snapshot.GatewayStatus" />
</div>
<section class="metric-grid">
<MetricCard Label="Uptime" Value="@DashboardDisplay.Duration(Snapshot.GatewayUptime)" Detail="@Snapshot.GatewayVersion" />
<MetricCard Label="Open Sessions" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.sessions.open"))" />
<MetricCard Label="Workers Running" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.workers.running"))" />
<MetricCard Label="Event Queue Depth" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.events.worker_queue.depth"))" />
<MetricCard Label="Commands Failed" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.commands.failed"))" />
<MetricCard Label="Events Received" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.events.received"))" />
<MetricCard Label="Faults" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.faults"))" />
<MetricCard Label="Queue Overflows" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.queues.overflows"))" />
<section class="dashboard-section overview-faults" aria-labelledby="recent-faults-title">
<div class="section-heading d-flex align-items-center gap-2 flex-wrap">
<h2 id="recent-faults-title">Recent faults</h2>
<NavLink class="ms-auto small" href="sessions">View sessions &rarr;</NavLink>
</div>
<FaultList Faults="@Snapshot.Faults" Compact="true" />
</section>
<section class="dashboard-section">
<div class="section-heading d-flex align-items-center gap-2">
<h2>Galaxy Repository</h2>
<StatusBadge Text="@Snapshot.Galaxy.Status.ToString()" />
<NavLink class="ms-auto small" href="galaxy">View browse details &rarr;</NavLink>
</div>
<section class="metric-grid" aria-label="Session, worker and queue context">
<MetricCard Label="Open sessions" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.sessions.open"))" />
<MetricCard Label="Workers running" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.workers.running"))" />
<MetricCard Label="Event queue depth" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.events.worker_queue.depth"))" />
</section>
<details class="dashboard-section supporting-counters" data-testid="supporting-counters">
<summary>Supporting counters and repository details</summary>
<h2 class="h6 mt-3">Uptime and cumulative counters</h2>
<div class="metric-grid compact">
<MetricCard Label="Last Deploy" Value="@DashboardDisplay.DateTime(Snapshot.Galaxy.LastDeployTime)" />
<MetricCard Label="Objects" Value="@DashboardDisplay.Count(Snapshot.Galaxy.ObjectCount)" Detail="@($"{Snapshot.Galaxy.AreaCount:N0} areas")" />
<MetricCard Label="Attributes" Value="@DashboardDisplay.Count(Snapshot.Galaxy.AttributeCount)" />
<MetricCard Label="Historized" Value="@DashboardDisplay.Count(Snapshot.Galaxy.HistorizedAttributeCount)" />
<MetricCard Label="Alarms" Value="@DashboardDisplay.Count(Snapshot.Galaxy.AlarmAttributeCount)" />
<MetricCard Label="Last Refresh" Value="@DashboardDisplay.DateTime(Snapshot.Galaxy.LastSuccessAt)" Detail="@GalaxyRefreshDetail()" />
<MetricCard Label="Uptime" Value="@DashboardDisplay.Duration(Snapshot.GatewayUptime)" Detail="@Snapshot.GatewayVersion" />
<MetricCard Label="Commands failed" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.commands.failed"))" />
<MetricCard Label="Events received" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.events.received"))" />
<MetricCard Label="Faults" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.faults"))" />
<MetricCard Label="Queue overflows" Value="@DashboardDisplay.Count(DashboardDisplay.MetricValue(Snapshot, "mxgateway.queues.overflows"))" />
</div>
@if (!string.IsNullOrWhiteSpace(Snapshot.Galaxy.LastError))
{
@* Overview stays compact; the Galaxy page renders the error in full. *@
<div class="empty-state mt-2" title="@Snapshot.Galaxy.LastError">@DashboardDisplay.Abbreviate(Snapshot.Galaxy.LastError, 160)</div>
}
</section>
<section class="dashboard-section">
<div class="section-heading">
<h2>Recent Faults</h2>
</div>
<FaultList Faults="@Snapshot.Faults" />
</section>
<section class="mt-3">
<div class="section-heading d-flex align-items-center gap-2 flex-wrap">
<h2>Galaxy Repository</h2>
<StatusBadge Text="@Snapshot.Galaxy.Status.ToString()" />
<NavLink class="ms-auto small" href="galaxy">Repository status &rarr;</NavLink>
<NavLink class="small" href="browse">Browse attributes &rarr;</NavLink>
</div>
<div class="metric-grid compact">
<MetricCard Label="Last deploy" Value="@DashboardDisplay.DateTime(Snapshot.Galaxy.LastDeployTime)" />
<MetricCard Label="Objects" Value="@DashboardDisplay.Count(Snapshot.Galaxy.ObjectCount)" Detail="@($"{Snapshot.Galaxy.AreaCount:N0} areas")" />
<MetricCard Label="Attributes" Value="@DashboardDisplay.Count(Snapshot.Galaxy.AttributeCount)" />
<MetricCard Label="Historized" Value="@DashboardDisplay.Count(Snapshot.Galaxy.HistorizedAttributeCount)" />
<MetricCard Label="Alarms" Value="@DashboardDisplay.Count(Snapshot.Galaxy.AlarmAttributeCount)" />
<MetricCard Label="Last refresh" Value="@DashboardDisplay.DateTime(Snapshot.Galaxy.LastSuccessAt)" Detail="@GalaxyRefreshDetail()" />
</div>
@if (!string.IsNullOrWhiteSpace(Snapshot.Galaxy.LastError))
{
<div class="empty-state mt-2">@DashboardDisplay.Abbreviate(Snapshot.Galaxy.LastError, 160) Open Repository status for complete diagnostics.</div>
}
</section>
</details>
}
@code {
@@ -1,6 +1,34 @@
@if (Faults.Count == 0)
{
<div class="empty-state">No faults recorded.</div>
<div class="empty-state">No fault records in this snapshot.</div>
}
else if (Compact)
{
<div class="fault-summaries">
@foreach (DashboardFaultSummary fault in Faults)
{
<article class="fault-summary">
<div class="d-flex gap-2 flex-wrap align-items-center"><strong>@fault.Source</strong><StatusBadge Text="@fault.State" /></div>
@if (fault.Message.Length > 160)
{
<details class="fault-diagnostic">
<summary>@DashboardDisplay.Abbreviate(fault.Message)</summary>
<pre tabindex="0" role="region" aria-label="@($"Full fault diagnostic for {fault.Source}, session {fault.SessionId ?? "unassigned"}")">@fault.Message</pre>
</details>
}
else { <p class="mb-1">@fault.Message</p> }
<div class="fault-context">
<span>Observed @DashboardDisplay.DateTime(fault.ObservedAt)</span>
<span>Session
@if (!string.IsNullOrWhiteSpace(fault.SessionId))
{ <a href="@($"sessions/{Uri.EscapeDataString(fault.SessionId)}")"><code>@fault.SessionId</code></a> }
else { <code>@DashboardDisplay.Text(fault.SessionId)</code> }
</span>
<span>Worker @(fault.WorkerProcessId?.ToString(System.Globalization.CultureInfo.InvariantCulture) ?? "-")</span>
</div>
</article>
}
</div>
}
else
{
@@ -22,10 +50,25 @@ else
<tr>
<td>@DashboardDisplay.DateTime(fault.ObservedAt)</td>
<td>@fault.Source</td>
<td><code>@DashboardDisplay.Text(fault.SessionId)</code></td>
<td>
@if (!string.IsNullOrWhiteSpace(fault.SessionId))
{
<a href="@($"sessions/{Uri.EscapeDataString(fault.SessionId)}")"><code>@fault.SessionId</code></a>
}
else { <code>@DashboardDisplay.Text(fault.SessionId)</code> }
</td>
<td>@(fault.WorkerProcessId?.ToString(System.Globalization.CultureInfo.InvariantCulture) ?? "-")</td>
<td><StatusBadge Text="@fault.State" /></td>
<td title="@fault.Message">@DashboardDisplay.Abbreviate(fault.Message)</td>
<td>
@if (fault.Message.Length > 160)
{
<details class="fault-diagnostic">
<summary>@DashboardDisplay.Abbreviate(fault.Message)</summary>
<pre tabindex="0" role="region" aria-label="@($"Full fault diagnostic for {fault.Source}, session {fault.SessionId ?? "unassigned"}")">@fault.Message</pre>
</details>
}
else { @fault.Message }
</td>
</tr>
}
</tbody>
@@ -34,6 +77,9 @@ else
}
@code {
[Parameter]
public bool Compact { get; set; }
[Parameter]
public IReadOnlyList<DashboardFaultSummary> Faults { get; set; } = [];
}
@@ -566,3 +566,17 @@ code {
@media (pointer: coarse) {
.browse-layout button, .browse-search-controls .form-control { min-width: 44px; min-height: 44px; }
}
.supporting-counters > summary, .fault-diagnostic > summary { cursor: pointer; }
.fault-diagnostic pre {
max-height: 16rem; overflow: auto; margin: .5rem 0 0; padding: .65rem;
white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono);
font-size: .78rem; color: var(--ink); background: var(--zebra-bg);
border: 1px solid var(--rule); border-radius: 4px;
}
/* Fault messages lead on narrow screens; every snapshot field remains present. */
.fault-summaries { display: grid; gap: 1rem; }
.fault-summary { min-width: 0; overflow-wrap: anywhere; }
.fault-summary + .fault-summary { border-top: 1px solid var(--rule); padding-top: 1rem; }
.fault-context { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--ink-faint); font-size: .875rem; }
@@ -0,0 +1,85 @@
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using ZB.MOM.WW.MxGateway.Server.Dashboard;
using ZB.MOM.WW.MxGateway.Server.Dashboard.Components.Pages;
namespace ZB.MOM.WW.MxGateway.Tests.Dashboard;
/// <summary>Snapshot composition contracts; no gateway workers or external services.</summary>
public sealed class DashboardHomeRenderTests
{
/// <summary>Fault context precedes operational metrics and links the affected existing route.</summary>
[Fact]
public async Task FaultSnapshot_LeadsWithActionableFaultAndPreservesAllCounters()
{
string html = await RenderAsync(withFault: true);
Assert.Contains("Fixture worker failed", html, StringComparison.Ordinal);
Assert.Contains("href=\"sessions/fixture-session\"", html, StringComparison.Ordinal);
Assert.True(html.IndexOf("Recent faults", StringComparison.OrdinalIgnoreCase) < html.IndexOf("Open sessions", StringComparison.OrdinalIgnoreCase));
string supporting = Regex.Match(html, "<details[^>]*data-testid=\"supporting-counters\"[^>]*>(.*?)</details>", RegexOptions.Singleline).Groups[1].Value;
Assert.NotEmpty(supporting);
foreach (string label in new[] { "Uptime", "Commands failed", "Events received", "Faults", "Queue overflows", "Last deploy", "Objects", "Attributes", "Historized", "Alarms", "Last refresh" })
Assert.Contains(label, supporting, StringComparison.OrdinalIgnoreCase);
foreach (string value in new[] { "104", "105", "106", "107", "201", "202", "203", "204", "205" })
Assert.Contains(value, supporting, StringComparison.Ordinal);
Assert.Contains("Repository status", html, StringComparison.Ordinal);
Assert.Contains("Browse attributes", html, StringComparison.Ordinal);
}
/// <summary>A zero-session snapshot stays truthful; complete escaped diagnostics need no hover.</summary>
[Fact]
public async Task LongFault_HasKeyboardDisclosureAndEscapedCompleteDiagnostic()
{
string html = await RenderAsync(withFault: true, longFault: true);
Assert.Contains("<details class=\"fault-diagnostic\"", html, StringComparison.Ordinal);
Assert.Contains("&lt;script&gt;fixture&lt;/script&gt;", html, StringComparison.Ordinal);
Assert.DoesNotContain("<script>fixture</script>", html, StringComparison.Ordinal);
Assert.Contains("role=\"region\"", html, StringComparison.Ordinal);
}
/// <summary>No fault record is reported explicitly rather than synthesized from lifetime counters.</summary>
[Fact]
public async Task HealthySnapshot_ShowsNoRecordedFaultsAndRealZeroSessionCount()
{
string html = await RenderAsync(withFault: false);
Assert.Contains("No fault records in this snapshot.", html, StringComparison.Ordinal);
Assert.Contains("Open sessions", html, StringComparison.OrdinalIgnoreCase);
Assert.Contains("Healthy", html, StringComparison.Ordinal);
}
private static async Task<string> RenderAsync(bool withFault, bool longFault = false)
{
DateTimeOffset at = new(2026, 11, 13, 20, 0, 0, TimeSpan.Zero);
DashboardSnapshot snapshot = new(at, at.AddHours(-3), TimeSpan.FromHours(3), withFault ? "Degraded" : "Healthy", "fixture", withFault ? [new("fixture-session", "synthetic", ZB.MOM.WW.MxGateway.Contracts.Proto.SessionState.Faulted, null, null, null, at, at, null, 123, null, null, 0, "Fixture fault")] : [], [],
[new("mxgateway.sessions.open", 0), new("mxgateway.workers.running", 102), new("mxgateway.events.worker_queue.depth", 103),
new("mxgateway.commands.failed", 104), new("mxgateway.events.received", 105), new("mxgateway.faults", 106), new("mxgateway.queues.overflows", 107)],
withFault ? [new("Worker", "fixture-session", 123, "Faulted", "Fixture worker failed" + (longFault ? new string('x', 300) + "<script>fixture</script>" : ""), at)] : [], [], null!,
DashboardGalaxySummary.Unknown with { Status = DashboardGalaxyStatus.Healthy, LastDeployTime = at, LastSuccessAt = at, LastQueriedAt = at, ObjectCount = 201, AreaCount = 202, AttributeCount = 203, HistorizedAttributeCount = 204, AlarmAttributeCount = 205 });
ServiceCollection services = new();services.AddLogging();
services.AddSingleton<IDashboardSnapshotService>(new SnapshotService(snapshot));
services.AddSingleton<IDashboardSnapshotFeed, IdleFeed>();
services.AddSingleton<NavigationManager, FixtureNavigation>();
await using ServiceProvider provider = services.BuildServiceProvider();
await using HtmlRenderer renderer = new(provider, provider.GetRequiredService<ILoggerFactory>());
return await renderer.Dispatcher.InvokeAsync(async () => (await renderer.RenderComponentAsync<DashboardHome>()).ToHtmlString());
}
private sealed class SnapshotService(DashboardSnapshot snapshot) : IDashboardSnapshotService
{
public DashboardSnapshot GetSnapshot() => snapshot;
public IAsyncEnumerable<DashboardSnapshot> WatchSnapshotsAsync(CancellationToken cancellationToken) => new IdleFeed().WatchAsync(cancellationToken);
}
private sealed class IdleFeed : IDashboardSnapshotFeed
{
public async IAsyncEnumerable<DashboardSnapshot> WatchAsync([EnumeratorCancellation] CancellationToken cancellationToken)
{ await Task.Delay(Timeout.Infinite, cancellationToken);yield break; }
}
private sealed class FixtureNavigation : NavigationManager
{
public FixtureNavigation() => Initialize("http://localhost/", "http://localhost/");
protected override void NavigateToCore(string uri, bool forceLoad) => throw new NotSupportedException("Read-only renderer");
}
}