mirror of
https://github.com/1Panel-dev/KubePi.git
synced 2026-04-22 16:27:10 +08:00
新增功能:集群列表到集群页面改成_blank新标签页打开,页面title改成集群名称方便用户切换 (#279)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user