WIP renaming

This commit is contained in:
Joel McKinnon 2019-12-18 11:43:20 -08:00
parent 7981424e9a
commit ad64f00608
4 changed files with 13 additions and 75 deletions

View File

@ -20,16 +20,16 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
import ConditionCollectionComponent from './components/ConditionCollection.vue';
import ConditionSetComponent from './components/ConditionSet.vue';
import Vue from 'vue';
export default function ConditionCollection(openmct) {
export default function ConditionSet(openmct) {
return {
key: 'conditionCollection',
key: 'conditionSet',
name: 'Condition Set',
cssClass: 'icon-page',
cssClass: 'icon-summary-widget',
canView: function (domainObject) {
return domainObject.type === 'conditionCollection';
return domainObject.type === 'conditionSet';
},
view: function (domainObject) {
let component;
@ -39,13 +39,13 @@ export default function ConditionCollection(openmct) {
component = new Vue({
el: element,
components: {
ConditionCollectionComponent
ConditionSetComponent
},
provide: {
openmct,
domainObject
},
template: '<condition-collection-component></condition-collection-component>'
template: '<condition-set-component></condition-set-component>'
});
},
destroy: function (element) {

View File

@ -1,60 +0,0 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2019, 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.
*****************************************************************************/
import ConditionComponent from './components/Condition.vue';
import Vue from 'vue';
export default function Condition(openmct) {
return {
key: 'condition',
name: 'Condition',
cssClass: 'icon-summary-widget',
canView: (domainObject => {
return domainObject.type === 'condition';
}),
view: (domainObject => {
let component;
return {
show: (element => {
component = new Vue({
el: element,
components: {
ConditionComponent
},
provide: {
openmct,
domainObject
},
template: '<condition-component></condition-component>'
});
}),
destroy: (element => {
component.$destroy();
component = undefined;
})
};
}),
priority: (() => { 1 });
}
};
}

View File

@ -1,7 +1,5 @@
<template>
<div class="l-iframe abs">
<iframe :src="currentDomainObject.url"></iframe>
</div>
<div><!-- Condition Set component contents will go here --></div>
</template>
<script>

View File

@ -20,10 +20,10 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
export default function ConditionPlugin() {
const conditionType = {
name: 'Condition',
description: 'A conditional rule based on user-specified criteria.',
export default function ConditionSetPlugin() {
const conditionSetType = {
name: 'Condition Set',
description: 'A set of one or more conditional rules based on user-specified criteria.',
creatable: true,
cssClass: 'icon-summary-widget',
initialize: function (domainObject) {
@ -33,6 +33,6 @@ export default function ConditionPlugin() {
};
return function install(openmct) {
openmct.types.addType('condition', conditionType);
openmct.types.addType('conditionSet', conditionSetType);
};
}