diff --git a/example/exampleUser/ExampleUserProvider.js b/example/exampleUser/ExampleUserProvider.js index dc49467b1e..bf25d7aaed 100644 --- a/example/exampleUser/ExampleUserProvider.js +++ b/example/exampleUser/ExampleUserProvider.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/example/exampleUser/exampleUserCreator.js b/example/exampleUser/exampleUserCreator.js index 286cc611b5..8ffc88e3ff 100644 --- a/example/exampleUser/exampleUserCreator.js +++ b/example/exampleUser/exampleUserCreator.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/example/exampleUser/plugin.js b/example/exampleUser/plugin.js index ba9ee38040..f7094131e6 100644 --- a/example/exampleUser/plugin.js +++ b/example/exampleUser/plugin.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/example/exampleUser/pluginSpec.js b/example/exampleUser/pluginSpec.js index f62d157359..88e2a9ba16 100644 --- a/example/exampleUser/pluginSpec.js +++ b/example/exampleUser/pluginSpec.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/api/user/User.js b/src/api/user/User.js index dfb0caa0cf..f4400df2f0 100644 --- a/src/api/user/User.js +++ b/src/api/user/User.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/api/user/UserAPI.js b/src/api/user/UserAPI.js index 82ff21f8d7..1948021734 100644 --- a/src/api/user/UserAPI.js +++ b/src/api/user/UserAPI.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/api/user/UserAPISpec.js b/src/api/user/UserAPISpec.js index c70066e3f4..ebc06d8b8f 100644 --- a/src/api/user/UserAPISpec.js +++ b/src/api/user/UserAPISpec.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/api/user/constants.js b/src/api/user/constants.js index 0f839385cb..6822ce3258 100644 --- a/src/api/user/constants.js +++ b/src/api/user/constants.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/plugins/flexibleLayout/components/frame.vue b/src/plugins/flexibleLayout/components/frame.vue index 8f2c5b5898..70e6802a63 100644 --- a/src/plugins/flexibleLayout/components/frame.vue +++ b/src/plugins/flexibleLayout/components/frame.vue @@ -97,7 +97,14 @@ export default { }, mounted() { if (this.frame.domainObjectIdentifier) { - this.openmct.objects.get(this.frame.domainObjectIdentifier).then((object) => { + let domainObjectPromise; + if (this.openmct.objects.supportsMutation(this.frame.domainObjectIdentifier)) { + domainObjectPromise = this.openmct.objects.getMutable(this.frame.domainObjectIdentifier); + } else { + domainObjectPromise = this.openmct.objects.get(this.frame.domainObjectIdentifier); + } + + domainObjectPromise.then((object) => { this.setDomainObject(object); }); } @@ -105,6 +112,10 @@ export default { this.dragGhost = document.getElementById('js-fl-drag-ghost'); }, beforeDestroy() { + if (this.domainObject.isMutable) { + this.openmct.objects.destroyMutable(this.domainObject); + } + if (this.unsubscribeSelection) { this.unsubscribeSelection(); } diff --git a/src/plugins/notebook/components/Notebook.vue b/src/plugins/notebook/components/Notebook.vue index e1c792b0f1..ae2b2f9b49 100644 --- a/src/plugins/notebook/components/Notebook.vue +++ b/src/plugins/notebook/components/Notebook.vue @@ -632,7 +632,8 @@ export default { updateDefaultNotebook(updatedNotebookStorageObject) { if (!this.isDefaultNotebook()) { const persistedNotebookStorageObject = getDefaultNotebook(); - if (persistedNotebookStorageObject.identifier !== undefined) { + if (persistedNotebookStorageObject + && persistedNotebookStorageObject.identifier !== undefined) { this.removeDefaultClass(persistedNotebookStorageObject.identifier); } diff --git a/src/plugins/persistence/couch/CouchSearchProvider.js b/src/plugins/persistence/couch/CouchSearchProvider.js index 7ef264d5e8..3ab268d54d 100644 --- a/src/plugins/persistence/couch/CouchSearchProvider.js +++ b/src/plugins/persistence/couch/CouchSearchProvider.js @@ -1,5 +1,5 @@ /***************************************************************************** - * Open MCT, Copyright (c) 2014-2021, United States Government + * Open MCT, Copyright (c) 2014-2022, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * diff --git a/src/plugins/plot/chart/MctChart.vue b/src/plugins/plot/chart/MctChart.vue index 425def20a6..34170e5700 100644 --- a/src/plugins/plot/chart/MctChart.vue +++ b/src/plugins/plot/chart/MctChart.vue @@ -278,7 +278,7 @@ export default { // Have to throw away the old canvas elements and replace with new // canvas elements in order to get new drawing contexts. const div = document.createElement('div'); - div.innerHTML = this.TEMPLATE; + div.innerHTML = this.canvasTemplate + this.canvasTemplate; const mainCanvas = div.querySelectorAll("canvas")[1]; const overlayCanvas = div.querySelectorAll("canvas")[0]; this.canvas.parentNode.replaceChild(mainCanvas, this.canvas); diff --git a/src/plugins/timeConductor/ConductorInputsFixed.vue b/src/plugins/timeConductor/ConductorInputsFixed.vue index e98ded7b3c..a14a3ef964 100644 --- a/src/plugins/timeConductor/ConductorInputsFixed.vue +++ b/src/plugins/timeConductor/ConductorInputsFixed.vue @@ -95,6 +95,11 @@ export default { isUTCBased: timeSystem.isUTCBased }; }, + watch: { + keyString() { + this.setTimeContext(); + } + }, mounted() { this.handleNewBounds = _.throttle(this.handleNewBounds, 300); this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem()))); diff --git a/src/plugins/timeConductor/ConductorInputsRealtime.vue b/src/plugins/timeConductor/ConductorInputsRealtime.vue index 58ec8d443b..3f6924a470 100644 --- a/src/plugins/timeConductor/ConductorInputsRealtime.vue +++ b/src/plugins/timeConductor/ConductorInputsRealtime.vue @@ -115,6 +115,11 @@ export default { isUTCBased: timeSystem.isUTCBased }; }, + watch: { + keyString() { + this.setTimeContext(); + } + }, mounted() { this.handleNewBounds = _.throttle(this.handleNewBounds, 300); this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem()))); diff --git a/src/plugins/timeConductor/independent/IndependentTimeConductor.vue b/src/plugins/timeConductor/independent/IndependentTimeConductor.vue index 27ac113f52..8694238bc1 100644 --- a/src/plugins/timeConductor/independent/IndependentTimeConductor.vue +++ b/src/plugins/timeConductor/independent/IndependentTimeConductor.vue @@ -105,42 +105,49 @@ export default { watch: { domainObject: { handler(domainObject) { - this.independentTCEnabled = domainObject.configuration.useIndependentTime === true; - - if (!domainObject.configuration.timeOptions || !this.independentTCEnabled) { + const key = this.openmct.objects.makeKeyString(domainObject.identifier); + if (key !== this.keyString) { + //domain object has changed this.destroyIndependentTime(); - return; - } + this.independentTCEnabled = domainObject.configuration.useIndependentTime === true; + this.timeOptions = domainObject.configuration.timeOptions || { + clockOffsets: this.openmct.time.clockOffsets(), + fixedOffsets: this.openmct.time.bounds() + }; - if (this.timeOptions.start !== domainObject.configuration.timeOptions.start - || this.timeOptions.end !== domainObject.configuration.timeOptions.end) { - this.timeOptions = domainObject.configuration.timeOptions; - this.destroyIndependentTime(); - this.registerIndependentTimeOffsets(); + this.initialize(); } }, deep: true } }, mounted() { - this.setTimeContext(); - - if (this.timeOptions.mode) { - this.mode = this.timeOptions.mode; - } else { - this.timeOptions.mode = this.mode = this.timeContext.clock() === undefined ? { key: 'fixed' } : { key: Object.create(this.timeContext.clock()).key}; - } - - if (this.independentTCEnabled) { - this.registerIndependentTimeOffsets(); - } + this.initialize(); }, beforeDestroy() { this.stopFollowingTimeContext(); this.destroyIndependentTime(); }, methods: { + initialize() { + this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier); + this.setTimeContext(); + + if (this.timeOptions.mode) { + this.mode = this.timeOptions.mode; + } else { + if (this.timeContext.clock() === undefined) { + this.timeOptions.mode = this.mode = { key: 'fixed' }; + } else { + this.timeOptions.mode = this.mode = { key: Object.create(this.timeContext.clock()).key}; + } + } + + if (this.independentTCEnabled) { + this.registerIndependentTimeOffsets(); + } + }, toggleIndependentTC() { this.independentTCEnabled = !this.independentTCEnabled; if (this.independentTCEnabled) { @@ -213,10 +220,9 @@ export default { offsets = this.timeOptions.clockOffsets; } - const key = this.openmct.objects.makeKeyString(this.domainObject.identifier); - const timeContext = this.openmct.time.getIndependentContext(key); + const timeContext = this.openmct.time.getIndependentContext(this.keyString); if (!timeContext.hasOwnContext()) { - this.unregisterIndependentTime = this.openmct.time.addIndependentContext(key, offsets, this.isFixed ? undefined : this.mode.key); + this.unregisterIndependentTime = this.openmct.time.addIndependentContext(this.keyString, offsets, this.isFixed ? undefined : this.mode.key); } else { if (this.isFixed) { timeContext.stopClock(); diff --git a/src/plugins/userIndicator/components/UserIndicator.vue b/src/plugins/userIndicator/components/UserIndicator.vue index c063a88b14..6c6671a942 100644 --- a/src/plugins/userIndicator/components/UserIndicator.vue +++ b/src/plugins/userIndicator/components/UserIndicator.vue @@ -1,5 +1,5 @@