Compare commits
10 Commits
code-walkt
...
fix-plot-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ec0e3c99b | ||
|
|
f0a3d207f2 | ||
|
|
de13f67ae5 | ||
|
|
0256cc4830 | ||
|
|
8422add614 | ||
|
|
2114697d6f | ||
|
|
412eaf599e | ||
|
|
0691a35dab | ||
|
|
f57191fd89 | ||
|
|
14066b5c4d |
@@ -194,7 +194,6 @@
|
||||
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked'],
|
||||
{indicator: true}
|
||||
));
|
||||
openmct.install(openmct.plugins.CodeWalkthrough);
|
||||
openmct.start();
|
||||
</script>
|
||||
</html>
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
import Vue from 'Vue';
|
||||
|
||||
export default function install(openmct) {
|
||||
openmct.objectViews.addProvider({
|
||||
name: "Latest Data Table",
|
||||
key: "latest-table",
|
||||
cssClass: "icon-packet",
|
||||
description: "A tabular view of telemetry contents.",
|
||||
canView: function () {
|
||||
return true;
|
||||
},
|
||||
view: function (domainObject) {
|
||||
let unsubscribe;
|
||||
|
||||
return {
|
||||
show: function (element) {
|
||||
//element.innerText = 'Hello World!';
|
||||
let telemetryMetadata = openmct.telemetry.getMetadata(domainObject).values();
|
||||
let tableEl = document.createElement('table');
|
||||
let tableHeader = document.createElement('thead');
|
||||
let tableHeaderRow = document.createElement('tr');
|
||||
let tableBody = document.createElement('tbody');
|
||||
|
||||
element.appendChild(tableEl);
|
||||
tableHeader.appendChild(tableHeaderRow);
|
||||
tableEl.appendChild(tableHeader);
|
||||
tableEl.appendChild(tableBody);
|
||||
|
||||
telemetryMetadata.forEach(metadatum => {
|
||||
let tableHeader = document.createElement('td');
|
||||
tableHeader.innerText = metadatum.name;
|
||||
tableHeaderRow.appendChild(tableHeader);
|
||||
});
|
||||
|
||||
openmct.time.on('bounds', (newBounds) => {
|
||||
tableBody.innerHTML = '';
|
||||
requestTelemetry(newBounds);
|
||||
});
|
||||
|
||||
requestTelemetry();
|
||||
|
||||
// unsubscribe = openmct.telemetry.subscribe(domainObject, (datum) => {
|
||||
// addRow(datum);
|
||||
// });
|
||||
|
||||
function addRow(telemetryDatum) {
|
||||
let dataRow = document.createElement('tr');
|
||||
telemetryMetadata.forEach(metadatum => {
|
||||
let tableCell = document.createElement('td');
|
||||
let formatter = openmct.telemetry.getValueFormatter(metadatum);
|
||||
|
||||
tableCell.innerText = formatter.format(telemetryDatum[metadatum.key]);
|
||||
dataRow.appendChild(tableCell);
|
||||
tableBody.appendChild(dataRow);
|
||||
});
|
||||
}
|
||||
|
||||
function requestTelemetry(bounds) {
|
||||
openmct.telemetry.request(domainObject, {bounds}).then(arrayOfTelemetry => {
|
||||
arrayOfTelemetry.forEach(addRow);
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: function (element) {
|
||||
unsubscribe();
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@@ -41,7 +41,7 @@ export default class ConditionManager extends EventEmitter {
|
||||
this.subscriptions = {};
|
||||
this.telemetryObjects = {};
|
||||
this.testData = {
|
||||
conditionTestData: [],
|
||||
conditionTestInputs: this.conditionSetDomainObject.configuration.conditionTestData,
|
||||
applied: false
|
||||
};
|
||||
this.initialize();
|
||||
@@ -154,8 +154,10 @@ export default class ConditionManager extends EventEmitter {
|
||||
|
||||
updateConditionDescription(condition) {
|
||||
const found = this.conditionSetDomainObject.configuration.conditionCollection.find(conditionConfiguration => (conditionConfiguration.id === condition.id));
|
||||
found.summary = condition.description;
|
||||
this.persistConditions();
|
||||
if (found.summary !== condition.description) {
|
||||
found.summary = condition.description;
|
||||
this.persistConditions();
|
||||
}
|
||||
}
|
||||
|
||||
initCondition(conditionConfiguration, index) {
|
||||
@@ -414,8 +416,10 @@ export default class ConditionManager extends EventEmitter {
|
||||
}
|
||||
|
||||
updateTestData(testData) {
|
||||
this.testData = testData;
|
||||
this.openmct.objects.mutate(this.conditionSetDomainObject, 'configuration.conditionTestData', this.testData.conditionTestInputs);
|
||||
if (!_.isEqual(testData, this.testData)) {
|
||||
this.testData = testData;
|
||||
this.openmct.objects.mutate(this.conditionSetDomainObject, 'configuration.conditionTestData', this.testData.conditionTestInputs);
|
||||
}
|
||||
}
|
||||
|
||||
persistConditions() {
|
||||
|
||||
@@ -427,9 +427,12 @@ export default {
|
||||
this.skipReloadOnInteraction = false;
|
||||
this.loadMoreData(newRange, true);
|
||||
} else {
|
||||
// If we're not panning or zooming (time conductor and plot x-axis times are not out of sync)
|
||||
// Drop any data that is more than 1x (max-min) before min.
|
||||
// Limit these purges to once a second.
|
||||
if (!this.nextPurge || this.nextPurge < Date.now()) {
|
||||
const isPanningOrZooming = this.isTimeOutOfSync;
|
||||
const purgeRecords = !isPanningOrZooming && (!this.nextPurge || (this.nextPurge < Date.now()));
|
||||
if (purgeRecords) {
|
||||
const keepRange = {
|
||||
min: newRange.min - (newRange.max - newRange.min),
|
||||
max: newRange.max
|
||||
|
||||
@@ -65,8 +65,7 @@ define([
|
||||
'./interceptors/plugin',
|
||||
'./performanceIndicator/plugin',
|
||||
'./CouchDBSearchFolder/plugin',
|
||||
'./timeline/plugin',
|
||||
'./codeWalkthrough/plugin'
|
||||
'./timeline/plugin'
|
||||
], function (
|
||||
_,
|
||||
UTCTimeSystem,
|
||||
@@ -112,8 +111,7 @@ define([
|
||||
ObjectInterceptors,
|
||||
PerformanceIndicator,
|
||||
CouchDBSearchFolder,
|
||||
Timeline,
|
||||
codeWalkthroughPlugin
|
||||
Timeline
|
||||
) {
|
||||
const bundleMap = {
|
||||
LocalStorage: 'platform/persistence/local',
|
||||
@@ -214,7 +212,6 @@ define([
|
||||
plugins.PerformanceIndicator = PerformanceIndicator.default;
|
||||
plugins.CouchDBSearchFolder = CouchDBSearchFolder.default;
|
||||
plugins.Timeline = Timeline.default;
|
||||
plugins.CodeWalkthrough = codeWalkthroughPlugin.default;
|
||||
|
||||
return plugins;
|
||||
});
|
||||
|
||||
@@ -103,10 +103,16 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (this.actionCollection) {
|
||||
this.actionCollection.hide(HIDDEN_ACTIONS);
|
||||
this.actionCollection.on('update', this.updateActionItems);
|
||||
this.updateActionItems(this.actionCollection.getActionsObject());
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
if (this.actionCollection) {
|
||||
this.actionCollection.off('update', this.updateActionItems);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setView(view) {
|
||||
this.$emit('setView', view);
|
||||
@@ -116,7 +122,6 @@ export default {
|
||||
delete this.actionCollection;
|
||||
},
|
||||
updateActionItems() {
|
||||
this.actionCollection.hide(HIDDEN_ACTIONS);
|
||||
this.statusBarItems = this.actionCollection.getStatusBarActions();
|
||||
this.menuActionItems = this.actionCollection.getVisibleActions();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user