Skip to content

Commit dc0b8a8

Browse files
authored
新增功能:集群列表到集群页面改成_blank新标签页打开,页面title改成集群名称方便用户切换 (#279)
1 parent 08a5393 commit dc0b8a8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

web/dashboard/src/permission.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ router.beforeEach(async (to, from, next) => {
6666
// }
6767
next({path: to.path, query: q})
6868
NProgress.done()
69+
document.title = q["cluster"] || "KubePi"
6970
} else {
7071
window.open("/kubepi", '_self');
7172
}
7273
} else {
7374
await store.dispatch("user/setCurrentCluster", to.query["cluster"])
75+
document.title = to.query["cluster"] || "KubePi"
7476
}
7577
await generateRoutes(to, from, next)
7678
} else {

web/kubepi/src/business/cluster-management/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export default {
318318
if (row.accessable) {
319319
sessionStorage.removeItem("namespace")
320320
const url = `${process.env.VUE_APP_DASHBOARD_URL_PREFIX}/dashboard?cluster=${row.name}`
321-
window.open(url, "_self")
321+
window.open(url, "_blank")
322322
} else {
323323
this.$message.error(this.$t('business.cluster.user_not_in_cluster'))
324324
}

0 commit comments

Comments
 (0)