mirror of
https://github.com/nasa/openmct.git
synced 2025-06-25 10:44:21 +00:00
Compare commits
10 Commits
telemetry-
...
fix-plot-p
Author | SHA1 | Date | |
---|---|---|---|
2ec0e3c99b | |||
f0a3d207f2 | |||
de13f67ae5 | |||
0256cc4830 | |||
8422add614 | |||
2114697d6f | |||
412eaf599e | |||
0691a35dab | |||
f57191fd89 | |||
14066b5c4d |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "openmct",
|
"name": "openmct",
|
||||||
"version": "1.7.4-SNAPSHOT",
|
"version": "1.7.4",
|
||||||
"description": "The Open MCT core platform",
|
"description": "The Open MCT core platform",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -399,25 +399,25 @@ ObjectAPI.prototype._toMutable = function (object) {
|
|||||||
mutableObject = object;
|
mutableObject = object;
|
||||||
} else {
|
} else {
|
||||||
mutableObject = MutableDomainObject.createMutable(object, this.eventEmitter);
|
mutableObject = MutableDomainObject.createMutable(object, this.eventEmitter);
|
||||||
}
|
|
||||||
|
|
||||||
// Check if provider supports realtime updates
|
// Check if provider supports realtime updates
|
||||||
let identifier = utils.parseKeyString(mutableObject.identifier);
|
let identifier = utils.parseKeyString(mutableObject.identifier);
|
||||||
let provider = this.getProvider(identifier);
|
let provider = this.getProvider(identifier);
|
||||||
|
|
||||||
if (provider !== undefined
|
if (provider !== undefined
|
||||||
&& provider.observe !== undefined
|
&& provider.observe !== undefined
|
||||||
&& this.SYNCHRONIZED_OBJECT_TYPES.includes(object.type)) {
|
&& this.SYNCHRONIZED_OBJECT_TYPES.includes(object.type)) {
|
||||||
let unobserve = provider.observe(identifier, (updatedModel) => {
|
let unobserve = provider.observe(identifier, (updatedModel) => {
|
||||||
if (updatedModel.persisted > mutableObject.modified) {
|
if (updatedModel.persisted > mutableObject.modified) {
|
||||||
//Don't replace with a stale model. This can happen on slow connections when multiple mutations happen
|
//Don't replace with a stale model. This can happen on slow connections when multiple mutations happen
|
||||||
//in rapid succession and intermediate persistence states are returned by the observe function.
|
//in rapid succession and intermediate persistence states are returned by the observe function.
|
||||||
mutableObject.$refresh(updatedModel);
|
mutableObject.$refresh(updatedModel);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mutableObject.$on('$_destroy', () => {
|
mutableObject.$on('$_destroy', () => {
|
||||||
unobserve();
|
unobserve();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return mutableObject;
|
return mutableObject;
|
||||||
|
@ -41,7 +41,7 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
this.subscriptions = {};
|
this.subscriptions = {};
|
||||||
this.telemetryObjects = {};
|
this.telemetryObjects = {};
|
||||||
this.testData = {
|
this.testData = {
|
||||||
conditionTestData: [],
|
conditionTestInputs: this.conditionSetDomainObject.configuration.conditionTestData,
|
||||||
applied: false
|
applied: false
|
||||||
};
|
};
|
||||||
this.initialize();
|
this.initialize();
|
||||||
@ -154,8 +154,10 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
|
|
||||||
updateConditionDescription(condition) {
|
updateConditionDescription(condition) {
|
||||||
const found = this.conditionSetDomainObject.configuration.conditionCollection.find(conditionConfiguration => (conditionConfiguration.id === condition.id));
|
const found = this.conditionSetDomainObject.configuration.conditionCollection.find(conditionConfiguration => (conditionConfiguration.id === condition.id));
|
||||||
found.summary = condition.description;
|
if (found.summary !== condition.description) {
|
||||||
this.persistConditions();
|
found.summary = condition.description;
|
||||||
|
this.persistConditions();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initCondition(conditionConfiguration, index) {
|
initCondition(conditionConfiguration, index) {
|
||||||
@ -414,8 +416,10 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateTestData(testData) {
|
updateTestData(testData) {
|
||||||
this.testData = testData;
|
if (!_.isEqual(testData, this.testData)) {
|
||||||
this.openmct.objects.mutate(this.conditionSetDomainObject, 'configuration.conditionTestData', this.testData.conditionTestInputs);
|
this.testData = testData;
|
||||||
|
this.openmct.objects.mutate(this.conditionSetDomainObject, 'configuration.conditionTestData', this.testData.conditionTestInputs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
persistConditions() {
|
persistConditions() {
|
||||||
|
@ -37,7 +37,15 @@ export default class DuplicateAction {
|
|||||||
let duplicationTask = new DuplicateTask(this.openmct);
|
let duplicationTask = new DuplicateTask(this.openmct);
|
||||||
let originalObject = objectPath[0];
|
let originalObject = objectPath[0];
|
||||||
let parent = objectPath[1];
|
let parent = objectPath[1];
|
||||||
let userInput = await this.getUserInput(originalObject, parent);
|
let userInput;
|
||||||
|
|
||||||
|
try {
|
||||||
|
userInput = await this.getUserInput(originalObject, parent);
|
||||||
|
} catch (error) {
|
||||||
|
// user most likely canceled
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let newParent = userInput.location;
|
let newParent = userInput.location;
|
||||||
let inNavigationPath = this.inNavigationPath(originalObject);
|
let inNavigationPath = this.inNavigationPath(originalObject);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
>
|
>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isRealTime"
|
<div v-if="isRealTime && !options.compact"
|
||||||
class="c-button-set c-button-set--strip-h js-pause"
|
class="c-button-set c-button-set--strip-h js-pause"
|
||||||
>
|
>
|
||||||
<button v-if="!isFrozen"
|
<button v-if="!isFrozen"
|
||||||
@ -427,9 +427,12 @@ export default {
|
|||||||
this.skipReloadOnInteraction = false;
|
this.skipReloadOnInteraction = false;
|
||||||
this.loadMoreData(newRange, true);
|
this.loadMoreData(newRange, true);
|
||||||
} else {
|
} 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.
|
// Drop any data that is more than 1x (max-min) before min.
|
||||||
// Limit these purges to once a second.
|
// 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 = {
|
const keepRange = {
|
||||||
min: newRange.min - (newRange.max - newRange.min),
|
min: newRange.min - (newRange.max - newRange.min),
|
||||||
max: newRange.max
|
max: newRange.max
|
||||||
|
@ -103,10 +103,16 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.actionCollection) {
|
if (this.actionCollection) {
|
||||||
|
this.actionCollection.hide(HIDDEN_ACTIONS);
|
||||||
this.actionCollection.on('update', this.updateActionItems);
|
this.actionCollection.on('update', this.updateActionItems);
|
||||||
this.updateActionItems(this.actionCollection.getActionsObject());
|
this.updateActionItems(this.actionCollection.getActionsObject());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
destroyed() {
|
||||||
|
if (this.actionCollection) {
|
||||||
|
this.actionCollection.off('update', this.updateActionItems);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setView(view) {
|
setView(view) {
|
||||||
this.$emit('setView', view);
|
this.$emit('setView', view);
|
||||||
@ -116,7 +122,6 @@ export default {
|
|||||||
delete this.actionCollection;
|
delete this.actionCollection;
|
||||||
},
|
},
|
||||||
updateActionItems() {
|
updateActionItems() {
|
||||||
this.actionCollection.hide(HIDDEN_ACTIONS);
|
|
||||||
this.statusBarItems = this.actionCollection.getStatusBarActions();
|
this.statusBarItems = this.actionCollection.getStatusBarActions();
|
||||||
this.menuActionItems = this.actionCollection.getVisibleActions();
|
this.menuActionItems = this.actionCollection.getVisibleActions();
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,6 @@ define([
|
|||||||
let unobserve = undefined;
|
let unobserve = undefined;
|
||||||
let currentObjectPath;
|
let currentObjectPath;
|
||||||
let isRoutingInProgress = false;
|
let isRoutingInProgress = false;
|
||||||
let mutable;
|
|
||||||
|
|
||||||
openmct.router.route(/^\/browse\/?$/, navigateToFirstChildOfRoot);
|
openmct.router.route(/^\/browse\/?$/, navigateToFirstChildOfRoot);
|
||||||
openmct.router.route(/^\/browse\/(.*)$/, (path, results, params) => {
|
openmct.router.route(/^\/browse\/(.*)$/, (path, results, params) => {
|
||||||
@ -37,24 +36,10 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
function viewObject(object, viewProvider) {
|
function viewObject(object, viewProvider) {
|
||||||
if (mutable) {
|
|
||||||
openmct.objects.destroyMutable(mutable);
|
|
||||||
mutable = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (openmct.objects.supportsMutation(object.identifier)) {
|
|
||||||
mutable = openmct.objects._toMutable(object);
|
|
||||||
}
|
|
||||||
|
|
||||||
currentObjectPath = openmct.router.path;
|
currentObjectPath = openmct.router.path;
|
||||||
|
|
||||||
if (mutable !== undefined) {
|
openmct.layout.$refs.browseObject.show(object, viewProvider.key, true, currentObjectPath);
|
||||||
openmct.layout.$refs.browseObject.show(mutable, viewProvider.key, true, currentObjectPath);
|
openmct.layout.$refs.browseBar.domainObject = object;
|
||||||
openmct.layout.$refs.browseBar.domainObject = mutable;
|
|
||||||
} else {
|
|
||||||
openmct.layout.$refs.browseObject.show(object, viewProvider.key, true, currentObjectPath);
|
|
||||||
openmct.layout.$refs.browseBar.domainObject = object;
|
|
||||||
}
|
|
||||||
|
|
||||||
openmct.layout.$refs.browseBar.viewKey = viewProvider.key;
|
openmct.layout.$refs.browseBar.viewKey = viewProvider.key;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user