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

Clear data for objects clears data for all objects #4065

Closed
1 of 5 tasks
nikhilmandlik opened this issue Jul 28, 2021 · 11 comments · Fixed by #4157
Closed
1 of 5 tasks

Clear data for objects clears data for all objects #4065

nikhilmandlik opened this issue Jul 28, 2021 · 11 comments · Fixed by #4157

Comments

@nikhilmandlik
Copy link
Contributor

Summary

Clear data for objects clears data for all objects

Expected vs Current Behavior

Should clear a data only for given object

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug?

Steps to Reproduce

  1. create / use this SWG on banner/dev -> SWG
  2. create empty overlay plot or use this -> overlay plot
  3. select SWG to show some data SWG
  4. context click on empty overlay plot and select Clear data for objects
    Screen Shot 2021-07-28 at 12 48 04 PM
  5. observe data shown for SWG is now cleared.

Environment

  • Open MCT Version:
    Version: 1.7.4
    Build Date: Thu Jul 22 2021 11:35:01 GMT-0700 (Pacific Daylight Time)
    Revision: 42af3ad
    Branch: flexible-inspector-properties
  • Deployment Type: dev, viper
  • OS: MAC OS
  • Browser: Brave

Additional Information

NA

@akhenry
Copy link
Contributor

akhenry commented Aug 9, 2021

This is implemented as the ClearDataAction

@scottbell
Copy link
Contributor

Was able to reproduce, looking into it now.

@scottbell
Copy link
Contributor

scottbell commented Aug 16, 2021

The object emit is emitting the correct path in clearDataAction, but the wrong vue component is responding to it (SWG instead of the stacked plot). One solution I've got implemented in a branch is to navigate to the object that's doing the clearDataAction first, before emitting the clearData event. This is borrowing heavily from RemoveAction:
2a0af59

@scottbell
Copy link
Contributor

Though this causes a regression now with RemoveAction in that the parent & child of the path are now reversed, so attempting to delete the StackedPlot now tries to remove the parent!

@scottbell
Copy link
Contributor

@shefalijoshi recommended removing "Clear Action" from non-selected items in the tree. I.e., don't allow contextual "Clear Action" if you haven't selected the item in the tree.

@scottbell
Copy link
Contributor

I've added a first draft on removing "Clear Action" from non-selected items in the tree:
https://github.com/nasa/openmct/compare/mct4065

@scottbell
Copy link
Contributor

To test removing "Clear Data" context action on non-selected objects:

  • create / use this SWG on banner/dev -> SWG
  • create empty overlay plot or use this -> overlay plot
  • select SWG to show some data SWG
  • context click on empty overlay plot
  • observe "Clear Data" action is missing

To test keeping "Clear Data" context action on selected objects:

  • create a normal stacked plot using an SWG
  • right click on this stacked plot and observe that "Clear Data" action remains

To test clearing only data on one graph in a display layout:

  • create a display layout
  • add some plots based on SWG
  • select a single plot in the layout, click "Clear Data"
  • observer that only the plot you selected is cleared
  • test this on a variety of plots in the layout (stacked, overlay, etc.)

To test global clear data

  • create a display layout
  • add some plots based on SWG
  • fire the global "clear data" action at the top of MCT
  • observer all plots in the layout are cleared
  • test this on plots outside of layouts too

@scottbell scottbell mentioned this issue Aug 27, 2021
7 tasks
nikhilmandlik pushed a commit that referenced this issue Sep 10, 2021
Clear data for objects clears data for all objects #4065
@charlesh88
Copy link
Contributor

Verified Testathon 9-20-21.

@nikhilmandlik
Copy link
Contributor Author

Verified Fixed.

@khalidadil
Copy link
Contributor

Verified Fixed

@shefalijoshi
Copy link
Contributor

Verified fixed

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

Successfully merging a pull request may close this issue.

7 participants