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

[Fault Management] Providers should be able to specify shelve durations #7853

Closed
ozyx opened this issue Sep 24, 2024 · 7 comments · Fixed by #7849 or #7890
Closed

[Fault Management] Providers should be able to specify shelve durations #7853

ozyx opened this issue Sep 24, 2024 · 7 comments · Fixed by #7849 or #7890
Assignees
Labels
type:enhancement verified Tested or intentionally closed

Comments

@ozyx
Copy link
Contributor

ozyx commented Sep 24, 2024

Is your feature request related to a problem? Please describe.
Currently, shelve durations are hard-coded and only provide a few different options.

Describe the solution you'd like
Fault providers should be able to define their own shelve durations. An optional API method such as getShelveDurations can be defined by the fault provider and return a list of options with label and duration (in ms):

[
  {
    name: '1 minute',
    duration: 60 * 60 * 1000
  },
  {
    name: '5 minutes',
    duration: 5 * 60 * 60 * 1000
  }
]
@ozyx ozyx added this to the Target:4.1.0 milestone Sep 24, 2024
@ozyx ozyx self-assigned this Sep 24, 2024
@ozyx
Copy link
Contributor Author

ozyx commented Sep 25, 2024

Testing Instructions

openmct core

  • modify index.html to install the example fault source plugin:
openmct.install(openmct.plugins.example.ExampleFaultSource());
  1. Modify the getShelveDurations() method in exampleFaultSource.js. Give it some kind of duration and label.
  2. npm start
  3. Goto Fault Management
  4. Shelve a fault
  5. Verify that the specified durations appear in the drop down
  6. Remove the getShelveDurations() method completely
  7. Repeat steps to shelve a fault
  8. Verify that the default shelve durations appear in the dropdown

openmct-yamcs

  1. Modify that yamcs fault provider's getShelveDurations() to add some custom durations (a short duration would be helpful to test the unshelving)
  2. Start openmct-yamcs with YAMCS quickstart running
  3. Add an mdb-override to a parameter to get it to trigger a fault. Here's an example using Latitude:
curl -X PATCH "http://localhost:8090/api/mdb-overrides/myproject/realtime/parameters/myproject/Latitude" \
-H "Content-Type: application/json" \
-d '{
  "action": "SET_DEFAULT_ALARMS",
  "defaultAlarm": {
    "staticAlarmRange": [
      {
        "level": "WATCH",
        "minInclusive": 808,
        "maxInclusive": 810
      },
      {
        "level": "WARNING",
        "minInclusive": 810.01,
        "maxInclusive": 812
      },
      {
        "level": "DISTRESS",
        "minInclusive": 812.01,
        "maxInclusive": 814
      },
      {
        "level": "CRITICAL",
        "minInclusive": 814.01,
        "maxInclusive": 820
      },
      {
        "level": "SEVERE",
        "minInclusive": 820.01,
        "maxInclusive": 824
      }
    ]
  }
}'
  1. Goto fault management and verify fault(s) has/have been triggered
  2. Shelve a fault and verify your custom durations show in the dropdown
  3. Shelve a fault for a short amount of time and verify that it unshelves when its time is up
  4. Shelve a fault selecting "indefinite" as the option for duration. Verify that it never unshelves (waiting 5+ min is probably enough here?)

@ozyx ozyx closed this as completed in #7849 Oct 1, 2024
@akhenry akhenry modified the milestones: Target:4.1.0, Build 9 RC11 Oct 2, 2024
@jvigliotta
Copy link
Contributor

Partially Fixed - Testathon 10/3/24

Getting an error when removing the getShelveDurations() from the provider.

@shefalijoshi
Copy link
Contributor

Testing with core Open MCT:

  1. Setting to a custom duration - Verified
  2. Remove getShelveDurations() completely - failed with console error:
    Uncaught (in promise) TypeError: this.provider.getShelveDurations is not a function getShelveDurations FaultManagementAPI.js:142 created FaultManagementView.vue:143
  3. Set getShelveDuration() to return []. On Clicking the shelve button- failed with console error:
    Uncaught (in promise) TypeError: this.shelveDurations[0] is undefined toggleShelveSelected FaultManagementView.vue:313 callWithErrorHandling runtime-core.esm-bundler.js:195

@shefalijoshi
Copy link
Contributor

I still see an error if the return value for getShelveDuration() is set to [].
image

@charlesh88
Copy link
Contributor

Testathon 2024-10-17: verified fixed.

@akhenry akhenry assigned jvigliotta and unassigned ozyx Oct 18, 2024
@ozyx
Copy link
Contributor Author

ozyx commented Oct 18, 2024

I still see an error if the return value for getShelveDuration() is set to []. image

Good catch on an edge case-- let's file it separately

@jvigliotta
Copy link
Contributor

jvigliotta commented Oct 18, 2024

Open MCT Core Testing steps - Verified Fixed - 10/18/24
YAMCS Testing steps - Verified Fixed - 10/18/24

@akhenry akhenry added the verified Tested or intentionally closed label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement verified Tested or intentionally closed
Projects
None yet
5 participants