[Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078 (#3240)

* [Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078

* #3250 :  [Preview] Preview window should not have any context menu actions

* cleanup: removed redundant code
This commit is contained in:
Nikhil 2020-07-29 16:33:39 -07:00 committed by GitHub
parent e667b22b3c
commit 573a63d359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 22 deletions

View File

@ -248,7 +248,8 @@ export default {
previewEmbed() {
const self = this;
const previewAction = new PreviewAction(self.openmct);
previewAction.invoke(JSON.parse(self.embed.objectPath));
this.openmct.objects.get(self.embed.domainObject.identifier)
.then(domainObject => previewAction.invoke([domainObject]));
},
removeEmbed(success) {
if (!success) {

View File

@ -95,8 +95,7 @@ export const createNewEmbed = (snapshotMeta, snapshot = '') => {
id: 'embed-' + date,
name,
snapshot,
type,
objectPath: JSON.stringify(objectPath)
type
};
}

View File

@ -10,7 +10,6 @@
<span class="l-browse-bar__object-name c-object-label__name">
{{ domainObject.name }}
</span>
<context-menu-drop-down :object-path="objectPath" />
</div>
</div>
<div class="l-browse-bar__end">
@ -21,12 +20,6 @@
:current-view="currentView"
@setView="setView"
/>
<NotebookMenuSwitcher v-if="showNotebookMenuSwitcher"
:domain-object="domainObject"
:ignore-link="true"
:object-path="objectPath"
class="c-notebook-snapshot-menubutton"
/>
</div>
</div>
</div>
@ -34,18 +27,13 @@
<script>
import ContextMenuDropDown from '../../ui/components/contextMenuDropDown.vue';
import NotebookMenuSwitcher from '@/plugins/notebook/components/notebook-menu-switcher.vue';
import ViewSwitcher from '../../ui/layout/ViewSwitcher.vue';
export default {
inject: [
'openmct',
'objectPath'
'openmct'
],
components: {
ContextMenuDropDown,
NotebookMenuSwitcher,
ViewSwitcher
},
props: {
@ -67,12 +55,6 @@ export default {
return false;
}
},
showNotebookMenuSwitcher: {
type: Boolean,
default: () => {
return false;
}
},
views: {
type: Array,
default: () => {