refactor(router): 统一前端路由命名与层级
## 背景 前端路由存在层级不一致、英文缩写混用、name 与 sidebar 文本不匹配等问题。 ## 变更内容 - 统一使用全称命名(Mgmt → Management, Ops → Operation) - 统一带前缀路径(/cluster → /infrastructure/cluster) - 合并可观测性模块(/monitor、/alert → /observable/*) - 修正 router name 与侧边栏中文标题对应关系 ## 路由对照 - /tasks → /task/log (TaskLog) - /resource/mgmt → /resource/management (ResourceManagement) - /service/mgmt → /service/management (ServiceManagement) - /audit/ops → /audit/operation (OperationAudit) - /cluster → /infrastructure/cluster (InfrastructureCluster) - /tenants → /business/quota (BusinessQuota) - /monitor → /observable/monitoring (MonitoringDashboard) - /alert → /observable/alert (AlertInformation) - /subsystem/authz → /subsystem/authorization (SubsystemAuthorization)
This commit is contained in:
@@ -11,28 +11,28 @@
|
|||||||
<router-link to="/service/catalog" class="nav-item" active-class="active">
|
<router-link to="/service/catalog" class="nav-item" active-class="active">
|
||||||
<span class="ic">▤</span>基础服务
|
<span class="ic">▤</span>基础服务
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/tasks" class="nav-item" active-class="active">
|
<router-link to="/task/log" class="nav-item" active-class="active">
|
||||||
<span class="ic">▧</span>任务日志<span class="badge">2</span>
|
<span class="ic">▧</span>任务日志<span class="badge">2</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-group">
|
<div class="nav-group">
|
||||||
<div class="nav-label">资源纳管</div>
|
<div class="nav-label">资源纳管</div>
|
||||||
<router-link to="/resource/mgmt" class="nav-item" active-class="active">
|
<router-link to="/resource/management" class="nav-item" active-class="active">
|
||||||
<span class="ic">▥</span>资源管理<span class="badge">CMDB</span>
|
<span class="ic">▥</span>资源管理<span class="badge">CMDB</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/cluster" class="nav-item" active-class="active">
|
<router-link to="/infrastructure/cluster" class="nav-item" active-class="active">
|
||||||
<span class="ic">◆</span>集群与容器<span class="badge">3</span>
|
<span class="ic">◆</span>集群与容器<span class="badge">3</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/tenants" class="nav-item" active-class="active">
|
<router-link to="/business/quota" class="nav-item" active-class="active">
|
||||||
<span class="ic">▦</span>业务配额
|
<span class="ic">▦</span>业务配额
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-group">
|
<div class="nav-group">
|
||||||
<div class="nav-label">可观测性</div>
|
<div class="nav-label">可观测性</div>
|
||||||
<router-link to="/monitor" class="nav-item" active-class="active">
|
<router-link to="/observable/monitoring" class="nav-item" active-class="active">
|
||||||
<span class="ic">◎</span>监控看板
|
<span class="ic">◎</span>监控看板
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/alert" class="nav-item" active-class="active">
|
<router-link to="/observable/alert" class="nav-item" active-class="active">
|
||||||
<span class="ic">⚡</span>告警信息
|
<span class="ic">⚡</span>告警信息
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<span class="ic" style="font-size:12px;">▦</span>全部总览
|
<span class="ic" style="font-size:12px;">▦</span>全部总览
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<router-link to="/subsystem/authz" class="nav-item" active-class="active">
|
<router-link to="/subsystem/authorization" class="nav-item" active-class="active">
|
||||||
<span class="ic">▦</span>子系统赋权
|
<span class="ic">▦</span>子系统赋权
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<router-link to="/audit/login" class="nav-item" active-class="active">
|
<router-link to="/audit/login" class="nav-item" active-class="active">
|
||||||
<span class="ic">📋</span>登录审计
|
<span class="ic">📋</span>登录审计
|
||||||
</router-link>
|
</router-link>
|
||||||
<router-link to="/audit/ops" class="nav-item" active-class="active">
|
<router-link to="/audit/operation" class="nav-item" active-class="active">
|
||||||
<span class="ic">📝</span>运维操作审计
|
<span class="ic">📝</span>运维操作审计
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ const router = createRouter({
|
|||||||
meta: { title: '子系统详情' },
|
meta: { title: '子系统详情' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'subsystem/authz',
|
path: 'subsystem/authorization',
|
||||||
name: 'SubsystemAuthz',
|
name: 'SubsystemAuthorization',
|
||||||
component: () => import('@/views/subsystem/Authorization.vue'),
|
component: () => import('@/views/subsystem/Authorization.vue'),
|
||||||
meta: { title: '子系统赋权' },
|
meta: { title: '子系统赋权' },
|
||||||
},
|
},
|
||||||
@@ -53,8 +53,8 @@ const router = createRouter({
|
|||||||
meta: { title: '登录审计' },
|
meta: { title: '登录审计' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'audit/ops',
|
path: 'audit/operation',
|
||||||
name: 'OpsAudit',
|
name: 'OperationAudit',
|
||||||
component: () => import('@/views/audit/OpsAudit.vue'),
|
component: () => import('@/views/audit/OpsAudit.vue'),
|
||||||
meta: { title: '运维操作审计' },
|
meta: { title: '运维操作审计' },
|
||||||
},
|
},
|
||||||
@@ -65,20 +65,20 @@ const router = createRouter({
|
|||||||
meta: { title: '资源状态看板' },
|
meta: { title: '资源状态看板' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'resource/mgmt',
|
path: 'resource/management',
|
||||||
name: 'ResourceMgmt',
|
name: 'ResourceManagement',
|
||||||
component: () => import('@/views/resource/Management.vue'),
|
component: () => import('@/views/resource/Management.vue'),
|
||||||
meta: { title: '资源管理' },
|
meta: { title: '资源管理' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'cluster',
|
path: 'infrastructure/cluster',
|
||||||
name: 'Cluster',
|
name: 'InfrastructureCluster',
|
||||||
component: () => import('@/views/cluster/ClusterList.vue'),
|
component: () => import('@/views/cluster/ClusterList.vue'),
|
||||||
meta: { title: '集群与容器' },
|
meta: { title: '集群与容器' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tenants',
|
path: 'business/quota',
|
||||||
name: 'Tenants',
|
name: 'BusinessQuota',
|
||||||
component: () => import('@/views/resource/Tenants.vue'),
|
component: () => import('@/views/resource/Tenants.vue'),
|
||||||
meta: { title: '业务配额' },
|
meta: { title: '业务配额' },
|
||||||
},
|
},
|
||||||
@@ -86,19 +86,19 @@ const router = createRouter({
|
|||||||
path: 'service/catalog',
|
path: 'service/catalog',
|
||||||
name: 'ServiceCatalog',
|
name: 'ServiceCatalog',
|
||||||
component: () => import('@/views/service/Catalog.vue'),
|
component: () => import('@/views/service/Catalog.vue'),
|
||||||
meta: { title: '基础服务目录' },
|
meta: { title: '基础服务' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'service/mgmt',
|
path: 'service/management',
|
||||||
name: 'ServiceMgmt',
|
name: 'ServiceManagement',
|
||||||
component: () => import('@/views/service/Management.vue'),
|
component: () => import('@/views/service/Management.vue'),
|
||||||
meta: { title: '服务管理' },
|
meta: { title: '服务管理' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tasks',
|
path: 'task/log',
|
||||||
name: 'Tasks',
|
name: 'TaskLog',
|
||||||
component: () => import('@/views/task/TaskCenter.vue'),
|
component: () => import('@/views/task/TaskCenter.vue'),
|
||||||
meta: { title: '任务中心' },
|
meta: { title: '任务日志' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'config',
|
path: 'config',
|
||||||
@@ -107,14 +107,14 @@ const router = createRouter({
|
|||||||
meta: { title: '配置中心管理' },
|
meta: { title: '配置中心管理' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'monitor',
|
path: 'observable/monitoring',
|
||||||
name: 'Monitor',
|
name: 'MonitoringDashboard',
|
||||||
component: () => import('@/views/monitor/Monitor.vue'),
|
component: () => import('@/views/monitor/Monitor.vue'),
|
||||||
meta: { title: '监控看板' },
|
meta: { title: '监控看板' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'alert',
|
path: 'observable/alert',
|
||||||
name: 'Alert',
|
name: 'AlertInformation',
|
||||||
component: () => import('@/views/monitor/Alert.vue'),
|
component: () => import('@/views/monitor/Alert.vue'),
|
||||||
meta: { title: '告警信息' },
|
meta: { title: '告警信息' },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel-head">
|
<div class="panel-head">
|
||||||
<h3>最近任务</h3>
|
<h3>最近任务</h3>
|
||||||
<router-link to="/tasks" class="meta">查看全部 →</router-link>
|
<router-link to="/task/log" class="meta">查看全部 →</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ const openWayne = async () => {
|
|||||||
const handleMysqlSubmit = () => {
|
const handleMysqlSubmit = () => {
|
||||||
showMysqlModal.value = false
|
showMysqlModal.value = false
|
||||||
ElMessage.success('MySQL 标准化交付已提交,完成后自动注册 CloudDM')
|
ElMessage.success('MySQL 标准化交付已提交,完成后自动注册 CloudDM')
|
||||||
router.push({ name: 'Tasks' })
|
router.push({ name: 'TaskLog' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user