Compare commits

..

10 Commits

Author SHA1 Message Date
Joshi
2ec0e3c99b Refactor conditions 2021-07-07 15:03:17 -07:00
Joshi
f0a3d207f2 In local clock mode, if we're panning or zooming, don't purge older records 2021-07-07 12:56:23 -07:00
Shefali Joshi
de13f67ae5 Don't save condition set description and testData unless there is a change (#3991) 2021-07-02 06:47:13 -07:00
Nikhil
0256cc4830 actionCollection update event looping when open View Large in Display layout #64 #3959 (#3989) 2021-07-01 11:34:26 -07:00
Shefali Joshi
8422add614 Merge branch 'master' into 1.7.4 2021-06-29 09:10:37 -07:00
Joshi
2114697d6f Revert private repo in package.json 2021-06-28 15:37:20 -07:00
Joshi
412eaf599e Update version 2021-06-28 09:18:56 -07:00
Shefali Joshi
0691a35dab Disallow pause and play in time strip view for plots. (#3972)
- Disallow pause and play in time strip view for plots.
2021-06-24 15:43:47 -07:00
Andrew Henry
f57191fd89 Fix navigation errors (#3970)
* Only add listeners to observables on creation
* Do not double destroy mutable objects
2021-06-24 10:26:11 -07:00
Jamie V
14066b5c4d catching any errors from a user canceling from dialog (#3968) 2021-06-23 14:37:30 -07:00
7 changed files with 22 additions and 77 deletions

View File

@@ -194,7 +194,6 @@
['table', 'telemetry.plot.overlay', 'telemetry.plot.stacked'],
{indicator: true}
));
//openmct.install(openmct.plugins.CodeWalkthrough);
openmct.start();
</script>
</html>

View File

@@ -30,7 +30,7 @@ export default function plugin() {
openmct.objectViews.addProvider(new LADTableSetViewProvider(openmct));
openmct.types.addType('LadTable', {
name: "Latest Data Table",
name: "LAD Table",
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',

View File

@@ -1,63 +0,0 @@
export default function install(openmct) {
openmct.objectViews.addProvider({
name: "Data Table",
key: "data-table",
cssClass: "icon-packet",
description: "Tabular view of telemetry",
canView(domainObject) {
return true;
},
view(domainObject) {
return {
async show(element) {
let telemetryMetadata = openmct.telemetry.getMetadata(domainObject).values();
let table = document.createElement('table');
let tableHead = document.createElement('thead');
let tableBody = document.createElement('tbody');
let tableHeadRow = document.createElement('tr');
tableHead.appendChild(tableHeadRow);
table.appendChild(tableHead);
table.appendChild(tableBody);
element.appendChild(table);
telemetryMetadata.forEach(metadatum => {
let tableHeadCell = document.createElement('td');
tableHeadRow.appendChild(tableHeadCell);
tableHeadCell.innerText = metadatum.name;
});
async function requestTelemetry() {
let telemetry = await openmct.telemetry.request(domainObject);
telemetry.forEach((datum) => {
let dataRow = document.createElement('tr');
telemetryMetadata.forEach(metadatum => {
let dataCell = document.createElement('td');
let formatter = openmct.telemetry.getValueFormatter(metadatum);
let telemetryValue = formatter.format(datum[metadatum.key]);
dataCell.innerText = telemetryValue;
dataRow.appendChild(dataCell);
});
tableBody.appendChild(dataRow);
});
}
openmct.time.on('bounds', () => {
tableBody.innerHTML = '';
requestTelemetry();
});
requestTelemetry();
// openmct.telemetry.subscribe(domainObject, (datum) => {
// element.innerText = JSON.stringify(datum);
// });
},
destroy() {
}
};
}
});
}

View File

@@ -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() {

View File

@@ -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

View File

@@ -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,
CodeWalkthrough
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 = CodeWalkthrough.default;
return plugins;
});

View File

@@ -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();
},