Skip to content

Fix/700 monitor html type error - #794

Open
alexeyMishinDI wants to merge 3 commits into
DataIntellectTech:masterfrom
alexeyMishinDI:fix/700-monitor-html-type-error
Open

alexeyMishinDI wants to merge 3 commits into
DataIntellectTech:masterfrom
alexeyMishinDI:fix/700-monitor-html-type-error

Conversation

@alexeyMishinDI

Copy link
Copy Markdown
Contributor

Problem

Opening the monitor HTML UI throws 'type. On connect, start subscribes the page to heartbeat, logmsg and lmchart via .html.wssub. .html.add then builds an empty table copy of each subscription (0#v), but lmchart is a function, so it errors. start never sends the initial data and the page loads blank.

Fix

One line in .html.add. It only builds the empty copy for tables (98h) and returns () for anything else. Subscription registration is unchanged, so all three subscriptions stay in place and the error chart keeps updating live. The return value isn't used by wssub anyway.

This takes a different approach from #708, keeping the lmchart subscription so live chart updates still reach the page.

Testing

  • Manual: ran a monitor process and opened the UI in a browser. The page loads with data and no error, and the error chart updates live on new ERR log messages.
  • k4unit tests in tests/html/ (tests/html/run.sh): 6 tests. All pass with the fix, and 2 fail with 'type on the old code.

Docs

docs/visualisation.md: noted that a subscription name doesn't have to be a table.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant