From 64c5725687eec662ef02dab8b08989b77cc740a9 Mon Sep 17 00:00:00 2001 From: Deep Tailor Date: Tue, 31 Mar 2020 20:59:20 -0700 Subject: [PATCH] pass correct object path, and remove notebook snapshot button from preview --- .../notebook/components/notebook-embed.vue | 20 +++++++++---------- .../notebook/utils/notebook-entries.js | 3 ++- src/ui/preview/Preview.vue | 16 --------------- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/src/plugins/notebook/components/notebook-embed.vue b/src/plugins/notebook/components/notebook-embed.vue index 4c02ca9fc3..c34eba7407 100644 --- a/src/plugins/notebook/components/notebook-embed.vue +++ b/src/plugins/notebook/components/notebook-embed.vue @@ -217,18 +217,16 @@ export default { populateActionMenu() { const self = this; const actions = [new PreviewAction(self.openmct)]; - self.openmct.objects.get(self.embed.type) - .then((domainObject) => { - actions.forEach((action) => { - self.actions.push({ - cssClass: action.cssClass, - name: action.name, - perform: () => { - action.invoke([domainObject].concat(self.openmct.router.path)); - } - }); - }); + + actions.forEach((action) => { + self.actions.push({ + cssClass: action.cssClass, + name: action.name, + perform: () => { + action.invoke(self.embed.objectPath); + } }); + }); }, removeEmbed(id) { this.$emit('removeEmbed', id); diff --git a/src/plugins/notebook/utils/notebook-entries.js b/src/plugins/notebook/utils/notebook-entries.js index ed8ca7f906..9acebfbb47 100644 --- a/src/plugins/notebook/utils/notebook-entries.js +++ b/src/plugins/notebook/utils/notebook-entries.js @@ -95,7 +95,8 @@ export const createNewEmbed = (snapshotMeta, snapshot = '') => { id: 'embed-' + date, name, snapshot, - type + type, + objectPath }; } diff --git a/src/ui/preview/Preview.vue b/src/ui/preview/Preview.vue index 9ad0dab327..03af33675b 100644 --- a/src/ui/preview/Preview.vue +++ b/src/ui/preview/Preview.vue @@ -40,12 +40,6 @@ :current-view="currentView" @setView="setView" /> - @@ -57,7 +51,6 @@