Right, trying again. Here is the flow:
[{"id":"449c2bccca750e21","type":"group","z":"ba86b64531fa3971","name":"System Status Route","style":{"fill":"#bfdbef","fill-opacity":"0.3","label":true,"color":"#000000"},"nodes":["c6b09717781cbef3","489a08be559afc17","4efa56dd74d7e9ec","f769f765dbfae153","536e0e510bcee507","cc684196ea044cc0","ce87ebf2ecdd1e6f","8a13de75076f2b5b","28a03db1d4116ca7"],"x":32.99998092651367,"y":679,"w":1070,"h":354.9999704360962},{"id":"99b68b4208b45e2f","type":"subflow","name":"Reset MSG","info":"","category":"","in":[{"x":60,"y":40,"wires":[{"id":"44c96ae25491502b"}]}],"out":[{"x":320,"y":40,"wires":[{"id":"44c96ae25491502b","port":0}]}],"env":[],"meta":{},"color":"#C0C0C0","icon":"font-awesome/fa-close"},{"id":"44c96ae25491502b","type":"function","z":"99b68b4208b45e2f","name":"delete msg","func":"return {}\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":190,"y":40,"wires":[[]]},{"id":"c6b09717781cbef3","type":"uib-update","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"","topic":"","mode":"update","modeSourceType":"update","cssSelector":"\"[data-topic=\\\"\" & \ttopic & \t\"\\\"] .status-side-panel\"","cssSelectorType":"jsonata","slotSourceProp":"","slotSourcePropType":"msg","attribsSource":"{\t \"class\": payload in [\"active\", \"Online\", \"online\", true, 1, \"1\"] ? \"success status-side-panel\" : \"error animate-pulse status-side-panel\",\t \"title\": \"Last update: \" & $now(),\t \"data-updated\": $now(),\t \"data-updatedBy\": \"monitor\"\t}","attribsSourceType":"jsonata","slotPropMarkdown":false,"x":650,"y":780,"wires":[["f769f765dbfae153"]]},{"id":"489a08be559afc17","type":"group","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"1) Create base data. Save to flow.bookmarks(file). Create HTML. Save to `<uibRoot>/home/src/fe-routes/system-status.html`. Reloads page. \\n UPDATE IF STATUS MONITORS ADDED/REMOVED","style":{"fill":"#ffffbf","fill-opacity":"0.33","label":true,"color":"#000000"},"nodes":["b21e10dabba89b53","eda3a8cc439554c8","e5a6036ad8914588","bc1d55b8ecac66d3","d504c4c46b8b0466"],"x":58.99998092651367,"y":843,"w":1018,"h":164.9999704360962},{"id":"b21e10dabba89b53","type":"group","z":"ba86b64531fa3971","g":"489a08be559afc17","name":"Create flow.bookmarks","style":{"label":true},"nodes":["6ba55b0c32f5ba4e","cf3f36e505ed0a59"],"x":84.99998092651367,"y":899.9999704360962,"w":152,"h":82},{"id":"6ba55b0c32f5ba4e","type":"inject","z":"ba86b64531fa3971","g":"b21e10dabba89b53","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1-main","payload":"[{\"group\":\"Network\",\"view\":\"open\",\"checks\":[{\"id\":\"router\",\"name\":\"Router\",\"type\":\"Network\",\"link\":\"https://192.168.1.1/\",\"description\":\"192.168.1.1\",\"statusTopic\":\"telegraf/ping/router.knightnet.co.uk\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"ipcamera1\",\"name\":\"Back Yard Camera\",\"type\":\"Network\",\"link\":\"http://192.168.1.196/\",\"description\":\"192.168.1.196\",\"statusTopic\":\"telegraf/ping/192.168.1.196\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"switch1\",\"name\":\"TP-Link Managed Switch\",\"type\":\"Network\",\"link\":\"http://192.168.1.155/\",\"description\":\"192.168.1.155\",\"statusTopic\":\"telegraf/ping/192.168.1.155\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"wifiap2\",\"name\":\"Unifi AP Pro\",\"type\":\"Network\",\"link\":\"https://home.knightnet.co.uk:8443/\",\"description\":\"192.168.1.173\",\"statusTopic\":\"telegraf/ping/192.168.1.173\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"wifiap1\",\"name\":\"Unifi AP LR\",\"type\":\"Network\",\"link\":\"https://home.knightnet.co.uk:8443/\",\"description\":\"192.168.1.163\",\"statusTopic\":\"telegraf/ping/192.168.1.163\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"wiser2\",\"name\":\"Wiser Controller (ping)\",\"type\":\"Service\",\"description\":\"192.168.1.185\",\"statusTopic\":\"telegraf/ping/192.168.1.185\",\"show\":[\"status\",\"bookmark\"]}]},{\"group\":\"Services\",\"view\":\"open\",\"checks\":[{\"id\":\"NAS\",\"name\":\"NAS\",\"type\":\"Service\",\"link\":\"https://nas.knightnet.co.uk:5001/\",\"description\":\"nas.knightnet.co.uk:5001\",\"statusTopic\":\"telegraf/ping/192.168.1.161\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"nrmain\",\"name\":\"Node-RED (Live)\",\"type\":\"Service\",\"link\":\"https://home.knightnet.co.uk:1880/red/\",\"description\":\"home.knightnet.co.uk:1880\",\"statusTopic\":\"telegraf/http_response/https:__localhost:1880_test1\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"nrui\",\"name\":\"Node-RED (UI)\",\"type\":\"Service\",\"link\":\"https://home.knightnet.co.uk:1880/ui\",\"description\":\"home.knightnet.co.uk:1880/ui\",\"statusTopic\":\"telegraf/http_response/https:__localhost:1880_ui\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"Grafana\",\"name\":\"Grafana\",\"type\":\"Service\",\"link\":\"http://home.knightnet.co.uk:3000/\",\"description\":\"home.knightnet.co.uk:3000\",\"statusTopic\":\"services/Grafana\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"Zigbee2MQTT\",\"name\":\"Zigbee2MQTT\",\"type\":\"Service\",\"link\":\"http://home.knightnet.co.uk:8085/#/\",\"description\":\"home.knightnet.co.uk:8085\",\"statusTopic\":\"services/Zigbee2MQTT\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"wiser\",\"name\":\"Wiser Control (NR)\",\"type\":\"Service\",\"description\":\"192.168.1.185\",\"statusTopic\":\"wiser\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"Telegraf\",\"name\":\"Telegraf Data Collector\",\"type\":\"Service\",\"description\":\"home.knightnet.co.uk\",\"statusTopic\":\"services/Telegraf\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"Unifi\",\"name\":\"Unifi Controller\",\"type\":\"Service\",\"link\":\"https://home.knightnet.co.uk:8443/\",\"description\":\"home.knightnet.co.uk:8443\",\"statusTopic\":\"services/Unifi\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"Mosquitto\",\"name\":\"MQTT Broker\",\"type\":\"Service\",\"description\":\"Mosquitto MQTT Broker\",\"statusTopic\":\"telegraf/procstat_lookup/mosquitto.service\",\"show\":[\"status\"]},{\"id\":\"Docker\",\"name\":\"Docker\",\"type\":\"Service\",\"description\":\"Docker\",\"statusTopic\":\"telegraf/procstat_lookup/docker.service\",\"show\":[\"status\"]},{\"id\":\"InfluxDB\",\"name\":\"InfluxDB\",\"type\":\"Service\",\"description\":\"InfluxDB\",\"statusTopic\":\"telegraf/procstat_lookup/influxdb.service\",\"show\":[\"status\"]}]},{\"group\":\"IoT Devices\",\"view\":\"open\",\"checks\":[{\"id\":\"shelly_rgbw2_01\",\"name\":\"Shelly RGB\",\"type\":\"IoT\",\"link\":\"http://192.168.1.175/\",\"description\":\"192.168.1.175\",\"statusTopic\":\"shellies/shelly_rgbw2_01/online\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"shelly1PM_01\",\"name\":\"Shelly 1PM\",\"type\":\"IoT\",\"link\":\"http://192.168.1.176/\",\"description\":\"192.168.1.176\",\"statusTopic\":\"known_devices/shelly1PM_01\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"d1m02\",\"name\":\"d1m02\",\"type\":\"IoT\",\"link\":\"http://192.168.1.152/\",\"description\":\"192.168.1.152\",\"statusTopic\":\"known_devices/d1m02\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"d1m03\",\"name\":\"d1m03\",\"type\":\"IoT\",\"link\":\"http://192.168.1.118/\",\"description\":\"192.168.1.118\",\"statusTopic\":\"known_devices/d1m03\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"d1m04\",\"name\":\"d1m04\",\"type\":\"IoT\",\"link\":\"http://192.168.1.187/\",\"description\":\"192.168.1.187\",\"statusTopic\":\"known_devices/d1m04\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"d1m05\",\"name\":\"Living Room Sensors\",\"type\":\"IoT\",\"link\":\"http://192.168.1.188/\",\"description\":\"192.168.1.188\",\"statusTopic\":\"known_devices/d1m05\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"m5basic01\",\"name\":\"Office Sensors (M5 Basic)\",\"type\":\"IoT\",\"link\":\"http://192.168.1.193/\",\"description\":\"192.168.1.193\",\"statusTopic\":\"ESP/m5basic01\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"m5atom01\",\"name\":\"M5 Atom\",\"type\":\"IoT\",\"link\":\"http://192.168.1.194/\",\"description\":\"192.168.1.194\",\"statusTopic\":\"ESP/m5atom01\",\"show\":[\"status\",\"bookmark\"]}]},{\"group\":\"Home Automation\",\"view\":\"collapsed\",\"checks\":[{\"id\":\"lighting\",\"name\":\"Lighting\",\"type\":\"HA\",\"link\":\"https://home.knightnet.co.uk:1880/lights/\",\"description\":\"home.knightnet.co.uk:1880/lights\",\"statusTopic\":\"telegraf/http_response/https:__localhost:1880_lights\",\"show\":[\"status\",\"bookmark\"]}]},{\"group\":\"Websites\",\"view\":\"collapsed\",\"checks\":[{\"id\":\"www\",\"name\":\"Blog\",\"type\":\"Web\",\"link\":\"https://www.totallyinformation.net/\",\"description\":\"www.totallyinformation.net\",\"statusTopic\":\"telegraf/ping/www.totallyinformation.net\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"wc\",\"name\":\"Web Components\",\"type\":\"Web\",\"link\":\"https://wc.totallyinformation.net/\",\"description\":\"wc.totallyinformation.net\",\"statusTopic\":\"telegraf/ping/wc.totallyinformation.net\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"uibdocs\",\"name\":\"UIBUILDER Docs\",\"type\":\"Web\",\"link\":\"https://totallyinformation.github.io/node-red-contrib-uibuilder/#/\",\"description\":\"totallyinformation.github.io/node-red-contrib-uibuilder\",\"statusTopic\":\"telegraf/http_response/https:__totallyinformation.github.io_node-red-contrib-uibuilder\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"maait\",\"name\":\"Much Ado About IT (blog)\",\"type\":\"Web\",\"link\":\"https://it.knightnet.org.uk/\",\"description\":\"it.knightnet.org.uk\",\"statusTopic\":\"telegraf/ping/it.knightnet.org.uk\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"bbc\",\"name\":\"BBC\",\"type\":\"Web\",\"link\":\"https://bbc.co.uk/\",\"description\":\"bbc.co.uk\",\"statusTopic\":\"telegraf/ping/bbc.co.uk\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"youtube\",\"name\":\"Youtube\",\"type\":\"Web\",\"link\":\"https://youtube.com/\",\"description\":\"youtube.com\",\"statusTopic\":\"telegraf/ping/youtube.com\",\"show\":[\"status\",\"bookmark\"]},{\"id\":\"nrforum\",\"name\":\"Node-RED Forum\",\"type\":\"Web\",\"link\":\"https://discourse.nodered.org/latest\",\"description\":\"discourse.nodered.org\",\"statusTopic\":\"telegraf/http_response/https:__discourse.nodered.org_latest\",\"show\":[\"status\",\"bookmark\"]}]}]","payloadType":"json","x":145.99998092651367,"y":940.9999704360962,"wires":[["cf3f36e505ed0a59"]],"l":false},{"id":"cf3f36e505ed0a59","type":"change","z":"ba86b64531fa3971","g":"b21e10dabba89b53","name":"","rules":[{"t":"set","p":"#:(file)::bookmarks","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"updated","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":195.99998092651367,"y":940.9999704360962,"wires":[["1953e485f2994ab1"]],"l":false},{"id":"eda3a8cc439554c8","type":"group","z":"ba86b64531fa3971","g":"489a08be559afc17","name":"Page HTML (flow[file].bookmarks)","style":{"label":true},"nodes":["1953e485f2994ab1","2941df54d1ab3578"],"x":264.9999809265137,"y":899.9999704360962,"w":282,"h":82},{"id":"1953e485f2994ab1","type":"template","z":"ba86b64531fa3971","g":"eda3a8cc439554c8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<style>\n .status summary {\n cursor: pointer;\n }\n .status summary > h2 {\n display:inline-block;\n }\n</style>\n<div id=\"status\" class=\"status\">\n {{#flow[file].bookmarks}}\n <details {{view}}>\n <summary role=\"heading\" aria-level=\"2\"><h2 xclass=\"status-heading\">{{group}}</h2></summary>\n <div class=\"status-grid\">\n {{#checks}}\n {{#link}}<a href=\"{{link}}\" target=\"_blank\" class=\"status-link\">{{/link}}\n <div id=\"st-{{id}}\" class=\"box flex surface4\" data-topic=\"{{statusTopic}}\" title=\"MQTT Topic: {{statusTopic}}\">\n <div class=\"status-side-panel\"></div>\n <div>\n <div>{{name}}</div>\n <div class=\"text-smaller\">{{description}}</div>\n </div>\n </div>\n {{#link}}</a>{{/link}}\n {{/checks}}\n </div>\n </details>\n {{/flow[file].bookmarks}}\n</div>\n","output":"str","x":305.9999809265137,"y":940.9999704360962,"wires":[["2941df54d1ab3578"]],"l":false},{"id":"2941df54d1ab3578","type":"uib-element","z":"ba86b64531fa3971","g":"eda3a8cc439554c8","name":"","topic":"","elementtype":"html","parent":"body","parentSource":"","parentSourceType":"str","elementid":"status","elementId":"","elementIdSourceType":"str","heading":"","headingSourceType":"str","headingLevel":"h2","data":"payload","dataSourceType":"msg","position":"last","positionSourceType":"str","passthrough":false,"confData":{},"x":430.9999809265137,"y":940.9999704360962,"wires":[["e5a6036ad8914588"]]},{"id":"e5a6036ad8914588","type":"uib-html","z":"ba86b64531fa3971","g":"489a08be559afc17","name":"","topic":"","useTemplate":false,"x":650.9999809265137,"y":940.9999704360962,"wires":[["bc1d55b8ecac66d3","d504c4c46b8b0466"]]},{"id":"bc1d55b8ecac66d3","type":"uib-save","z":"ba86b64531fa3971","g":"489a08be559afc17","url":"home","uibId":"8f4068233f5df004","folder":"src/fe-routes","fname":"system-status.html","createFolder":false,"reload":true,"usePageName":false,"encoding":"utf8","mode":438,"name":"home:src/fe-routes/system-status.html","topic":"","x":900.9999809265137,"y":940.9999704360962,"wires":[]},{"id":"d504c4c46b8b0466","type":"debug","z":"ba86b64531fa3971","g":"489a08be559afc17","name":"debug 35","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":900,"wires":[]},{"id":"4efa56dd74d7e9ec","type":"group","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"------- 2) Start Monitoring. Dynamic subscriptions using flow.bookmarks. -------","style":{"label":true,"color":"#000000","fill":"#d1d1d1","fill-opacity":"0.3"},"nodes":["56a8c57c3ece2c3b","3d4b7c17594abd24","952c33956803e4e6","a5bbe6e2d887de57","21a9f7f01cde56b5","0271469e157ef571","72efa345c8308384","bedbb50ff03fa4d6"],"x":64.99998092651367,"y":739.9999704360962,"w":486,"h":82},{"id":"56a8c57c3ece2c3b","type":"mqtt in","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","topic":"","qos":"2","datatype":"auto-detect","broker":"3784c9f0.57bab6","nl":false,"rap":true,"rh":0,"inputs":1,"x":475.9999809265137,"y":780.9999704360962,"wires":[["c6b09717781cbef3"]],"l":false},{"id":"3d4b7c17594abd24","type":"split","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":175.99998092651367,"y":780.9999704360962,"wires":[["a5bbe6e2d887de57"]],"l":false},{"id":"952c33956803e4e6","type":"inject","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"Start-Checks","payload":"#:(file)::bookmarks","payloadType":"flow","x":125.99998092651367,"y":780.9999704360962,"wires":[["3d4b7c17594abd24"]],"l":false},{"id":"a5bbe6e2d887de57","type":"split","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"group","x":225.99998092651367,"y":780.9999704360962,"wires":[["21a9f7f01cde56b5"]],"l":false},{"id":"21a9f7f01cde56b5","type":"switch","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","property":"group","propertyType":"msg","rules":[{"t":"eq","v":"checks","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":275.9999809265137,"y":780.9999704360962,"wires":[["0271469e157ef571"]],"l":false},{"id":"0271469e157ef571","type":"split","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"type","x":325.9999809265137,"y":780.9999704360962,"wires":[["bedbb50ff03fa4d6"]],"l":false},{"id":"72efa345c8308384","type":"change","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"payload.statusTopic","tot":"msg","dc":true},{"t":"set","p":"action","pt":"msg","to":"subscribe","tot":"str"},{"t":"delete","p":"payload","pt":"msg"},{"t":"delete","p":"parts","pt":"msg"},{"t":"delete","p":"group","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":425.9999809265137,"y":780.9999704360962,"wires":[["56a8c57c3ece2c3b"]],"l":false},{"id":"bedbb50ff03fa4d6","type":"switch","z":"ba86b64531fa3971","g":"4efa56dd74d7e9ec","name":"Input has Status Topic Property","property":"payload","propertyType":"msg","rules":[{"t":"hask","v":"statusTopic","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":375.9999809265137,"y":780.9999704360962,"wires":[["72efa345c8308384"]],"l":false},{"id":"3784c9f0.57bab6","type":"mqtt-broker","name":"nrmain-local (v5)","broker":"localhost","port":"1883","clientid":"nrmain-local","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"5","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"services/nrmain","birthQos":"0","birthRetain":"true","birthPayload":"Online","birthMsg":{},"closeTopic":"services/nrmain","closeQos":"0","closeRetain":"true","closePayload":"Offline","closeMsg":{},"willTopic":"services/nrmain","willQos":"0","willRetain":"true","willPayload":"Offline","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"f769f765dbfae153","type":"uib-cache","z":"ba86b64531fa3971","g":"449c2bccca750e21","cacheall":false,"cacheKey":"topic","newcache":true,"num":1,"storeName":"default","name":"cache","storeContext":"context","varName":"uib_cache","x":890,"y":780,"wires":[["28a03db1d4116ca7"]]},{"id":"536e0e510bcee507","type":"subflow:99b68b4208b45e2f","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"","x":715,"y":740,"wires":[["cc684196ea044cc0"]],"l":false},{"id":"cc684196ea044cc0","type":"change","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"Cache replay","rules":[{"t":"set","p":"uibuilderCtrl","pt":"msg","to":"Route Change","tot":"str"},{"t":"set","p":"cacheControl","pt":"msg","to":"REPLAY","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":765,"y":740,"wires":[["f769f765dbfae153"]],"l":false},{"id":"ce87ebf2ecdd1e6f","type":"inject","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":595,"y":740,"wires":[["536e0e510bcee507"]],"l":false},{"id":"8a13de75076f2b5b","type":"link in","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"link in 1","links":["73a73c96848614cc"],"x":645,"y":720,"wires":[["536e0e510bcee507"]]},{"id":"28a03db1d4116ca7","type":"link out","z":"ba86b64531fa3971","g":"449c2bccca750e21","name":"link out 69","mode":"link","links":["55646c84699d14f1"],"x":1005,"y":780,"wires":[]},{"id":"85e61f32edf90623","type":"global-config","env":[],"modules":{"node-red-contrib-uibuilder":"7.4.3"}}]
Note that the link-in
node comes from the uibuilder node's control output when you switch to the appropriate SPA "page".
As you can see, as my SPA got more complex, I've split the control outputs. The first level separates out connection and route change messages:
[{"id":"82e10fdbb05efa3e","type":"switch","z":"ba86b64531fa3971","g":"77eaa81c51dc913e","name":"ctrl","property":"uibuilderCtrl","propertyType":"msg","rules":[{"t":"eq","v":"client connect","vt":"str"},{"t":"eq","v":"route change","vt":"str"},{"t":"eq","v":"visibility","vt":"str"},{"t":"eq","v":"client disconnect","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":5,"x":770,"y":140,"wires":[["0a982d7cfd4d87fa"],["67cfadcf89cf7ea6"],[],[],["9c288ee097514452"]],"outputLabels":["client connect","route change","visibility","client disconnect","otherwise"]}]
The "Handle Route Ctrl" switch node simply acts as a switchboard to trigger any flows (if any) needed for each route.
That approach makes the whole logic structure a lot easier to adapt as the SPA matures.
I have also used separate cache nodes for each route. Again, this greatly simplifies the control logic. The link-in for the system status page simply does a cache replay.