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

Add discrete event visualization #7936

Open
scottbell opened this issue Dec 2, 2024 · 15 comments · May be fixed by #7967 or akhenry/openmct-yamcs#489
Open

Add discrete event visualization #7936

scottbell opened this issue Dec 2, 2024 · 15 comments · May be fixed by #7967 or akhenry/openmct-yamcs#489

Comments

@scottbell
Copy link
Contributor

scottbell commented Dec 2, 2024

Is your feature request related to a problem? Please describe.
Many telemetry objects may be discrete events. For example, when a command is issued, or a warning is raised. These currently cannot be visualized with data in plots.

Describe the solution you'd like
A single vertical line per discrete event, plotted along with numerical telemetry data. Some ideas include:

  1. Creating a new widget in the TimeLine object to display these events.
  2. Adding discrete event telemetry sources to plots.
@scottbell scottbell changed the title Add discrete events to plots Add discrete event visualization Dec 4, 2024
@scottbell
Copy link
Contributor Author

scottbell commented Dec 5, 2024

@akhenry @charlesh88 Made some progress on splitting up Events:

Screen.Recording.2024-12-05.at.11.44.37.mov

and commands:

Screen.Recording.2024-12-05.at.15.08.10.mov

@scottbell
Copy link
Contributor Author

I've got events plotting:

Screen.Recording.2024-12-10.at.12.02.56.mov

@mudinthewater
Copy link

mudinthewater commented Dec 10, 2024

@scottbell If you're looking for a way to categorize Events, the AMMOS repo does a pretty decent job with its EVRs views: https://github.com/NASA-AMMOS/openmct-mcws/tree/main/src/evrView

image

Then on the view side everything has a configurable color:

image

For viewing, I like what you're doing with the vertical events - you might want to consider a compact view like this too:

image

Basically what that view does is puts a line for each EVR level and then a point for each instance of the EVR level on the line so you can see them all in a much more compact way. On mouseover of the point it also populates a popup table that queries the evrs +/- a configured amount of time so you can see the actual record.

@mudinthewater
Copy link

mudinthewater commented Dec 10, 2024

If you wanted to simulate that last view in MCT, what you'd do is assign a regular channel and a numerical value to each EVR level, e.g.
FATAL = 6, WARN_HI = 5, WARN_LO = 4, ACT_HI = 3, ACT_LO =2, CMD =1, DIAG=0. Then each time an EVR appears, that channel gets that value and timestamp added to it. The value is always the numeric value above, and the plot would be set up as an enumeration overlay plot with each level being dragged on it as a telemetry point. Just a slightly more compact way of showing the same information that I think you're looking for, and requires no new core MCT features to accomplish. This also has the added benefit of being able to be plotted on all time ranges, because the channel showing each instance of an evr can be minmaxed and queried through the minmax endpoint.

@scottbell
Copy link
Contributor Author

These are excellent suggestions @mudinthewater! I'll chat with @charlesh88 and see what we can incorporate into the design.

@charlesh88
Copy link
Contributor

charlesh88 commented Dec 13, 2024

In progress dev notes:

Questions

  • Why do we need this structure in EventTimelineView.vue? Can we do this with a single level div and no u-contents?
<div ref="events" class="c-events-tsv">
<div ref="eventsHolder" class="c-events-tsv__contents u-contents"></div>
</div>
  • Rather than calculating heights on individual elements like event lines, I think we should shift to a world where we set height on the whole swimlane, and then elements inside, like event lines and holders, just set their heights via absolute position offsets or percentages. This will be more performant, and will be better when users can set swimlane heights at time edit.
  • How can I get severity with events locally?
  • Extended event lines don't line up on refresh, must nav away and back to get them to align. Is that an event generator issue, or something else?

Todos

@charlesh88

  • Fix broken Stacked Plots in Time Strips.
    image
    Problem was result of this addition from 12/12:
