* added unit tests for fault management plugin * modified the example fault provider to work out of the box * updating for new e2e folder structure * part of the e2e tests * WIP * Imagery thumbnail regression fixes - 5327 (#5569) * Add an active class to thumbnail to indicate current focused image * Differentiate bg color between real-time and fixed * scrollIntoView inline: center * Added watcher for bounds change to trigger thumbnail scroll * Resolve merge conflict with requestHistory change to telemetry collection * Split thumbnail into sub component * Monitor isFixed value to unpause playback status * updated search to include name, namespace and description added some more e2e tests * added rest of e2e tests * fixed my init script, had to disable lint for no-force because it was not working without it, saw online this may be a pw bug * fix: removing maelstrom theme from application (#5600) * added some tests for no faults * visual tests * added visual tests for fault management * created utils file for shared functionality between function and visual tests * updating to 2.0.8 * tryin to remove imagery changes from master * trying to trigger a refresh * tryin to refresh * updated search to include name, namespace and description added some more e2e tests * added rest of e2e tests * fix: removing maelstrom theme from application (#5600) * fixed my init script, had to disable lint for no-force because it was not working without it, saw online this may be a pw bug * added some tests for no faults * visual tests * added visual tests for fault management * created utils file for shared functionality between function and visual tests * updating to 2.0.8 * no clue * still no clue * removing imports and chaning to requires * updating utils file to work with require * fixing paths * fixing a test I had messed up when adding static exmaple faults * ONE LAST PATH FIX... hopefully * typo in files fix * fix folder typo * thought I got this one, but apparently not, well I did now! who is laughing now!? Co-authored-by: Michael Rogers <contact@mhrogers.com> Co-authored-by: Vitor Henckel <vitor@henckel.com.br>
61 lines
2.3 KiB
JavaScript
61 lines
2.3 KiB
JavaScript
/*****************************************************************************
|
|
* Open MCT, Copyright (c) 2014-2022, United States Government
|
|
* as represented by the Administrator of the National Aeronautics and Space
|
|
* Administration. All rights reserved.
|
|
*
|
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations
|
|
* under the License.
|
|
*
|
|
* Open MCT includes source code licensed under additional open source
|
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
* this source code distribution or the Licensing information page available
|
|
* at runtime from the About dialog for additional information.
|
|
*****************************************************************************/
|
|
|
|
import utils from './utils';
|
|
|
|
export default function (staticFaults = false) {
|
|
return function install(openmct) {
|
|
openmct.install(openmct.plugins.FaultManagement());
|
|
|
|
const faultsData = utils.randomFaults(staticFaults);
|
|
|
|
openmct.faults.addProvider({
|
|
request(domainObject, options) {
|
|
return Promise.resolve(faultsData);
|
|
},
|
|
subscribe(domainObject, callback) {
|
|
return () => {};
|
|
},
|
|
supportsRequest(domainObject) {
|
|
return domainObject.type === 'faultManagement';
|
|
},
|
|
supportsSubscribe(domainObject) {
|
|
return domainObject.type === 'faultManagement';
|
|
},
|
|
acknowledgeFault(fault, { comment = '' }) {
|
|
utils.acknowledgeFault(fault);
|
|
|
|
return Promise.resolve({
|
|
success: true
|
|
});
|
|
},
|
|
shelveFault(fault, duration) {
|
|
utils.shelveFault(fault, duration);
|
|
|
|
return Promise.resolve({
|
|
success: true
|
|
});
|
|
}
|
|
});
|
|
};
|
|
}
|