akhenry / openmct-yamcs

Open MCT YAMCS plugin
13 stars 9 forks source link

Limit lines revert on redraw after MDB override #447

Closed ozyx closed 5 months ago

ozyx commented 5 months ago

Summary

When applying an MDB override to change limit values on telemetry, those viewing an overlay plot containing that telemetry w/ limit lines enabled would see the lines correctly update to the new values. However, on zoom in/out, the limit lines will redraw the OLD limits before the override. This persists until refresh, and the values seen when hovering over the legend also revert to the old limits.

https://github.com/nasa/openmct/assets/9259993/8fdedbae-975b-4dcf-b624-69c62c771e33

Above, I change the top limit from 10 to 11 and the bottom from -5 to -6. Then on zoom it reverts.

Expected vs Current Behavior

The limits should change and persist in the view immediately without reverting on rerender.

Steps to Reproduce

  1. Create an Overlay Plot
  2. Assign limits to a telemetry point that you plan to use to test this
  3. Drag that telemetry into the Overlay Plot
  4. Change the series config in the overlay plot settings to enable Limit Lines
  5. Observe the limit lines are displayed correctly
  6. Submit an MDB override to change the limits:
# Change the values themselves as you see fit
curl -X PATCH localhost:<port>/yamcs/api/mdb-overrides/path/to/parameter -d '{"action":"SET_DEFAULT_ALARMS","defaultAlarm":{"staticAlarmRange":[{"level":"WARNING","minInclusive":-0.03,"maxInclusive":0.03},{"level":"CRITICAL","minInclusive":-0.09,"maxInclusive":0.09}]}}'
  1. Observe the limits change immediately in the view
  2. Zoom in or out
  3. Observe the limits redraw the old limits before the override
  4. Hover over the legend, see that the old values are there for limits
  5. Nav away / back or refresh
  6. Correct limits are displayed

Environment

Impact Check List

Additional Information

ozyx commented 5 months ago

originally: https://github.com/nasa/openmct/issues/7598

ozyx commented 5 months ago

Testing Instructions

  1. Create an Overlay Plot
  2. Add some real (non-aggregate, numerical) telemetry into it (in testathon).
  3. Edit the Overlay Plot and activate limit lines for the series you've added
  4. Submit an MDB override to activate limit lines:
    • curl -X PATCH localhost:8090/yamcs/api/mdb-overrides/<project>/<processor>/parameters/path/to/parameter -d '{"action":"SET_DEFAULT_ALARMS","defaultAlarm":{"staticAlarmRange":[{"level":"WATCH","minInclusive":-10,"maxInclusive":10}]}}'
  5. Verify that limit lines appear and their values / styling is correct (hover over plot legend to see the values)
  6. Zoom in or out or otherwise resize the plot
  7. Verify that limit lines do not disappear or move, and their values / styling is the same as before
  8. Set different values for the mdb override
  9. Verify that the limit lines adjust correctly, values are accurate, etc.
  10. Zoom or resize the plot again and verify as in step 7
akhenry commented 5 months ago

Verified Fixed