nasa / openmct

A web based mission control framework.
https://nasa.github.io/openmct/
Other
12.06k stars 1.25k forks source link

Alphanumerics should display units #5094

Open charlesh88 opened 2 years ago

charlesh88 commented 2 years ago

Problem

When unit metadata is available for telemetry, it should optionally be displayed wherever that value is displayed. Currently, alphanumerics in Display Layouts should display the unit, but don't.

image

Solution proposal

Add a toolbar control to the right of the Value source dropdown control ("Cosine" in the shot below) that allows the user to display units or not: Units in layout mockup

We need to determine if and how to migrate legacy alphanumerics; IMO all legacy alphanumerics should be set to "Hide units" to avoid breaking existing displays.

mudinthewater commented 2 years ago

This seems reasonable. Legacy systems would manually add text to the right of each alphanumeric.

mudinthewater commented 2 years ago

Presumably it would still work if the telemetry object doesn't have units in the dictionary? ie the behavior should be the same if the telemetry dictionary entry has "units": "" or just no units at all in the object.

charlesh88 commented 2 years ago

Presumably it would still work if the telemetry object doesn't have units in the dictionary? ie the behavior should be the same if the telemetry dictionary entry has "units": "" or just no units at all in the object.

Yes, it must fall back gracefully if no units are defined for an endpoint or if units are defined but not populated, i.e. "".