From 8cd6a4c6a38eb52b5dd887ddf375ec038ebbf051 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Wed, 28 Oct 2020 16:46:54 -0700 Subject: [PATCH] [Notebook] Link to snapshot should not be a fully qualified url #3445 (#3460) Co-authored-by: Andrew Henry --- src/plugins/notebook/components/NotebookEmbed.vue | 3 ++- src/plugins/notebook/components/NotebookMenuSwitcher.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/notebook/components/NotebookEmbed.vue b/src/plugins/notebook/components/NotebookEmbed.vue index fb8388efba..9a61fc6700 100644 --- a/src/plugins/notebook/components/NotebookEmbed.vue +++ b/src/plugins/notebook/components/NotebookEmbed.vue @@ -143,7 +143,8 @@ export default { this.openmct.notifications.alert(message); } - window.location.href = link; + const url = new URL(link); + window.location.href = url.hash; }, formatTime(unixTime, timeFormat) { return Moment.utc(unixTime).format(timeFormat); diff --git a/src/plugins/notebook/components/NotebookMenuSwitcher.vue b/src/plugins/notebook/components/NotebookMenuSwitcher.vue index 1091b1fdfd..a027fb48d1 100644 --- a/src/plugins/notebook/components/NotebookMenuSwitcher.vue +++ b/src/plugins/notebook/components/NotebookMenuSwitcher.vue @@ -111,7 +111,7 @@ export default { const bounds = this.openmct.time.bounds(); const link = !this.ignoreLink - ? window.location.href + ? window.location.hash : null; const objectPath = this.objectPath || this.openmct.router.path;