else if (domainObject.type === 'telemetry.plot.stacked') {
rowCount = domainObject.composition.length;
  • Marcus Bains line style refinements.
  • Remove extraneous padding at bottom of plot views when in TS.
  • Convert approach in EventTimelineView.vue to not set an explicit height.
  • Better styling for event and overlay lines.
  • Better styling for event severities.
  • Color related tooltip for event severity.
  • Improved styling, text ellipsis for swimlane labels; vertical text for Plan swimlanes.
  • Position line extension button at right edge of label column.
  • Improved hit area added to event lines.
  • Look at re-doing Time Strip grid layout to use grid definition at the top container.

@scottbell

  • Use the Selection api to attach s-selected to an event line that's clicked; remove on click outside.
  • The event lines need a holder that I can style with a slightly darker background and subtle stroke. This is the same as the plot area, and the left edge must align with the calculated plot margin.
  • Hovering on an event line should set CSS class --hilite on the related extended line as well.
  • Selecting an event line should also set CSS class --hilite on the related extended line.
  • Some dates for events (from the Open MCT Event Generator object) in the Inspector are displaying in epoch time, but should be converted to UTC, unless this is some silliness confined to the generator.
    image

@scottbell
Copy link
Contributor Author

scottbell commented Dec 16, 2024

To test timeline changes

  1. git checkout 7936-add-discrete-event-visualization in openmct
    1. run npm install && npm link
  2. git checkout 7936-add-discrete-event-visualization in openmct-yamcs
    1. run npm install && npm link openmct
  3. git clone https://github.com/yamcs/quickstart
    1. run mvn yamcs:run in one console
    2. run ./simulator in another
  4. In openmt-yamcs, run npm run make-example-events
  5. In openmct-yamcs, runnpm start to bring up openmct
  6. open http://localhost:9000
    1. create a new "Time Strip"
    2. ensure you see sub-objects under myproject -> Commands and myproject -> Events
    3. Test Events
      1. drop "Temperature Module" and "Pressure Module" events on the timeline object
      2. change the time conductor to real-time for the last 10 minutes, then back to fixed time
      3. you should see a few events
      4. click on an event, and look at in the inspector. under the event tab, it should show details
      5. hover over the event for a bit, it should show the name
      7. click the button next to title of the swimlane to expand, ensure it enables/disables properly
      8. ensure their colors (though faint) are there. charles will be adjusting these as they're a bit wonky now
    4. Test Commands
      1. Navigate to http://localhost:8090 (YAMCS controls)
      2. Click "Commanding" on the left
      3. Send a few commands (Reboot and VoltageOn for example)
      4. drop "default" and "payload" command sources on the timeline object
      5. change the time conductor to real-time for the last 10 minutes, then back to fixed time
      6. you should see a few commands
        1. click on a command event, and look at in the inspector. under the event tab, it should show details
        2. hover over the command event for a bit, it should show the name
        3. click the button next to title of the swimlane to expand, ensure it enables/disables properly

@scottbell
Copy link
Contributor Author

scottbell commented Dec 16, 2024

@charlesh88

Why do we need this structure in EventTimelineView.vue? Can we do this with a single level div and no u-contents?

Fixed

Rather than calculating heights on individual elements like event lines, I think we should shift to a world where we set height on the whole swimlane, and then elements inside, like event lines and holders, just set their heights via absolute position offsets or percentages. This will be more performant, and will be better when users can set swimlane heights at time edit.

That sounds good. Do we want to wait for #7957 to do this?

How can I get severity with events locally?

See testing instructions I added.

Extended event lines don't line up on refresh, must nav away and back to get them to align. Is that an event generator issue, or something else?

Fixed

Attach is-selected when an event line is selected; remove on click-outside event.

Fixed

The event lines need a holder that I can style with a slightly darker background and subtle stroke. This is the same as the plot area, and the left edge must align with the calculated plot margin.

There's an event wrapper we're generating called wrapper-${utc-date}. Would that work?

Hovering on an event line should also set a class or do something to that related extended line as well.

Fixed

charlesh88 added a commit that referenced this issue Dec 17, 2024
- Layout converted to set `min-height` on top-most `c-swimlane` element.
Interior containers now use 100% height or absolute positioning.
- Removed `c-timeline-holder` from `c-events-tsv` in EventTimelineView.vue;
Refactored `c-events-tsv__contents` to be `js-events-tsv` as that was being used as a reference.
- New theme constant `eventLineW` sets event lines to be 1px wide for more precision.
charlesh88 added a commit that referenced this issue Dec 17, 2024
- Removed event handle again.
@charlesh88
Copy link
Contributor

@scottbell Many updates pushed, see commit messages for detailed notes on changes.

@scottbell
Copy link
Contributor Author

scottbell commented Dec 17, 2024

New CSS changes are looking very good, @charlesh88!

Screen.Recording.2024-12-17.at.10.52.54.mov

charlesh88 added a commit that referenced this issue Dec 17, 2024
- Remove `element-handle`.
charlesh88 added a commit that referenced this issue Dec 18, 2024
- Moved all event line styling into events-view.scss.
- Refactor `*__event-wrapper` to `*__event-line`.
- Event line color styling for hover and `s-select`.
- New theme constants for `$colorEvent<color>Line`.
- Removed `--no-style` CSS class; created unnecessary need to override.
charlesh88 added a commit that referenced this issue Dec 18, 2024
- Changed `--hovered` to `--hilite`.
@charlesh88
Copy link
Contributor

charlesh88 commented Dec 18, 2024

@scottbell Have pushed changes. Change details in commit notes, but briefly:

  • Event coloring should now be all good across the board. TODO on this is to color the tooltip with the event color.
  • Hovers now include transition effects for a better scrubbing experience.
  • Styling implemented for s-selected on the event lines.
  • Extended lines now get a CSS class of --hilite when their related non-extended line is hovered. I need you to also apply that class for an extended line when its non-extended line is also selected, and have aded to Todos above.
  • Event Generator now uses a more random delay on event generation time, and sets a severity less frequently.
  • Tooltip now gets passed severity class for events that have them.

charlesh88 added a commit that referenced this issue Dec 18, 2024
- Styling added to tooltip for event severity.
@scottbell scottbell linked a pull request Dec 18, 2024 that will close this issue
14 tasks
@scottbell scottbell linked a pull request Dec 18, 2024 that will close this issue
14 tasks
@scottbell scottbell linked a pull request Dec 18, 2024 that will close this issue
14 tasks
@scottbell
Copy link
Contributor Author

scottbell commented Dec 18, 2024

@mudinthewater thanks again for the suggestion. I added the minimum severity child objects to each event source in YAMCS

image

charlesh88 added a commit that referenced this issue Dec 19, 2024
- Remove `c-menu` from Tooltip.
- Tooltip component tweaks.
charlesh88 added a commit that referenced this issue Dec 19, 2024
- Fixed previous change that broke grid layout of Stacked Plots in Time Strip.
- Re-enabled code that sets min-height for Stacked Plots in Time Strip based
on the number of children.
charlesh88 added a commit that referenced this issue Dec 19, 2024
- Fixed swimlane button markup.
- CSS cleanup.
@scottbell
Copy link
Contributor Author

Here's the latest and greatest:

creating.mov
in-action.mov

@charlesh88
Copy link
Contributor

Looks great!

charlesh88 added a commit that referenced this issue Dec 19, 2024
- Swimlane style refinements.
- New theme constants for swimlane colors.
- Time Strip label column buttons aligned right.
charlesh88 added a commit that referenced this issue Dec 19, 2024
- CSS cleanups.
charlesh88 added a commit that referenced this issue Dec 19, 2024
- Significant improvements for Time Strip imagery view ahead of user-settable swimlane heights.
- Imagery container height, image height and width no longer set in code.
- Imagery swimlane now uses styles and hover behavior consistent with events.
charlesh88 added a commit that referenced this issue Dec 19, 2024
- Add in alignmentData to set the left edge of the imagery-tsv element properly.
@charlesh88
Copy link
Contributor

Pushed significant updates to the Time Strip imagery view:

  1. Refactored code and CSS ahead of user-settable swimlane heights. Image thumbs no longer set height and width in code, but instead dynamically size to the height of the container.
  2. Imagery strip now uses styles and hover behavior consistent with the Events/Commands view.
  3. Copied code from EventTimelineView.vue that gets and sets the imagery container left edge, to properly align the view in time.
    Screenshot 2024-12-19 at 12 46 09 PM
    Screenshot 2024-12-19 at 12 45 36 PM
    Screenshot 2024-12-19 at 12 45 55 PM

charlesh88 added a commit that referenced this issue Dec 19, 2024
- Consolidate `__no-items` message style into timeline.scss.
charlesh88 added a commit that referenced this issue Dec 20, 2024
- WIP prepping activities view for adjustable swimlane height.
- Refactored ActivityTimeline.vue to not draw SVG if no activities in timeframe.
- ActivityTimeline.vue `leftOffset` now uses absolute position `left` instead of `left-margin`.
charlesh88 added a commit that referenced this issue Dec 20, 2024
- Sanding and shimming on imagery and events TS look and feel.
- Fixed scrollbar issue in imagery TS view when thumb goes beyond the right edge of the time frame.
charlesh88 added a commit that referenced this issue Dec 20, 2024
- Fix left and right `alignmentData` offsets in
EventTimelineView.vue, ImageryTimeView.vue and ActivityTimeline.vue.
charlesh88 added a commit that referenced this issue Dec 20, 2024
- Fix left and right `alignmentData` offsets that were not being applied to the correct element.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants