diff --git a/copyright-notice.html b/copyright-notice.html index 2e323d1e39..ffcbb9a4e1 100644 --- a/copyright-notice.html +++ b/copyright-notice.html @@ -1,5 +1,5 @@ \ No newline at end of file +--> diff --git a/copyright-notice.js b/copyright-notice.js index 82fd0deeb4..dc566ef7eb 100644 --- a/copyright-notice.js +++ b/copyright-notice.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2018, United States Government + * Open MCT, Copyright (c) 2014-2020, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * @@ -18,4 +18,4 @@ * 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. - *****************************************************************************/ \ No newline at end of file + *****************************************************************************/ diff --git a/src/MCT.js b/src/MCT.js index d9292cbcd1..f7eb9db14d 100644 --- a/src/MCT.js +++ b/src/MCT.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2019, United States Government + * Open MCT, Copyright (c) 2014-2020, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/plugins/condition/Condition.js b/src/plugins/condition/Condition.js index 572dca431e..1078a38011 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, computeConditionByLimit} from "./utils/evaluator"; +import AllTelemetryCriterion from "./criterion/AllTelemetryCriterion"; /* * conditionConfiguration = { @@ -72,7 +73,11 @@ export default class ConditionClass extends EventEmitter { return; } this.criteria.forEach(criterion => { - criterion.emit(`subscription:${datum.id}`, datum); + if (criterion.telemetry && (criterion.telemetry === 'all' || criterion.telemetry === 'any')) { + criterion.handleSubscription(datum, this.conditionManager.telemetryObjects); + } else { + criterion.emit(`subscription:${datum.id}`, datum); + } }); } @@ -120,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/Condition.vue b/src/plugins/condition/components/Condition.vue index 8c2f641a9a..b628763019 100644 --- a/src/plugins/condition/components/Condition.vue +++ b/src/plugins/condition/components/Condition.vue @@ -86,7 +86,6 @@