added CurrentOutput and TestData components

This commit is contained in:
Joel McKinnon 2019-12-26 16:07:55 -08:00
parent 88219659fb
commit 308ae2cb2e
5 changed files with 91 additions and 50 deletions

View File

@ -61,7 +61,7 @@ export default class ConditionSetViewProvider {
template: '<condition-set :isEditing="isEditing"></condition-set>' template: '<condition-set :isEditing="isEditing"></condition-set>'
}); });
}, },
onEditModeChange: function (isEditing) { onEditModeChange: (isEditing) => {
component.isEditing = isEditing; component.isEditing = isEditing;
}, },
destroy: () => { destroy: () => {

View File

@ -1,7 +1,10 @@
<template> <template>
<section id="conditionCollection"> <section id="conditionCollection">
<div class="c-sw-edit__ui__header"> <div class="c-sw-edit__ui__header">
<span class="c-disclosure-triangle c-disclosure-triangle--expanded is-enabled t-view-control-conditons"></span> <span
class="c-disclosure-triangle is-enabled flex-elem"
:class="{'c-disclosure-triangle--expanded': expanded}"
></span>
<span class="c-sw-edit__ui__header-label">Conditions</span> <span class="c-sw-edit__ui__header-label">Conditions</span>
</div> </div>
<div class="t-test-data-config"> <div class="t-test-data-config">

View File

@ -2,54 +2,8 @@
<div class="c-object-view u-contents"> <div class="c-object-view u-contents">
<div class="c-sw-edit w-summary-widget"> <div class="c-sw-edit w-summary-widget">
<div class="c-sw-edit__ui holder"> <div class="c-sw-edit__ui holder">
<section id="current-output" <CurrentOutput />
class="current-output"> <TestData :is-editing="isEditing" />
<div class="c-sw-edit__ui__header">
<span class="c-disclosure-triangle is-enabled t-view-control-test-data"></span>
<span class="c-sw-edit__ui__header-label">Current Output</span>
</div>
<div class="t-test-data-config">
<div id="ruleArea"
class="c-sw-editui__rules widget-rules"
>
<span>DATA_PRESENT</span>
</div>
</div>
</section>
<section id="test-data"
v-show="isEditing"
class="test-data">
<div class="c-sw-edit__ui__header">
<span class="c-disclosure-triangle is-enabled t-view-control-test-data c-disclosure-triangle--expanded"></span>
<span class="c-sw-edit__ui__header-label">Test Data</span>
</div>
<div class="c-sw-edit__ui holder l-flex-accordion flex-elem grows widget-edit-holder expanded-widget-rules expanded-widget-test-data">
<div class="flex-accordion-holder t-widget-test-data-content w-widget-test-data-content">
<div class="l-enable">
<label class="checkbox custom">
Apply Test Values
<input type="checkbox"
class="t-test-data-checkbox"
>
</label>
</div>
<div class="t-test-data-config">
<div class="c-sw-editui__rules widget-rules">
<span>[data]</span>
</div>
<div class="holder add-rule-button-wrapper align-right">
<button
v-show="isEditing"
id="addRule"
class="c-button c-button--major add-test-condition icon-plus"
>
<span class="c-button__label">Add Test Value</span>
</button>
</div>
</div>
</div>
</div>
</section>
<ConditionCollection :is-editing="isEditing" /> <ConditionCollection :is-editing="isEditing" />
</div> </div>
</div> </div>
@ -57,11 +11,15 @@
</template> </template>
<script> <script>
import CurrentOutput from './CurrentOutput.vue';
import TestData from './TestData.vue';
import ConditionCollection from './ConditionCollection.vue'; import ConditionCollection from './ConditionCollection.vue';
export default { export default {
inject: ["openmct", "objectPath", "domainObject"], inject: ["openmct", "objectPath", "domainObject"],
components: { components: {
CurrentOutput,
TestData,
ConditionCollection ConditionCollection
}, },
props: { props: {

View File

@ -0,0 +1,30 @@
<template>
<section id="current-output"
class="current-output"
>
<div class="c-sw-edit__ui__header">
<span class="c-sw-edit__ui__header-label">Current Output</span>
</div>
<div class="t-test-data-config">
<span>{{ conditionData.currentOutput }}</span>
</div>
</section>
</template>
<script>
export default {
inject: ['openmct'],
props: {
isEditing: Boolean
},
data() {
return {
conditionData: {
currentOutput: 'DATA_PRESENT'
}
};
},
methods: {
}
}
</script>

View File

@ -0,0 +1,50 @@
<template>
<section v-show="isEditing"
id="test-data"
class="test-data"
>
<div class="c-sw-edit__ui__header">
<span
class="c-disclosure-triangle is-enabled flex-elem"
:class="{'c-disclosure-triangle--expanded': expanded}"
></span>
<span class="c-sw-edit__ui__header-label">Test Data</span>
</div>
<div class="l-enable">
<label class="checkbox custom">
Apply Test Values
<input type="checkbox"
class="t-test-data-checkbox"
>
</label>
</div>
<div class="t-test-data-config">
<div class="c-sw-editui__rules widget-rules">
<span>[data]</span>
</div>
<div class="holder add-condition-button-wrapper align-right">
<button id="addRule"
class="c-button c-button--major add-condition-button icon-plus"
>
<span class="c-button__label">Add Test Value</span>
</button>
</div>
</div>
</section>
</template>
<script>
export default {
inject: ['openmct'],
props: {
isEditing: Boolean
},
data() {
return {
conditionData: {}
};
},
methods: {
}
}
</script>