Skip to content

Commit

Permalink
新增功能:集群列表到集群页面改成_blank新标签页打开,页面title改成集群名称方便用户切换 (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
awol2005ex authored Sep 23, 2024
1 parent 08a5393 commit dc0b8a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions web/dashboard/src/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ router.beforeEach(async (to, from, next) => {
// }
next({path: to.path, query: q})
NProgress.done()
document.title = q["cluster"] || "KubePi"
} else {
window.open("/kubepi", '_self');
}
} else {
await store.dispatch("user/setCurrentCluster", to.query["cluster"])
document.title = to.query["cluster"] || "KubePi"
}
await generateRoutes(to, from, next)
} else {
Expand Down
2 changes: 1 addition & 1 deletion web/kubepi/src/business/cluster-management/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export default {
if (row.accessable) {
sessionStorage.removeItem("namespace")
const url = `${process.env.VUE_APP_DASHBOARD_URL_PREFIX}/dashboard?cluster=${row.name}`
window.open(url, "_self")
window.open(url, "_blank")
} else {
this.$message.error(this.$t('business.cluster.user_not_in_cluster'))
}
Expand Down

0 comments on commit dc0b8a8

Please sign in to comment.