allow conditions to be dropped into telemetry views

This commit is contained in:
David Tsay 2020-02-26 11:31:26 -08:00
parent 80656c1be0
commit 0915aaea3b
3 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,9 @@ export default class ConditionSetTelemetryProvider {
constructor(openmct) { constructor(openmct) {
this.openmct = openmct; this.openmct = openmct;
} }
isTelemetryObject(domainObject) {
return domainObject.type === 'conditionSet';
}
supportsRequest(domainObject, options) { supportsRequest(domainObject, options) {
return false; return false;

View File

@ -23,6 +23,8 @@
import ConditionSet from './components/ConditionSet.vue'; import ConditionSet from './components/ConditionSet.vue';
import Vue from 'vue'; import Vue from 'vue';
const DEFAULT_VIEW_PRIORITY = 100;
export default class ConditionSetViewProvider { export default class ConditionSetViewProvider {
constructor(openmct) { constructor(openmct) {
this.openmct = openmct; this.openmct = openmct;
@ -71,4 +73,12 @@ export default class ConditionSetViewProvider {
} }
}; };
} }
priority(domainObject) {
if (domainObject.type === 'conditionSet') {
return Number.MAX_VALUE;
} else {
return DEFAULT_VIEW_PRIORITY;
}
}
} }

View File

@ -48,6 +48,7 @@ export default function ConditionPlugin() {
conditionCollection: [] conditionCollection: []
}; };
domainObject.composition = []; domainObject.composition = [];
domainObject.telemetry = {};
} }
}); });