|
|
||
|---|---|---|
| .. | ||
| dashboard_core | ||
| README.md | ||
| dashboard_installer.sh | ||
README.md
Edge Dashboards
This stage deploys standalone dashboards on dedicated ports without touching the existing admin UI.
Model
dashboard_id = port- current runtime source directory:
/var/lib/itscreen/Downloads/it-screen/ - component source file for auto-generated editors:
/var/lib/itscreen/data/it-screen/it-screen/items.json - deployed runtime lives in
/opt/iomatex-dashboards/ - one systemd instance serves one dashboard:
iomatex-dashboard@<port>.service - one sync service auto-creates component dashboard instances from
items.json:iomatex-component-dashboards.service - one path watcher reacts to
items.jsonchanges:iomatex-component-dashboards.path - current HTML selection mode: newest
.htmlfile by modification time - dashboard server proxies bridge API:
/api/bridge/event->http://127.0.0.1:8787/api/event/api/bridge/component->http://127.0.0.1:8787/api/component/api/bridge/health->http://127.0.0.1:8787/api/health
Modes
static- existing behavior
- one HTML dashboard on a fixed port
/serves the selected.htmlfrom/var/lib/itscreen/Downloads/it-screen/
component_index- common entry page on the main dashboard port
- reads
elements[]fromitems.json - shows a select with all available ids
- opens the selected dashboard on
http://localhost:<id>
component- one lightweight page per
elements[].id - service port equals the element id, for example
5771 -> http://localhost:5771 /serves a built-in minimal component pageGET /api/componentreads the current component fromitems.json
- one lightweight page per
Current main step
- the main dashboard instance is configured in
component_indexmode - the entry page lists all
elements[].id - each dedicated dashboard page currently shows only:
idtitleduration
Component dashboard behavior
- installer deploys the runtime and starts
iomatex-component-dashboards.service - installer also enables
iomatex-component-dashboards.path - the sync service reads
/var/lib/itscreen/data/it-screen/it-screen/items.json - ids are taken from
elements[].id - for every id it writes
/etc/iomatex/dashboards.d/<id>.envwithDASHBOARD_MODE=component - then it enables
iomatex-dashboard@<id>.service - the entry page is served by the main dashboard port in
component_indexmode - each component page reads the component by id and shows only
id,title,duration items.jsonchanges are handled bysystemd.path, not by polling loops- sync uses a short debounce window before reading the file
- existing
:<id>dashboards are kept running when only component content changes, because pages read fresh data directly fromitems.json - dashboards are created for new ids and removed for stale ids
Install
sudo bash stage_dashboards/dashboard_installer.sh
Verify
ls -lah /var/lib/itscreen/Downloads/it-screen/
curl -I http://127.0.0.1:5678/
curl http://127.0.0.1:5678/
curl http://127.0.0.1:5678/api/components-index
systemctl status iomatex-dashboard@5678.service --no-pager -n 40
journalctl -u iomatex-dashboard@5678.service --no-pager -n 50
systemctl status iomatex-component-dashboards.service --no-pager -n 50
systemctl status iomatex-component-dashboards.path --no-pager -n 50
curl http://127.0.0.1:5771/api/component
Example check for component 5771
systemctl status iomatex-dashboard@5771.service --no-pager -n 40
curl -I http://127.0.0.1:5771/
curl http://127.0.0.1:5771/api/component | jq '.component | {id, title, duration}'