mirror of
https://github.com/nasa/openmct.git
synced 2025-06-03 08:00:52 +00:00
Minor table refactoring (#2431)
* Refactor how tables process incoming data * Fixed build in linux * Added 'buttons' slot to tables * Revert theme change
This commit is contained in:
parent
8578d78c51
commit
7fe4a77c43
@ -4,6 +4,7 @@
|
|||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"acorn": "6.2.0",
|
||||||
"angular": "1.4.14",
|
"angular": "1.4.14",
|
||||||
"angular-route": "1.4.14",
|
"angular-route": "1.4.14",
|
||||||
"babel-eslint": "8.2.6",
|
"babel-eslint": "8.2.6",
|
||||||
|
@ -25,7 +25,7 @@ import Vue from 'vue'
|
|||||||
import objectUtils from '../../api/objects/object-utils.js'
|
import objectUtils from '../../api/objects/object-utils.js'
|
||||||
import DisplayLayoutType from './DisplayLayoutType.js'
|
import DisplayLayoutType from './DisplayLayoutType.js'
|
||||||
import DisplayLayoutToolbar from './DisplayLayoutToolbar.js'
|
import DisplayLayoutToolbar from './DisplayLayoutToolbar.js'
|
||||||
import AlphaNumericFormatViewProvider from './AlphaNumericFormatViewProvider.js'
|
import AlphaNumericFormatViewProvider from './AlphanumericFormatViewProvider.js'
|
||||||
|
|
||||||
export default function DisplayLayoutPlugin(options) {
|
export default function DisplayLayoutPlugin(options) {
|
||||||
return function (openmct) {
|
return function (openmct) {
|
||||||
|
@ -133,13 +133,6 @@ define([
|
|||||||
this.emit('object-removed', objectIdentifier);
|
this.emit('object-removed', objectIdentifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
createRow(datum, columnMap, keyString, limitEvaluator) {
|
|
||||||
return new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator);
|
|
||||||
}
|
|
||||||
|
|
||||||
requestDataFor(telemetryObject) {
|
requestDataFor(telemetryObject) {
|
||||||
this.incrementOutstandingRequests();
|
this.incrementOutstandingRequests();
|
||||||
let requestOptions = this.buildOptionsFromConfiguration(telemetryObject);
|
let requestOptions = this.buildOptionsFromConfiguration(telemetryObject);
|
||||||
@ -152,14 +145,17 @@ define([
|
|||||||
let keyString = this.openmct.objects.makeKeyString(telemetryObject.identifier);
|
let keyString = this.openmct.objects.makeKeyString(telemetryObject.identifier);
|
||||||
let columnMap = this.getColumnMapForObject(keyString);
|
let columnMap = this.getColumnMapForObject(keyString);
|
||||||
let limitEvaluator = this.openmct.telemetry.limitEvaluator(telemetryObject);
|
let limitEvaluator = this.openmct.telemetry.limitEvaluator(telemetryObject);
|
||||||
|
this.processHistoricalData(telemetryData, columnMap, keyString, limitEvaluator);
|
||||||
let telemetryRows = telemetryData.map(datum => this.createRow(datum, columnMap, keyString, limitEvaluator));
|
|
||||||
this.boundedRows.add(telemetryRows);
|
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.decrementOutstandingRequests();
|
this.decrementOutstandingRequests();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processHistoricalData(telemetryData, columnMap, keyString, limitEvaluator) {
|
||||||
|
let telemetryRows = telemetryData.map(datum => new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator));
|
||||||
|
this.boundedRows.add(telemetryRows);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@ -223,10 +219,14 @@ define([
|
|||||||
if (!this.telemetryObjects.includes(telemetryObject)) {
|
if (!this.telemetryObjects.includes(telemetryObject)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.boundedRows.add(this.createRow(datum, columnMap, keyString, limitEvaluator));
|
this.processRealtimeDatum(datum, columnMap, keyString, limitEvaluator);
|
||||||
}, subscribeOptions);
|
}, subscribeOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processRealtimeDatum(datum, columnMap, keyString, limitEvaluator) {
|
||||||
|
this.boundedRows.add(new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator));
|
||||||
|
}
|
||||||
|
|
||||||
isTelemetryObject(domainObject) {
|
isTelemetryObject(domainObject) {
|
||||||
return domainObject.hasOwnProperty('telemetry');
|
return domainObject.hasOwnProperty('telemetry');
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
title="Export This View's Data">
|
title="Export This View's Data">
|
||||||
<span class="c-button__label">Export As CSV</span>
|
<span class="c-button__label">Export As CSV</span>
|
||||||
</button>
|
</button>
|
||||||
|
<slot name="buttons"></slot>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isDropTargetActive" class="c-telemetry-table__drop-target" :style="dropTargetStyle"></div>
|
<div v-if="isDropTargetActive" class="c-telemetry-table__drop-target" :style="dropTargetStyle"></div>
|
||||||
<!-- Headers table -->
|
<!-- Headers table -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user