Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Staleness] Functionality in telemetry component views and API #6109

Closed
jvigliotta opened this issue Jan 11, 2023 · 7 comments · Fixed by #6108
Closed

[Staleness] Functionality in telemetry component views and API #6109

jvigliotta opened this issue Jan 11, 2023 · 7 comments · Fixed by #6108
Assignees
Labels
type:feature Feature. Required intentional design
Milestone

Comments

@jvigliotta
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Users need a way to know if the telemetry they are viewing is stale. Decisions made assuming telemetry is fresh could have a negative effect if the telemetry is in fact stale. Having a way to know for sure if telemetry is stale or not is very useful.

Describe the solution you'd like
Open MCT should have the ability (through the API) to add "Staleness Providers" these would be handled on the telemetry serving side and Open MCT would have no knowledge of their inner-workings, but would be able to respond and alert the user when it is notified through the provider that a telemetry endpoint has become stale.

Describe alternatives you've considered
We currently have a rudimentary way of doing this with Condition Sets. They have a way of tracking the time since a telemetry endpoint last received any data. This is configurable, but it is a fixed time interval and it's not based on any server side knowledge.

@jvigliotta
Copy link
Contributor Author

jvigliotta commented Jan 11, 2023

Testing

  • Using stale telemetry (from YAMCS preferably or the SWG with the "staleness" option on)
  • The SWG will oscillate staleness every 10 seconds when it is set up to do so in it's properties
  • Create components that have (for multi-composition) multiple telemetry points, both stale and not stale producing
  • Components: LAD Tables (and Table Sets), Telemetry Tables, Plots, Stacked Plots, Overlay Plots, Gauges
  • For components with Legends, make sure when an item is stale it's highlighted in the legend for others make sure that there is a cyan border around the item when it's stale
  • Add and remove telemetry, both stale and not stale and make sure things seem to be working as they should (indicating staleness when stale and not indicating when not stale)
  • Create a condition set with stale and not stale items and try different variations of 'any', 'all', etc. Make sure stale and not stale items are triggering conditions accordingly and that when viewing a condition set or editing a condition set, whether you have selected the "is stale" criteria or not, that there is a cyan border when an item is stale
  • Create Display and Flexible Layouts and include all of the items above as well as Alphanumerics (just drop a SWG in) and make sure staleness indication is working as expected
  • Also use "is stale" condition sets for conditional styling to make sure they are working as expected

@ozyx ozyx added this to the Target:2.1.6 milestone Jan 17, 2023
@charlesh88
Copy link
Contributor

charlesh88 commented Jan 19, 2023

Testing Resources and Reference

Here's an exported folder with many elements to aid testing. Mostly @jvigliotta with some tweaks from @charlesh88.
Staleness CH after JV.json.zip

Flex Layout with stale elements
Screen Shot 2023-01-19 at 4 58 42 PM

Display Layout with stale elements
Screen Shot 2023-01-19 at 4 57 10 PM

Display Layout not stale
Note the Gauge in lower left with a red border applied as static styling. When stale, stale-styling overrides or works in concert with static styling.
Screen Shot 2023-01-19 at 4 57 03 PM

charlesh88 added a commit that referenced this issue Jan 19, 2023
- New staleness glyph and font CSS added.
charlesh88 added a commit that referenced this issue Jan 19, 2023
- Normalized staleness colors as theme constants.
- New mixins for staleness application to view elements.
- Applied staleness styling to all relevant view elements.
- TODO: smoke-test in Show theme.
charlesh88 added a commit that referenced this issue Jan 19, 2023
- Refined style for Snow theme.
jvigliotta added a commit that referenced this issue Jan 23, 2023
* initial telemetry api updates for staleness support

* modifying staleness to a subsription style

* fixing variable name

* debuggin

* put the subscribe in the wrong place

* stale class for object views

* temp cyan border for testing

* added staleness to swg, working on stacked plot staleness

* WIP: stacked plot staleness

* reverting, going a different route

* staleness on stacked plots

* plot legend staleness

* remove debug code

* staleness for alphanumerics

* lad table and table set staleness

* overlay plot staleness

* remove debug code

* hardened lad staleness functionality fixed plots without composition bug

* adding staleness to gauges

* renaming telemetry age check functionality so it does not conflict with new staleness functionality

* couple one-off fixes here and there, and WIP for condition sets, moving to telemetry tables to facilitate styling of completed components

* small fix on lad tables, added staleness functionality to tables

* finishing up condition sets

* some cleaning up

* adding border to condition sets when an item is stale

* fixing dub sub

* addressing PR comment, moving repeated code to a function

* robustified the SWG stalenes provider, little fixes here and there as far as cleaning up listeners and... whatnot

* removing debug code

* typo fixes

* cleanin up debug code

* created a simple stalenes mixin for more basic usage in components

* more robustification, if a new staleness subscription happens, will now send the current staleness value if we have it, beefed up example stalenes swg provider

* beefed up staleness mixin a bit to give it more use

* copyright

* cleanin up ladtable code

* cleanin up ladtable code

* cleaning up lad table sets

* some minor updates

* Closes #6109
- New staleness glyph and font CSS added.

* Closes #6109
- Normalized staleness colors as theme constants.
- New mixins for staleness application to view elements.
- Applied staleness styling to all relevant view elements.
- TODO: smoke-test in Show theme.

* adding staleness utils helper, mixin and isStale functionalirty for telemtry api

* Closes #6109
- Refined style for Snow theme.

* need to have one domainObject per stalenes utility

* making sure we handle domains correctly while dealing with staleness

* couple fixes

* moving abort controller logic to a spot where it makes more sense

* added some more info for the StalenesProvider interface docs

* returning undefinded for ifStale requests with no provider

* debuggin

* debuggin

* missed "isStale" call in condtioncollections

* removing debug code and using mixin unsubscribe in gauge

* fixing tests

* more targeted tree item click

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: Scott Bell <scott@traclabs.com>
@unlikelyzero unlikelyzero added type:feature Feature. Required intentional design and removed type:enhancement labels Jan 27, 2023
@unlikelyzero
Copy link
Collaborator

Cannot be tested until YAMCS is updated

@rukmini-bose
Copy link
Contributor

Testathon 2/2/23: Most of this is all working and super cool. I only found these two things

  1. Stacked Plots aren't being bordered in cyan when its child contains a stale telemetry.

Screen Shot 2023-02-02 at 11 04 38 AM

2. I took a specific case in which I tried removing an LAD Table from a Table Set *WHILE* the data indicated it was stale (the object was highlighted and bordered in cyan). After removing the LAD Table, the Table Set was still bordered in cyan. It does fix itself on refresh, or navigating away/back. This doesn't happen when the Overlay Plots or LAD Tables are the parent component.

Screen Shot 2023-02-02 at 10 58 05 AM

@ozyx
Copy link
Member

ozyx commented Feb 9, 2023

Verified fixed - Testathon 02-09-2022

@akhenry
Copy link
Contributor

akhenry commented Feb 13, 2023

@michaelrogers to test

@michaelrogers
Copy link
Contributor

Fix verified during testathon 02/13/2023. Staleness indicators work as expected in the above listed scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature. Required intentional design
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants