Open ozyx opened 2 weeks ago
index.html
to install the example fault source plugin:
openmct.install(openmct.plugins.example.ExampleFaultSource());
getShelveDurations()
method in exampleFaultSource.js
. Give it some kind of duration and label.npm start
getShelveDurations()
method completelygetShelveDurations()
to add some custom durations (a short duration would be helpful to test the unshelving)openmct-yamcs
with YAMCS quickstart runningmdb-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
}
]
}
}'
Partially Fixed - Testathon 10/3/24
Getting an error when removing the getShelveDurations()
from the provider.
Testing with core Open MCT:
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
[]
. 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
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):