feat(dashboard): show aggregated node status with a refresh button#39
Merged
Conversation
Each dashboard node card now shows a 3-segment bar (UP / no status / DOWN) aggregated from GET rest/node/status/subscription, plus a per-node refresh button that POSTs rest/node/status/refresh/{id} and re-fetches. A tool-level card aggregates the stats of its distinct instance nodes and rechecks each of them.
|
|
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.



Context
Implements #37. Each dashboard node card now surfaces the aggregated
UP/no-status/DOWN status of its subscriptions, with a manual refresh.
What it does
GET rest/node/status/subscription(per instance-node{ total, UP, DOWN }), aggregates it per card, and exposesnodeStatus.SubscriptionGroupCardrenders a 3-segment bar (green UP / grey no-status / redDOWN) with an
up/totalcounter and tooltip, plus a refresh button.rest/node/status/refresh/{id}then re-fetches the stats; a per-cardrefreshingflag drives a spinner.Design decision (node-id mapping)
Dashboard cards are keyed at the TOOL level (e.g.
service:prov:aws) but each row isa subscription on an INSTANCE node (e.g.
service:prov:aws:localtest), which is howthe backend keys its stats. So a card's status = the sum over its distinct instance
nodes, and refresh rechecks each of them (not a single node id) — a deliberate read
of the tool→instances aggregation. Happy to adjust if you'd rather scope per instance.
Tests
npm run test(incl. 3 new card tests: segment widths from nodeStatus, refresh-nodeemit, health-bar fallback) and
npm run buildpass. Verified in the app: theProvisioning AWS card shows 3/3 UP (full green), and refresh triggers the POST +
re-fetch.
Note
Base feature/vuejs → Refs #37, close manually after merge.
Feedback welcome.