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 aviary metadata to the dashboard and add ability to copy cell values #131

Merged
merged 16 commits into from
Feb 14, 2024

Conversation

hschilling
Copy link
Member

Summary

This PR adds showing Aviary variables metadata as a hover over popup in the Aviary Variables Tab of the dashboard.

It also adds Copy buttons to cells so the user can easily copy the values and paste them into Python code.

Finally, it adds a checkbox that lets the user only show Aviary Variables in the table. ( Variables whose promoted names begin with "mission:" or "aircraft".)

The easiest way to see and test this is:

python ./aviary/examples/external_subsystems/simple_weight/run_simple_weight.py
aviary dashboard run_simple_weight

Then look at the Results-Aviary Variables Tab.

Test:

  1. Hover over first 3 columns to see hover over popup
  2. Try the Show Only Aviary Variables checkbox
  3. Try clicking on the Copy buttons to see if they copy the correct values in the correct format for use in Python code

Related Issues

Backwards incompatibilities

None

New Dependencies

None

… so user can copy the value and use in their code
…the abs name section, does a better job of formatting the aviary metadata in the hover over window, and adds a copy button to each cell to make it easy for the end user to copy that cell value
@hschilling hschilling added the enhancement New feature or request label Feb 7, 2024
… it can use the openmdao utils version if available, otherwise, use the private function in n2_viewer
…t_nans_in_json from older version of OpenMDAO
Copy link
Contributor

@crecine crecine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to have the "copy" button not not grab the quotation marks?
If you copy a name and then paste it into the search/filter at the top, it will give you no results unless you delete the quotes

aviary/visualization/assets/aviary_vars/script.js Outdated Show resolved Hide resolved
aviary/visualization/assets/aviary_vars/script.js Outdated Show resolved Hide resolved
Copy link
Member

@johnjasa johnjasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this! I played around a bit, I like that the arrays are immediately ready for numpy after copying them. Thanks Herb!

@crecine
Copy link
Contributor

crecine commented Feb 12, 2024

Looks like there might be an issue with the line wrapping?
I confirmed that the description in metadata has the proper spacing.
image

hschilling and others added 3 commits February 13, 2024 10:48
…n metadata tooltip was wrong. Strings were being rendered and copied with quotes around them but now those removed
@crecine crecine enabled auto-merge February 14, 2024 19:56
@crecine crecine added this pull request to the merge queue Feb 14, 2024
Merged via the queue into OpenMDAO:main with commit 4ed8bf6 Feb 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add metadata to the Aviary Variables table in the dashboard
3 participants