diff --git a/src/plugins/condition/Condition.js b/src/plugins/condition/Condition.js index 3eaa568add..79f8133512 100644 --- a/src/plugins/condition/Condition.js +++ b/src/plugins/condition/Condition.js @@ -25,6 +25,7 @@ import uuid from 'uuid'; import TelemetryCriterion from "./criterion/TelemetryCriterion"; import { TRIGGER } from "./utils/constants"; import {computeCondition} from "./utils/evaluator"; +import AllTelemetryCriterion from "@/plugins/condition/criterion/AllTelemetryCriterion"; /* * conditionConfiguration = { @@ -124,8 +125,13 @@ export default class ConditionClass extends EventEmitter { * adds criterion to the condition. */ addCriterion(criterionConfiguration) { + let criterion; let criterionConfigurationWithId = this.generateCriterion(criterionConfiguration || null); - let criterion = new TelemetryCriterion(criterionConfigurationWithId, this.openmct); + if (criterionConfiguration.telemetry && (criterionConfiguration.telemetry === 'any' || criterionConfiguration.telemetry === 'all')) { + criterion = new AllTelemetryCriterion(criterionConfigurationWithId, this.openmct); + } else { + criterion = new TelemetryCriterion(criterionConfigurationWithId, this.openmct); + } criterion.on('criterionUpdated', (obj) => this.handleCriterionUpdated(obj)); criterion.on('criterionResultUpdated', (obj) => this.handleCriterionResult(obj)); if (!this.criteria) { diff --git a/src/plugins/condition/components/Criterion.vue b/src/plugins/condition/components/Criterion.vue index e5fc6ab15d..dd76bc4df9 100644 --- a/src/plugins/condition/components/Criterion.vue +++ b/src/plugins/condition/components/Criterion.vue @@ -9,6 +9,8 @@ @change="updateMetadataOptions" > + +