-
-
-
-
-
-
+
diff --git a/src/plugins/condition/components/CurrentOutput.vue b/src/plugins/condition/components/CurrentOutput.vue
index 9df85ab7a2..557483861a 100644
--- a/src/plugins/condition/components/CurrentOutput.vue
+++ b/src/plugins/condition/components/CurrentOutput.vue
@@ -1,3 +1,25 @@
+/*****************************************************************************
+ * Open MCT, Copyright (c) 2014-2020, 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.
+ *****************************************************************************/
+
-
-
-
-
diff --git a/src/plugins/condition/components/TestData.vue b/src/plugins/condition/components/TestData.vue
index 79e0c5ac9a..f2678d5168 100644
--- a/src/plugins/condition/components/TestData.vue
+++ b/src/plugins/condition/components/TestData.vue
@@ -1,3 +1,25 @@
+/*****************************************************************************
+ * Open MCT, Copyright (c) 2014-2020, 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.
+ *****************************************************************************/
+
{
this.handleSubscription(datum);
});
diff --git a/src/plugins/condition/criterion/TelemetryCriterionSpec.js b/src/plugins/condition/criterion/TelemetryCriterionSpec.js
index ef823ca45d..123fd600fb 100644
--- a/src/plugins/condition/criterion/TelemetryCriterionSpec.js
+++ b/src/plugins/condition/criterion/TelemetryCriterionSpec.js
@@ -94,17 +94,6 @@ describe("The telemetry criterion", function () {
expect(telemetryCriterion.subscription).toBeDefined();
});
- it("normalizes telemetry data", function () {
- let result = telemetryCriterion.normalizeData({
- key: 'some-key',
- source: 'testSource',
- testSource: 'Hello'
- });
- expect(result).toEqual({
- 'some-key': 'Hello'
- })
- });
-
it("emits update event on new data from telemetry providers", function () {
spyOn(telemetryCriterion, 'emitEvent').and.callThrough();
telemetryCriterion.handleSubscription({
diff --git a/src/plugins/condition/utils/evaluator.js b/src/plugins/condition/utils/evaluator.js
index 51bd7173f6..2f0a325f0e 100644
--- a/src/plugins/condition/utils/evaluator.js
+++ b/src/plugins/condition/utils/evaluator.js
@@ -1,7 +1,16 @@
-export const computeConditionForAny = (args) => {
- return false;
-};
-
-export const computeConditionForAll = (args) => {
- return false;
+export const computeCondition = (resultMap, allMustBeTrue) => {
+ let result = false;
+ for (let key in resultMap) {
+ if (resultMap.hasOwnProperty(key)) {
+ result = resultMap[key];
+ if (allMustBeTrue && !result) {
+ //If we want all conditions to be true, then even one negative result should break.
+ break;
+ } else if (!allMustBeTrue && result) {
+ //If we want at least one condition to be true, then even one positive result should break.
+ break;
+ }
+ }
+ }
+ return result;
};
diff --git a/src/plugins/condition/utils/eventbus.js b/src/plugins/condition/utils/eventbus.js
deleted file mode 100644
index 50e9f894c8..0000000000
--- a/src/plugins/condition/utils/eventbus.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import Vue from 'vue';
-export const EventBus = new Vue();