mirror of
https://github.com/nasa/openmct.git
synced 2025-01-20 11:38:56 +00:00
added uuid() in conditionManager
This commit is contained in:
parent
1beba78111
commit
169cc6617a
@ -95,7 +95,7 @@ export default class ConditionClass extends EventEmitter {
|
|||||||
|
|
||||||
generateCriterion(criterionConfiguration) {
|
generateCriterion(criterionConfiguration) {
|
||||||
return {
|
return {
|
||||||
id: uuid(),
|
id: criterionConfiguration.id || uuid(),
|
||||||
telemetry: criterionConfiguration.telemetry || '',
|
telemetry: criterionConfiguration.telemetry || '',
|
||||||
telemetryObject: this.conditionManager.telemetryObjects[this.openmct.objects.makeKeyString(criterionConfiguration.telemetry)],
|
telemetryObject: this.conditionManager.telemetryObjects[this.openmct.objects.makeKeyString(criterionConfiguration.telemetry)],
|
||||||
operation: criterionConfiguration.operation || '',
|
operation: criterionConfiguration.operation || '',
|
||||||
|
@ -108,7 +108,7 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
if (conditionConfiguration) {
|
if (conditionConfiguration) {
|
||||||
conditionObj = {
|
conditionObj = {
|
||||||
...conditionConfiguration,
|
...conditionConfiguration,
|
||||||
id: uuid(),
|
id: conditionConfiguration.id || uuid(),
|
||||||
configuration: {
|
configuration: {
|
||||||
...conditionConfiguration.configuration,
|
...conditionConfiguration.configuration,
|
||||||
name: `Copy of ${conditionConfiguration.configuration.name}`
|
name: `Copy of ${conditionConfiguration.configuration.name}`
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
></span>
|
></span>
|
||||||
|
|
||||||
<span class="c-condition__name">{{ condition.configuration.name }}</span>
|
<span class="c-condition__name">{{ condition.configuration.name }}</span>
|
||||||
<!-- TODO: description should be derived from criteria -->
|
|
||||||
<span class="c-condition__summary">
|
<span class="c-condition__summary">
|
||||||
<template v-if="!canEvaluateCriteria">
|
<template v-if="!canEvaluateCriteria">
|
||||||
Define criteria
|
Define criteria
|
||||||
@ -317,7 +316,7 @@ export default {
|
|||||||
index: this.conditionIndex
|
index: this.conditionIndex
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initCap: function (str) {
|
initCap(str) {
|
||||||
return str.charAt(0).toUpperCase() + str.slice(1)
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.criterion);
|
|
||||||
this.updateMetadataOptions();
|
this.updateMetadataOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user