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

User Annotation Improvements #182

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jacdavi
Copy link
Contributor

@jacdavi jacdavi commented May 30, 2024

This adds a few features in the UI for making notes and customizing the way a VM appears in the SOH graph. The intent is to make it easier for users to track/manage the status of VMs within an experiment (e.g., a user may mark a node red and add a note "reached by red team")

  • Adds a new modal for viewing/editing the labels of a VM

    • Separate "notes" section that allows multiline, maintains insertion order, and hides key
    • Available in experiment pages and SOH
    • Treats minimega tags and phenix labels as one (meaning persistent across experiment runs, and also available in mm cli)
  • Changes SOH details modal to show notes at the top

    • Adds buttons to edit labels and override style
    • New style modal lets user override the fill color, stroke color, and stroke style of a node. This takes precedence over any default styling

labels_modal
style_modal

@activeshadow
Copy link
Collaborator

Thanks @jacdavi, I'll take a look at this ASAP. Looks cool!

@jacdavi
Copy link
Contributor Author

jacdavi commented Jun 7, 2024

Thanks @jacdavi, I'll take a look at this ASAP. Looks cool!

Sounds good. There's one more PR coming soon. No rush on any of them since we have everything in an internal fork. Thanks!

@activeshadow
Copy link
Collaborator

@jacdavi I squashed and rebased this branch on top of the latest main (which has PR #181 merged in) and everything is compiling fine. However, notes and tags are not getting added for VMs and I'm not sure why. I took a cursory look at the code and I'm not noticing anything obvious but I haven't tried attaching a debugger to follow along in real time. Can you take a look when you have time?

Also, I'm wondering if it wouldn't make sense to use an annotation for notes instead of a special tag name. Annotation values can be whatever type you want them to be, so they could be an array of strings for example, or a map with the date of the note as the key and the text as the value. Just a thought.

This adds a few features in the UI for making notes and customizing the
way a VM appears in the SOH graph. The intent is to make it easier for
users to track/manage the status of VMs within an experiment (e.g., a
user may mark a node red and add a note "reached by red team").

* Adds a new modal for viewing/editing the labels of a VM
  * Separate "notes" section that allows multiline, maintains insertion
    order, and hides key
  * Available in experiment pages and SOH
  * Treats minimega tags and phenix labels as one (meaning persistent
    across experiment runs, and also available in mm cli)

* Changes SOH details modal to show notes at the top
  * Adds buttons to edit labels and override style
  * New style modal lets user override the fill color, stroke color, and
    stroke style of a node. This takes precedence over any default
    styling
@jacdavi
Copy link
Contributor Author

jacdavi commented Oct 4, 2024

@activeshadow sorry I was OOO for a few days, but appreciate the help! I took a look and it was just that the backend was expecting tag_update_mode in the update json, but the frontend was using the key tagUpdateMode.

For annotations/labels it's been a while, so I don't remember the exact differences. I know one feature that was requested was being able to see everything as tags in minimega, so I believe the drove the use of labels since those were already getting copied over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants