Repository navigation
[Frontend] feat(testing-view): adapt to the new backend's catalogs and WebSocket topics - #688
Open
jeereemiassb wants to merge 6 commits into
Open
jeereemiassb wants to merge 6 commits into
jeereemiassb wants to merge 6 commits into
Conversation
Subscribe to protection/update and keep the last protection of each measurement, keyed by the low 13 bits of the compound protection id. The measurement row turns red with a shield icon until the messages are cleared, since the new protocol sends no recovery event. Measurements are matched by a new optional Variable.adjId (numeric ADJ id), which the new adj/DataPackets catalog has to fill.
- Fetch packets, orders and protections from adj/DataPackets, adj/OrderPackets and adj/ProtectionPackets - Identify measurements by alias and command params by a measurements array with their protections instead of safe/warning ranges - Show triggered protections as messages and categorize messages by the topic they arrive on (message/update, backend/update) - Update mocks to the new shapes
…ackend-http # Conflicts: # frontend/testing-view/src/mocks/telemetry.ts
- Key podData/update measurements by alias (the backend sends numeric ADJ ids) - Read backend messages from backend/message - Messages and protections carry the full date in their timestamp - Keep a topic subscribed while any useTopic listener is left: the backend keeps one subscription per topic and connection, so one listener unmounting stopped the topic for the rest
…backend sends them - Protections boards send on message/update are shown as protections (warnings, which only carry a text, as messages), with the value rounded and its limits: "Value: 74.05 (Limit: 70)" - protection/update shows the rounded value and its condition, and says which protection it is when the ADJ doesn't have it - backend/message shows the board it concerns, or Backend, and its text as title - Closed messages show their icon at the end of the row
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adapts testing-view to the new Rust backend: the ADJ catalogs it serves over HTTP and the WebSocket topics of
station::payload.It includes #686 (3423725), so merging this one merges that too. It also brings Javier's
ws_testexample and a fix in frontend-kit for topic subscriptions.Features
Catalogs (HTTP)
adj/DataPackets,adj/OrderPacketsandadj/ProtectionPackets.order/sendsends every parameter by alias with the type the backend validates: its wire type (float32…),boolorenum, with enum values by option name.WebSocket
podData/update: measurements arrive keyed by their numeric ADJ id and are keyed back by alias.protection/update: highlights the measurement until the messages are cleared ([Frontend] feat(testing-view): highlight measurements that trigger a protection #686) and shows a message with the board, name, condition and severity from the ADJ catalogs.message/update: protections a board sends are shown as protections (warnings, which only carry a text, as messages), with the value rounded and its limits:Value: 74.05 (Limit: 70).backend/message: messages the backend itself produces, labelled with the board they concern, orBackend.frontend-kit
useTopiclistener is left. The backend keeps one subscription per topic and connection, so one listener unmounting stopped the topic for the rest: leaving Logs stoppedlogger/responsefor the header.Backend
ws_testexample: serves station's HTTP API and WebSocket without an ADJ and publishes fake updates on every topic.How to test
UPPER BOUND), aprotection/updateand a backend message about PCU.ws_testserves no ADJ, so Telemetry and Commands stay empty and its protection shows asUnknown · Protection 8704, "Not in the ADJ". With an ADJ, protections resolve to their board, measurement, condition and severity.pnpm testinfrontend/testing-view.Known issues
FrontendDisconnected, so the backend's timeout probably needs to be higher.ws_testtimestamps are UTC.