mirror of
https://github.com/nasa/openmct.git
synced 2025-06-24 18:25:19 +00:00
Compare commits
89 Commits
master
...
extend-lad
Author | SHA1 | Date | |
---|---|---|---|
68d5e8c822 | |||
fb4a595f0d | |||
28a9847a20 | |||
6a7857cf69 | |||
b6b19819a2 | |||
32bebe5fee | |||
37a614d6be | |||
e30e1b875c | |||
872b426022 | |||
f589f000a2 | |||
1ca27456a4 | |||
59d1811301 | |||
e00a9d5424 | |||
b02f27923b | |||
9286f0ab30 | |||
6f7f6aa9d1 | |||
943b6bab5d | |||
c97683ddee | |||
27aa03a6ad | |||
7cecdf3ab8 | |||
ef26980f53 | |||
e952070e2d | |||
59f53581c3 | |||
8a60773858 | |||
e0a9f7c529 | |||
3c4dcdefa5 | |||
1132251721 | |||
09519ced83 | |||
e6860f56b2 | |||
3ed1fced39 | |||
5ca507cd87 | |||
c45bc8c189 | |||
fcf889cbce | |||
0abe202216 | |||
967e31b554 | |||
7b8dbaff9c | |||
616f110d0e | |||
639fdbd15e | |||
f0563671b2 | |||
47a3c3b8e7 | |||
3bf06a4a61 | |||
4fab8a9d42 | |||
b1c20cdc36 | |||
ee562c8a79 | |||
cd53f66941 | |||
2cb8872430 | |||
860cb98964 | |||
535505044d | |||
420c30a03d | |||
f50c36577b | |||
9c33248b46 | |||
3ea07da33b | |||
8fdf109e5a | |||
536cd904c6 | |||
92473bbe25 | |||
a3aafaf7d8 | |||
1535f2d396 | |||
7d06cec9fa | |||
e796bee9f8 | |||
4180d0ade0 | |||
64eb269f5e | |||
ac37f9b288 | |||
36ae59d55a | |||
d4ad7344d5 | |||
9630446d08 | |||
d4be6def9c | |||
843d38c095 | |||
35725c3fdd | |||
6120209ce7 | |||
521d6c3313 | |||
4a8533a7ed | |||
723e228f5f | |||
7efb6190e9 | |||
07c8ebed2e | |||
d8531b9702 | |||
5df66ab08f | |||
07d0e50131 | |||
47481d6038 | |||
fc97c6b274 | |||
17ee2d56ea | |||
563004b79f | |||
e6b3be510b | |||
21dbd737d8 | |||
5c80cfd708 | |||
66f771cef1 | |||
1d08b2f3a5 | |||
ffadfe2a1d | |||
9e9f302ef8 | |||
6cdb6a16ba |
@ -189,7 +189,8 @@
|
||||
}));
|
||||
openmct.install(openmct.plugins.SummaryWidget());
|
||||
openmct.install(openmct.plugins.Notebook());
|
||||
openmct.install(openmct.plugins.LADTable());
|
||||
// openmct.install(openmct.plugins.LADTable());
|
||||
openmct.install(openmct.plugins.LADTableNEW());
|
||||
openmct.install(openmct.plugins.Filters(['table', 'telemetry.plot.overlay']));
|
||||
openmct.install(openmct.plugins.ObjectMigration());
|
||||
openmct.install(openmct.plugins.ClearData(
|
||||
|
@ -62,7 +62,7 @@ export default {
|
||||
components: {
|
||||
LadRow
|
||||
},
|
||||
inject: ['openmct', 'objectPath', 'currentView'],
|
||||
inject: ['openmct', 'objectPath', 'currentView', 'tableSet'],
|
||||
props: {
|
||||
domainObject: {
|
||||
type: Object,
|
||||
@ -95,20 +95,21 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.composition = this.openmct.composition.get(this.domainObject);
|
||||
this.composition.on('add', this.addLadTable);
|
||||
this.composition.on('remove', this.removeLadTable);
|
||||
this.composition.on('reorder', this.reorderLadTables);
|
||||
this.composition.load();
|
||||
this.tableSet.initialize();
|
||||
// this.composition = this.openmct.composition.get(this.domainObject);
|
||||
// this.composition.on('add', this.addLadTable);
|
||||
// this.composition.on('remove', this.removeLadTable);
|
||||
// this.composition.on('reorder', this.reorderLadTables);
|
||||
// this.composition.load();
|
||||
},
|
||||
destroyed() {
|
||||
this.composition.off('add', this.addLadTable);
|
||||
this.composition.off('remove', this.removeLadTable);
|
||||
this.composition.off('reorder', this.reorderLadTables);
|
||||
this.compositions.forEach(c => {
|
||||
c.composition.off('add', c.addCallback);
|
||||
c.composition.off('remove', c.removeCallback);
|
||||
});
|
||||
// this.composition.off('add', this.addLadTable);
|
||||
// this.composition.off('remove', this.removeLadTable);
|
||||
// this.composition.off('reorder', this.reorderLadTables);
|
||||
// this.compositions.forEach(c => {
|
||||
// c.composition.off('add', c.addCallback);
|
||||
// c.composition.off('remove', c.removeCallback);
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
addLadTable(domainObject) {
|
||||
|
65
src/plugins/LADTable2/EmptyLADTableRow.js
Normal file
65
src/plugins/LADTable2/EmptyLADTableRow.js
Normal file
@ -0,0 +1,65 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
// extend telemetryTableRow
|
||||
// it should take care of rows with empty values
|
||||
// import it in LADTableRowCollection
|
||||
// refer to emptyChannelListRow.js
|
||||
import TelemetryTableRow from '../telemetryTable/TelemetryTableRow.js';
|
||||
|
||||
export default class EmptyLADTableRow extends TelemetryTableRow {
|
||||
constructor(columns, objectKeyString) {
|
||||
super({}, columns, objectKeyString);
|
||||
this.isDummyRow = true;
|
||||
this.columns = columns;
|
||||
this.objectKeyString = objectKeyString;
|
||||
this.datum = Object.keys(columns).reduce((datum, column) => {
|
||||
datum[column] = undefined;
|
||||
|
||||
return datum;
|
||||
}, {});
|
||||
}
|
||||
|
||||
getFormattedDatum(headers) {
|
||||
return Object.keys(headers).reduce((formattedDatum, columnKey) => {
|
||||
formattedDatum[columnKey] = this.getFormattedValue(columnKey);
|
||||
|
||||
return formattedDatum;
|
||||
}, {});
|
||||
}
|
||||
|
||||
getFormattedValue(key) {
|
||||
if (this.columns[key] === undefined) {
|
||||
return '';
|
||||
} else {
|
||||
return this.datum[key] || '--';
|
||||
}
|
||||
}
|
||||
|
||||
getRowClass() {
|
||||
}
|
||||
|
||||
getCellLimitClasses() {
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
92
src/plugins/LADTable2/LADTable.js
Normal file
92
src/plugins/LADTable2/LADTable.js
Normal file
@ -0,0 +1,92 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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 TelemetryTable from '../telemetryTable/TelemetryTable.js';
|
||||
import EmptyLADTableRow from './EmptyLADTableRow.js';
|
||||
import TelemetryTableRow from '../telemetryTable/TelemetryTableRow.js';
|
||||
import LADTableRowCollection from './LADTableRowCollection.js';
|
||||
|
||||
export default class LADTable extends TelemetryTable {
|
||||
constructor(domainObject, openmct) {
|
||||
super(domainObject, openmct);
|
||||
|
||||
this.createTableRowCollections();
|
||||
}
|
||||
initialize() {
|
||||
if (this.domainObject.type === 'LadTable') {
|
||||
this.filterObserver = this.openmct.objects.observe(this.domainObject, 'configuration.filters', this.updateFilters);
|
||||
this.filters = this.domainObject.configuration.filters;
|
||||
this.loadComposition();
|
||||
} else {
|
||||
this.addTelemetryObject(this.domainObject);
|
||||
}
|
||||
}
|
||||
|
||||
addTelemetryObject(telemetryObject) {
|
||||
super.addTelemetryObject(telemetryObject);
|
||||
this.addDummyRowForObject(telemetryObject);
|
||||
}
|
||||
|
||||
addDummyRowForObject(object) {
|
||||
let objectKeyString = this.openmct.objects.makeKeyString(object.identifier);
|
||||
let columns = this.getColumnMapForObject(objectKeyString);
|
||||
let dummyRow = new EmptyLADTableRow(columns, objectKeyString);
|
||||
this.tableRows.addOne(dummyRow);
|
||||
this.headers = this.configuration.getVisibleHeaders();
|
||||
}
|
||||
|
||||
getTelemetryProcessor(keyString, columnMap, limitEvaluator) {
|
||||
return (telemetry) => {
|
||||
//Check that telemetry object has not been removed since telemetry was requested.
|
||||
if (!this.telemetryObjects[keyString]) {
|
||||
return;
|
||||
}
|
||||
|
||||
// only add the latest telemetry
|
||||
let latest = telemetry[telemetry.length - 1];
|
||||
let telemetryRow = new TelemetryTableRow(latest, columnMap, keyString, limitEvaluator);
|
||||
|
||||
if (this.paused) {
|
||||
this.delayedActions.push(this.tableRows.addOne.bind(this.tableRows, telemetryRow, 'add'));
|
||||
} else {
|
||||
this.tableRows.addOne(telemetryRow, 'add');
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
buildOptionsFromConfiguration(telemetryObject) {
|
||||
let LADOptions = {
|
||||
strategy: 'latest',
|
||||
size: 1
|
||||
};
|
||||
let options = Object.assign(super.buildOptionsFromConfiguration(telemetryObject), LADOptions);
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
createTableRowCollections() {
|
||||
// need change: can this part be refactored by using super?
|
||||
// split the original method
|
||||
this.tableRows = new LADTableRowCollection(this.openmct);
|
||||
this.tableRows.on('resetRowsFromAllData', this.resetRowsFromAllData);
|
||||
}
|
||||
}
|
17
src/plugins/LADTable2/LADTableConfigurationViewProvider.js
Normal file
17
src/plugins/LADTable2/LADTableConfigurationViewProvider.js
Normal file
@ -0,0 +1,17 @@
|
||||
import TableConfigurationViewProvider from '../telemetryTable/TableConfigurationViewProvider';
|
||||
|
||||
export default function LADTableConfigurationViewProvider(openmct) {
|
||||
// extends TableConfigurationViewProvider and change type to LadTable
|
||||
let tableConfiguration = new TableConfigurationViewProvider(openmct);
|
||||
tableConfiguration.canView = function (selection) {
|
||||
if (selection.length !== 1 || selection[0].length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let object = selection[0][0].context.item;
|
||||
|
||||
return object && object.type === 'LadTable';
|
||||
};
|
||||
|
||||
return tableConfiguration;
|
||||
}
|
79
src/plugins/LADTable2/LADTableRowCollection.js
Normal file
79
src/plugins/LADTable2/LADTableRowCollection.js
Normal file
@ -0,0 +1,79 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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 TableRowCollection from '../telemetryTable/collections/TableRowCollection.js';
|
||||
import EmptyLADTableRow from './EmptyLADTableRow.js';
|
||||
|
||||
export default class LADTableRowCollection extends TableRowCollection {
|
||||
constructor(openmct) {
|
||||
super(openmct);
|
||||
|
||||
this.ladMap = new Map();
|
||||
this.timeColumn = openmct.time.timeSystem().key;
|
||||
}
|
||||
// TODO i think this breaks filters
|
||||
// this also breaks the parent's contract
|
||||
addOne(item) {
|
||||
if (item.isDummyRow) {
|
||||
this.ladMap.set(item.objectKeyString, this.rows.length);
|
||||
this.rows.push(item);
|
||||
this.emit('add', [item]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.isNewerThanLAD(item)) {
|
||||
let rowIndex = this.ladMap.get(item.objectKeyString);
|
||||
let itemToReplace = this.rows[rowIndex];
|
||||
this.rows[rowIndex] = item;
|
||||
this.emit('remove', [itemToReplace]);
|
||||
this.emit('add', [item]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
isNewerThanLAD(item) {
|
||||
let rowIndex = this.ladMap.get(item.objectKeyString);
|
||||
let latestRow = this.rows[rowIndex];
|
||||
let newerThanLatest = latestRow === undefined
|
||||
|| item.datum[this.timeColumn] > latestRow.datum[this.timeColumn]
|
||||
|| latestRow.isDummyRow;
|
||||
|
||||
return !this.ladMap.has(item.objectKeyString) || newerThanLatest;
|
||||
}
|
||||
clear() {
|
||||
this.rows = this.rows.map(
|
||||
row => new EmptyLADTableRow(row.columns, row.objectKeyString)
|
||||
);
|
||||
this.rebuildLadMap();
|
||||
}
|
||||
|
||||
rebuildLadMap() {
|
||||
this.ladMap.clear();
|
||||
this.rows.forEach((row, index) => {
|
||||
this.ladMap.set(row.objectKeyString, index);
|
||||
});
|
||||
}
|
||||
}
|
102
src/plugins/LADTable2/LADTableSet.js
Normal file
102
src/plugins/LADTable2/LADTableSet.js
Normal file
@ -0,0 +1,102 @@
|
||||
import EventEmitter from 'EventEmitter';
|
||||
import LADTable from './LADTable';
|
||||
|
||||
export default class LADTableSet extends EventEmitter {
|
||||
// 1. change the structure of telemetryObjects to {tablekey: {teleKey: teleObj}}
|
||||
// 2. when add lad table. add an event ladtable.on('object-removed', this.removeTelemetryObj);
|
||||
constructor(domainObject, openmct) {
|
||||
super();
|
||||
this.domainObject = domainObject;
|
||||
this.openmct = openmct;
|
||||
this.tables = {};
|
||||
this.headers = {};
|
||||
this.composition = undefined;
|
||||
this.telemetryObjects = {};
|
||||
|
||||
this.unloadComposition = undefined;
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.unloadComposition = this.loadComposition();
|
||||
}
|
||||
|
||||
loadComposition() {
|
||||
this.composition = this.openmct.composition.get(this.domainObject);
|
||||
|
||||
if (this.composition !== undefined) {
|
||||
this.composition.load().then((composition) => {
|
||||
composition.forEach(this.addLADTable.bind(this));
|
||||
|
||||
this.composition.on('add', this.addLADTable.bind(this));
|
||||
this.composition.on('remove', this.removeLADTable.bind(this));
|
||||
|
||||
this.emit('loaded');
|
||||
});
|
||||
|
||||
return function unloadComposition() {
|
||||
if (this.composition !== undefined) {
|
||||
this.composition.off('add', this.addLADTable);
|
||||
this.composition.off('remove', this.removeLADTable);
|
||||
delete this.composition;
|
||||
}
|
||||
}.bind(this);
|
||||
}
|
||||
}
|
||||
|
||||
addLADTable(domainObject) {
|
||||
const keyString = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||
|
||||
this.tables[keyString] = new LADTable(domainObject, this.openmct);
|
||||
|
||||
this.tables[keyString].once('loaded', () => {
|
||||
this.addHeaders(this.tables[keyString]);
|
||||
this.addTelemetryObjects(this.tables[keyString]);
|
||||
});
|
||||
|
||||
this.emit('table-added', this.tables[keyString]);
|
||||
}
|
||||
|
||||
removeLADTable(identifier) {
|
||||
const keyString = this.openmct.objects.makeKeyString(identifier);
|
||||
|
||||
delete this.tables[keyString];
|
||||
|
||||
this.emit('table-removed', identifier);
|
||||
}
|
||||
|
||||
addTelemetryObjects(ladTable) {
|
||||
let telemetryObjects = ladTable.telemetryObjects;
|
||||
for (let key in telemetryObjects) {
|
||||
if (telemetryObjects[key]) {
|
||||
let telemetryObject = {};
|
||||
telemetryObject.key = this.openmct.objects.makeKeyString(telemetryObjects[key].telemetryObject.identifier);
|
||||
telemetryObject.domainObject = telemetryObjects[key].telemetryObject;
|
||||
telemetryObject.metadata = this.openmct.telemetry.getMetadata(telemetryObjects[key].telemetryObject);
|
||||
telemetryObject.formats = this.openmct.telemetry.getFormatMap(telemetryObject.metadata);
|
||||
telemetryObject.limitEvaluator = this.openmct
|
||||
.telemetry
|
||||
.limitEvaluator(telemetryObject.domainObject);
|
||||
telemetryObject.valueMetadata = telemetryObject
|
||||
.metadata
|
||||
.valuesForHints(['range'])[0];
|
||||
telemetryObject.valueKey = telemetryObject.valueMetadata.key;
|
||||
if (!this.telemetryObjects[ladTable.keyString]) {
|
||||
this.telemetryObjects[ladTable.keyString] = {};
|
||||
}
|
||||
|
||||
this.telemetryObjects[ladTable.keyString][telemetryObject.key] = telemetryObject;
|
||||
this.emit('telemetry-object-added');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addHeaders(ladTable) {
|
||||
let headers = ladTable.headers;
|
||||
Object.assign(this.headers, headers);
|
||||
this.emit('headers-added');
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.unloadComposition();
|
||||
}
|
||||
}
|
47
src/plugins/LADTable2/LADTableSetView.js
Normal file
47
src/plugins/LADTable2/LADTableSetView.js
Normal file
@ -0,0 +1,47 @@
|
||||
import TableSetView from './components/LADTableSet.vue';
|
||||
import LADTableSet from './LADTableSet';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default class LadTableSetView {
|
||||
constructor(openmct, domainObject, objectPath) {
|
||||
this.openmct = openmct;
|
||||
this.domainObject = domainObject;
|
||||
this.objectPath = objectPath;
|
||||
this.component = undefined;
|
||||
this.tableSet = new LADTableSet(domainObject, openmct);
|
||||
}
|
||||
|
||||
show(element) {
|
||||
this.component = new Vue({
|
||||
el: element,
|
||||
components: {
|
||||
TableSetView
|
||||
},
|
||||
provide: {
|
||||
openmct: this.openmct,
|
||||
objectPath: this.objectPath,
|
||||
currentView: this,
|
||||
tableSet: this.tableSet
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
domainObject: this.domainObject
|
||||
};
|
||||
},
|
||||
template: '<table-set-view ref="TableSetView" :domain-object="domainObject"></table-set-view>'
|
||||
});
|
||||
}
|
||||
|
||||
getViewContext() {
|
||||
if (!this.component) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return this.component.$refs.TableSetView.getViewContext();
|
||||
}
|
||||
|
||||
destroy(element) {
|
||||
this.component.$destroy();
|
||||
this.component = undefined;
|
||||
}
|
||||
}
|
43
src/plugins/LADTable2/LADTableSetViewProvider.js
Normal file
43
src/plugins/LADTable2/LADTableSetViewProvider.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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 LadTableSetView from './LadTableSetView';
|
||||
|
||||
export default function LADTableSetViewProvider(openmct) {
|
||||
return {
|
||||
key: 'LadTableSet.view',
|
||||
name: 'LAD Table Set',
|
||||
cssClass: 'icon-tabular-lad-set',
|
||||
canView: function (domainObject) {
|
||||
return domainObject.type === 'LadTableSet';
|
||||
},
|
||||
canEdit: function (domainObject) {
|
||||
return domainObject.type === 'LadTableSet';
|
||||
},
|
||||
view: function (domainObject, objectPath) {
|
||||
return new LadTableSetView(openmct, domainObject, objectPath);
|
||||
},
|
||||
priority: function () {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
}
|
79
src/plugins/LADTable2/LADTableView.js
Normal file
79
src/plugins/LADTable2/LADTableView.js
Normal file
@ -0,0 +1,79 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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 TableView from '../telemetryTable/components/table.vue';
|
||||
import LADTable from './LADTable.js';
|
||||
import Vue from 'vue';
|
||||
export default class LADTableView {
|
||||
constructor(openmct, domainObject, objectPath) {
|
||||
this.openmct = openmct;
|
||||
this.objectPath = objectPath;
|
||||
this.component = undefined;
|
||||
this.table = new LADTable(domainObject, openmct);
|
||||
}
|
||||
|
||||
show(element, editMode) {
|
||||
this.component = new Vue({
|
||||
el: element,
|
||||
components: {
|
||||
TableView
|
||||
},
|
||||
provide: {
|
||||
openmct: this.openmct,
|
||||
currentView: this,
|
||||
table: this.table,
|
||||
objectPath: this.objectPath
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
isEditing: editMode,
|
||||
domainObject: this.domainObject,
|
||||
marking: {
|
||||
disableMultiSelect: false,
|
||||
enable: true,
|
||||
rowName: '',
|
||||
rowNamePlural: '',
|
||||
useAlternateControlBar: false
|
||||
}
|
||||
};
|
||||
},
|
||||
template: '<table-view ref="tableView" :allowSorting=false :is-editing="isEditing" :allowFiltering=false :marking="marking" :domain-object="domainObject"></table-view>'
|
||||
});
|
||||
}
|
||||
|
||||
onEditModeChange(editMode) {
|
||||
this.component.isEditing = editMode;
|
||||
}
|
||||
|
||||
getViewContext() {
|
||||
if (!this.component) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return this.component.$refs.tableView.getViewContext();
|
||||
}
|
||||
|
||||
destroy(element) {
|
||||
this.component.$destroy();
|
||||
this.component = undefined;
|
||||
}
|
||||
}
|
48
src/plugins/LADTable2/LADTableViewProvider.js
Normal file
48
src/plugins/LADTable2/LADTableViewProvider.js
Normal file
@ -0,0 +1,48 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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 LADTableView from './LADTableView';
|
||||
|
||||
export default class LADTableViewProvider {
|
||||
constructor(openmct) {
|
||||
this.openmct = openmct;
|
||||
this.name = 'LAD Table NEW';
|
||||
this.key = 'LadTable.view';
|
||||
this.cssClass = 'icon-tabular-lad';
|
||||
}
|
||||
|
||||
canView(domainObject) {
|
||||
return domainObject.type === 'LadTable';
|
||||
}
|
||||
|
||||
canEdit(domainObject) {
|
||||
return domainObject.type === 'LadTable';
|
||||
}
|
||||
|
||||
view(domainObject, objectPath) {
|
||||
return new LADTableView(this.openmct, domainObject, objectPath);
|
||||
}
|
||||
|
||||
priority(domainObject) {
|
||||
return 1;
|
||||
}
|
||||
}
|
180
src/plugins/LADTable2/components/LADRow.vue
Normal file
180
src/plugins/LADTable2/components/LADRow.vue
Normal file
@ -0,0 +1,180 @@
|
||||
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
<template>
|
||||
<tr
|
||||
class="js-lad-table__body__row"
|
||||
@contextmenu.prevent="showContextMenu"
|
||||
>
|
||||
<td class="js-first-data">{{ telemetryObject.telemetryObject.name }}</td>
|
||||
<td class="js-second-data">{{ formattedTimestamp }}</td>
|
||||
<td
|
||||
class="js-third-data"
|
||||
:class="valueClass"
|
||||
>{{ value }}</td>
|
||||
<td
|
||||
v-if="hasUnits"
|
||||
class="js-units"
|
||||
>
|
||||
{{ unit }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
inject: ['openmct', 'currentView'],
|
||||
props: {
|
||||
row: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
telemetryObject: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
headers: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
pathToTable: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
hasUnits: {
|
||||
type: Boolean,
|
||||
require: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rowClass: this.row.getRowClass()
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
domainObject() {
|
||||
return this.telemetryObject.telemetryObject;
|
||||
},
|
||||
metadata() {
|
||||
return this.openmct.telemetry.getMetadata(this.domainObject);
|
||||
},
|
||||
formats() {
|
||||
return this.openmct.telemetry.getFormatMap(this.metadata);
|
||||
},
|
||||
limitEvaluator() {
|
||||
return this.openmct.telemetry.limitEvaluator(this.domainObject);
|
||||
},
|
||||
valueMetadata() {
|
||||
return this.metadata
|
||||
? this.metadata.valuesForHints(['range'])[0]
|
||||
: undefined;
|
||||
},
|
||||
valueKey() {
|
||||
return this.valueMetadata
|
||||
? this.valueMetadata.key
|
||||
: undefined;
|
||||
},
|
||||
value() {
|
||||
let formatter = this.formats && this.formats[this.valueKey];
|
||||
if (formatter && formatter.format(this.row.datum) !== 'nan') {
|
||||
return formatter.format(this.row.datum);
|
||||
} else {
|
||||
return '---';
|
||||
}
|
||||
},
|
||||
headerKeys() {
|
||||
return Object.keys(this.headers);
|
||||
},
|
||||
formattedTimestamp() {
|
||||
return this.timestamp !== undefined ? this.getFormattedTimestamp(this.timestamp) : '---';
|
||||
},
|
||||
timestamp() {
|
||||
return this.row.datum[this.timeSystemKey];
|
||||
},
|
||||
valueClass() {
|
||||
let limit;
|
||||
if (this.limitEvaluator) {
|
||||
limit = this.limitEvaluator.evaluate(this.row, this.valueMetadata);
|
||||
}
|
||||
|
||||
if (limit) {
|
||||
return limit.cssClass;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
unit() {
|
||||
return this.valueMetadata.unit || '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.openmct.time.on('timeSystem', this.updateTimeSystem);
|
||||
this.timeSystemKey = this.openmct.time.timeSystem().key;
|
||||
},
|
||||
destroyed() {
|
||||
this.openmct.time.off('timeSystem', this.updateTimeSystem);
|
||||
},
|
||||
methods: {
|
||||
parseValue(header) {
|
||||
if (this.row[header] === undefined) {
|
||||
return '--';
|
||||
} else {
|
||||
return this.row[header];
|
||||
}
|
||||
},
|
||||
updateViewContext() {
|
||||
this.$emit('rowContextClick', {
|
||||
viewHistoricalData: true,
|
||||
viewDatumAction: true,
|
||||
getDatum: () => {
|
||||
return this.datum;
|
||||
}
|
||||
});
|
||||
},
|
||||
getParsedTimestamp(timestamp) {
|
||||
if (this.timeSystemFormat()) {
|
||||
return this.formats[this.timeSystemKey].parse(timestamp);
|
||||
}
|
||||
},
|
||||
getFormattedTimestamp(timestamp) {
|
||||
if (this.timeSystemFormat()) {
|
||||
return this.formats[this.timeSystemKey].format(timestamp);
|
||||
}
|
||||
},
|
||||
timeSystemFormat() {
|
||||
if (this.formats && this.formats[this.timeSystemKey]) {
|
||||
return true;
|
||||
} else {
|
||||
console.warn(`No formatter for ${this.timeSystemKey} time system for ${this.domainObject.name}.`);
|
||||
|
||||
return false;
|
||||
}
|
||||
},
|
||||
updateTimeSystem(timeSystem) {
|
||||
this.timeSystemKey = timeSystem.key;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
201
src/plugins/LADTable2/components/LADTableSet.vue
Normal file
201
src/plugins/LADTable2/components/LADTableSet.vue
Normal file
@ -0,0 +1,201 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
<template>
|
||||
<table class="c-table c-lad-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Timestamp</th>
|
||||
<th>Value</th>
|
||||
<th v-if="hasUnits">Unit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template
|
||||
v-for="tableKey in tables"
|
||||
>
|
||||
<tr
|
||||
:key="tableKey"
|
||||
class="c-table__group-header js-lad-table-set__table-headers"
|
||||
>
|
||||
<td colspan="10">
|
||||
{{ getTableName(tableKey) }}
|
||||
</td>
|
||||
</tr>
|
||||
<LadRow
|
||||
v-for="telemetryKey in telemetry[tableKey]"
|
||||
:key="`${tableKey}${telemetryKey}`"
|
||||
:row="ladRowData[telemetryKey]"
|
||||
:telemetry-object="getTelemetryObject(tableKey, telemetryKey)"
|
||||
:headers="headers"
|
||||
:has-units="hasUnits"
|
||||
:path-to-table="getObjectPath(tableKey)"
|
||||
@rowContextClick="updateViewContext"
|
||||
/>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LadRow from './LADRow.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
LadRow
|
||||
},
|
||||
inject: ['openmct', 'objectPath', 'currentView', 'tableSet'],
|
||||
props: {
|
||||
domainObject: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
updatingView: false,
|
||||
headers: {},
|
||||
compositions: [],
|
||||
viewContext: {},
|
||||
hasUnits: false,
|
||||
tables: [],
|
||||
telemetry: {},
|
||||
ladRowData: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted() {
|
||||
this.listeners = {};
|
||||
|
||||
this.tableSet.on('headers-added', this.updateHeaders);
|
||||
this.tableSet.on('table-added', this.addTable);
|
||||
this.tableSet.on('table-removed', this.removeTable);
|
||||
|
||||
this.tableSet.on('telemetry-object-added', this.checkUnit);
|
||||
this.tableSet.initialize();
|
||||
},
|
||||
destroyed() {
|
||||
this.tableSet.off('headers-added', this.updateHeaders);
|
||||
this.tableSet.off('table-added', this.addTable);
|
||||
this.tableSet.off('table-removed', this.removeTable);
|
||||
},
|
||||
methods: {
|
||||
updateViewContext(rowContext) {
|
||||
this.viewContext.row = rowContext;
|
||||
},
|
||||
getViewContext() {
|
||||
return this.viewContext;
|
||||
},
|
||||
updateHeaders() {
|
||||
this.headers = this.tableSet.headers;
|
||||
},
|
||||
getObjectPath(key) {
|
||||
const table = this.tableSet.tables[key];
|
||||
|
||||
return [table.domainObject, ...this.objectPath];
|
||||
},
|
||||
getTelemetryObject(ladTableKey, telemetryKey) {
|
||||
const ladTable = this.tableSet.tables[ladTableKey];
|
||||
const telemetry = ladTable.telemetryObjects[telemetryKey];
|
||||
|
||||
return telemetry;
|
||||
},
|
||||
getTableName(key) {
|
||||
return this.tableSet.tables[key].domainObject.name;
|
||||
},
|
||||
addTable(ladTable) {
|
||||
let key = this.openmct.objects.makeKeyString(ladTable.domainObject.identifier);
|
||||
ladTable.on('object-added', this.addTelemetry.bind(this, key));
|
||||
ladTable.on('object-removed',
|
||||
(identifier) => this.removeTelemetry(identifier, ladTable.keyString));
|
||||
ladTable.tableRows.on('add', this.addRow);
|
||||
ladTable.initialize();
|
||||
this.tables.push(key);
|
||||
},
|
||||
removeTable(identifier) {
|
||||
let idx;
|
||||
let key = this.openmct.objects.makeKeyString(identifier);
|
||||
for (let i in this.tables) {
|
||||
if (this.tables[i] === key) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (idx !== undefined) {
|
||||
this.tables.splice(idx, 1);
|
||||
this.removeTelemetryObjects(key);
|
||||
}
|
||||
|
||||
},
|
||||
checkUnit() {
|
||||
for (let ladKey in this.tableSet.telemetryObjects) {
|
||||
if (ladKey) {
|
||||
let telemetryObjects = this.tableSet.telemetryObjects[ladKey];
|
||||
for (let teleKey in telemetryObjects) {
|
||||
if (teleKey) {
|
||||
let telemetryObject = telemetryObjects[teleKey];
|
||||
let valueMetadatas = telemetryObject.metadata.valueMetadatas;
|
||||
for (let metadatum of valueMetadatas) {
|
||||
if (metadatum.unit !== undefined) {
|
||||
this.hasUnits = true;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this.hasUnits = false;
|
||||
},
|
||||
addTelemetry(tableKey, telemetryObject) {
|
||||
const telemetryKey = this.openmct.objects.makeKeyString(telemetryObject.identifier);
|
||||
|
||||
if (this.telemetry[tableKey] === undefined) {
|
||||
this.$set(this.telemetry, tableKey, []);
|
||||
}
|
||||
|
||||
this.telemetry[tableKey].push(telemetryKey);
|
||||
},
|
||||
removeTelemetry(objectIdentifier, ladKey) {
|
||||
let key = this.openmct.objects.makeKeyString(objectIdentifier);
|
||||
let filtered = this.telemetry[ladKey].filter(telemetry => {
|
||||
return telemetry !== key;
|
||||
});
|
||||
this.telemetry[ladKey] = filtered;
|
||||
},
|
||||
removeLocalTelemetryObjects(tableKey) {
|
||||
this.$delete(this.telemetry, tableKey);
|
||||
},
|
||||
addRow(telemetry) {
|
||||
const ladTelemetry = telemetry[telemetry.length - 1];
|
||||
|
||||
this.$set(this.ladRowData, ladTelemetry.objectKeyString, ladTelemetry);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
33
src/plugins/LADTable2/ladTableCompositionPolicy.js
Normal file
33
src/plugins/LADTable2/ladTableCompositionPolicy.js
Normal file
@ -0,0 +1,33 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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.
|
||||
*****************************************************************************/
|
||||
|
||||
export default function ladTableCompositionPolicy(openmct) {
|
||||
return function (parent, child) {
|
||||
if (parent.type === 'LadTable') {
|
||||
return openmct.telemetry.isTelemetryObject(child);
|
||||
} else if (parent.type === 'LadTableSet') {
|
||||
return child.type === 'LadTable';
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
61
src/plugins/LADTable2/plugin.js
Normal file
61
src/plugins/LADTable2/plugin.js
Normal file
@ -0,0 +1,61 @@
|
||||
/*****************************************************************************
|
||||
* Open MCT, Copyright (c) 2014-2021, 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 LADTableViewProvider from './LADTableViewProvider';
|
||||
import LADTableSetViewProvider from './LADTableSetViewProvider';
|
||||
import ladTableCompositionPolicy from './ladTableCompositionPolicy.js';
|
||||
import LADTableConfigurationViewProvider from './LADTableConfigurationViewProvider';
|
||||
|
||||
export default function () {
|
||||
return function install(openmct) {
|
||||
openmct.objectViews.addProvider(new LADTableViewProvider(openmct));
|
||||
openmct.objectViews.addProvider(new LADTableSetViewProvider(openmct));
|
||||
openmct.inspectorViews.addProvider(new LADTableConfigurationViewProvider(openmct));
|
||||
openmct.composition.addPolicy(ladTableCompositionPolicy(openmct));
|
||||
|
||||
openmct.types.addType('LadTable', {
|
||||
name: "LAD Table NEW",
|
||||
creatable: true,
|
||||
description: "A Latest Available Data tabular view in which each row displays the values for one or more contained telemetry objects.",
|
||||
cssClass: 'icon-tabular-lad',
|
||||
initialize: function (domainObject) {
|
||||
domainObject.composition = [];
|
||||
domainObject.configuration = {
|
||||
columnWidths: {},
|
||||
hiddenColumns: {}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
openmct.types.addType('LadTableSet', {
|
||||
name: "LAD Table Set NEW",
|
||||
creatable: true,
|
||||
description: "A collection of LAD tables.",
|
||||
cssClass: 'icon-tabular-lad-set',
|
||||
initialize(domainObject) {
|
||||
domainObject.composition = [];
|
||||
domainObject.configuration = {};
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
}
|
@ -46,6 +46,7 @@ define([
|
||||
'./flexibleLayout/plugin',
|
||||
'./tabs/plugin',
|
||||
'./LADTable/plugin',
|
||||
'./LADTable2/plugin',
|
||||
'./filters/plugin',
|
||||
'./objectMigration/plugin',
|
||||
'./goToOriginalAction/plugin',
|
||||
@ -100,6 +101,7 @@ define([
|
||||
FlexibleLayout,
|
||||
Tabs,
|
||||
LADTable,
|
||||
LADTableNEW,
|
||||
Filters,
|
||||
ObjectMigration,
|
||||
GoToOriginalAction,
|
||||
@ -207,7 +209,8 @@ define([
|
||||
plugins.FolderView = FolderView;
|
||||
plugins.Tabs = Tabs;
|
||||
plugins.FlexibleLayout = FlexibleLayout;
|
||||
plugins.LADTable = LADTable.default;
|
||||
// plugins.LADTable = LADTable.default;
|
||||
plugins.LADTableNEW = LADTableNEW.default;
|
||||
plugins.Filters = Filters;
|
||||
plugins.ObjectMigration = ObjectMigration.default;
|
||||
plugins.GoToOriginalAction = GoToOriginalAction.default;
|
||||
|
@ -128,6 +128,8 @@ define([
|
||||
|
||||
this.tableComposition.on('add', this.addTelemetryObject);
|
||||
this.tableComposition.on('remove', this.removeTelemetryObject);
|
||||
|
||||
this.emit('loaded');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -82,8 +82,10 @@ define([
|
||||
columnsToRemove.forEach((column) => {
|
||||
//There may be more than one column with the same key (eg. time system columns)
|
||||
if (!this.hasColumnWithKey(column.getKey())) {
|
||||
delete configuration.hiddenColumns[column.getKey()];
|
||||
configurationChanged = true;
|
||||
if (configuration.hiddenColumns[column.getKey()]) {
|
||||
delete configuration.hiddenColumns[column.getKey()];
|
||||
configurationChanged = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (configurationChanged) {
|
||||
|
Reference in New Issue
Block a user