From 03a2b95b292e6efbf71b5cb496648680a8b3c8c1 Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 21 Sep 2022 21:28:46 -0400 Subject: [PATCH] Restore masthead redirect without window manager --- client/src/entry/analysis/App.vue | 8 +++++++- client/src/entry/analysis/router.js | 7 ++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/client/src/entry/analysis/App.vue b/client/src/entry/analysis/App.vue index bd74a25498a..4604a8881b3 100644 --- a/client/src/entry/analysis/App.vue +++ b/client/src/entry/analysis/App.vue @@ -45,6 +45,7 @@ import { getAppRoot } from "onload"; import { HistoryPanelProxy } from "components/History/adapters/HistoryPanelProxy"; import { fetchMenu } from "entry/analysis/menu"; import { WindowManager } from "layout/window-manager"; +import { safePath } from "utils/redirect"; export default { components: { @@ -97,7 +98,12 @@ export default { if (!urlObj.target) { this.$router.push(urlObj.url); } else { - this.windowManager.add(urlObj); + const url = safePath(urlObj.url); + if (urlObj.target == "_blank") { + window.open(url); + } else { + window.location = url; + } } }, }, diff --git a/client/src/entry/analysis/router.js b/client/src/entry/analysis/router.js index e9f6ee3602c..58b1850d109 100644 --- a/client/src/entry/analysis/router.js +++ b/client/src/entry/analysis/router.js @@ -73,11 +73,8 @@ VueRouter.prototype.push = function push(location, windowManagerTitle = null) { // show location in window manager const Galaxy = getGalaxyInstance(); if (windowManagerTitle && Galaxy.frame && Galaxy.frame.active) { - Galaxy.frame.add({ - title: "Data", - url: location, - }); - return true; + Galaxy.frame.add({ title: windowManagerTitle, url: location }); + return; } // always emit event when a route is pushed this.app.$emit("router-push");