From ed1ea6373f2953091fd9ba77d89c579bacbe878c Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Wed, 13 May 2020 17:44:20 -0700 Subject: [PATCH] Remove custom VueRouter.resolve replace and push both work as intended. You can specify a a full url if you don't want to have the baseUrl prepended. Better yet, if you're navigating within the app it's better to specify a location. The custom resolve was actually breakinging a huge amount of links in the app which was caused 404s if a user attempted to open a link in a new tab. Most things appeared to work presumably because vue-router was handling the page switches instead of the browser. rancher/dashboard#643 --- components/formatter/IngressTarget.vue | 2 +- components/formatter/LinkDetail.vue | 6 +- components/formatter/LinkDetailImage.vue | 2 +- components/formatter/SecretType.vue | 2 +- models/app.js | 13 ++-- models/apps/rancher-gatekeeper-operator.js | 30 +++++---- models/rio.cattle.io.service.js | 12 ++-- plugins/extend-router.js | 14 ----- plugins/steve/resource-instance.js | 72 ++++++++++------------ 9 files changed, 72 insertions(+), 81 deletions(-) diff --git a/components/formatter/IngressTarget.vue b/components/formatter/IngressTarget.vue index 963f9a12d0..9d3495b603 100644 --- a/components/formatter/IngressTarget.vue +++ b/components/formatter/IngressTarget.vue @@ -84,7 +84,7 @@ export default { const id = `${ this.namespace }/${ serviceName }`; return isTargetsWorkload - ? this.findWorkload(id)?.detailUrl || '' + ? this.findWorkload(id)?.detailLocation || '' : { resource: SERVICE, id: serviceName, diff --git a/components/formatter/LinkDetail.vue b/components/formatter/LinkDetail.vue index 5c4329c100..c26d8b573e 100644 --- a/components/formatter/LinkDetail.vue +++ b/components/formatter/LinkDetail.vue @@ -27,7 +27,7 @@ export default { return get(this.row, this.opts.reference); } - return this.row?.detailUrl; + return this.row?.detailLocation; }, } }; @@ -35,8 +35,8 @@ export default { diff --git a/components/formatter/LinkDetailImage.vue b/components/formatter/LinkDetailImage.vue index 891f5b5187..1c0eb0e909 100644 --- a/components/formatter/LinkDetailImage.vue +++ b/components/formatter/LinkDetailImage.vue @@ -20,7 +20,7 @@ export default {