diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 13238cce..089d589d 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -44,6 +44,7 @@ const msg = { databasePanel: "Database Panel", meshServicePanel: "Service Panel", newDashboard: "New a dashboard", + dashboardEdit: "Edit the dashboard", hourTip: "Select Hour", minuteTip: "Select Minute", secondTip: "Select Second", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 3c829f83..d3a8eea7 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -44,6 +44,7 @@ const msg = { databasePanel: "数据库面板", meshServicePanel: "服务面板", newDashboard: "新增仪表盘", + dashboardEdit: "编辑仪表盘", hourTip: "选择小时", minuteTip: "选择分钟", secondTip: "选择秒数", diff --git a/src/router/dashboard.ts b/src/router/dashboard.ts index 90829095..520fc710 100644 --- a/src/router/dashboard.ts +++ b/src/router/dashboard.ts @@ -47,6 +47,36 @@ export const routesDashboard: Array = [ exact: false, }, }, + { + path: "/dashboard/edit/service/:serviceId", + component: () => import("@/views/dashboard/Edit.vue"), + name: "serviceEdit", + meta: { + title: "dashboardEdit", + exact: false, + notShow: true, + }, + }, + { + path: "/dashboard/edit/endpoint/:serviceId/:endpointId", + component: () => import("@/views/dashboard/Edit.vue"), + name: "endpointEdit", + meta: { + title: "dashboardEdit", + exact: false, + notShow: true, + }, + }, + { + path: "/dashboard/edit/instance/:serviceId/:instanceId", + component: () => import("@/views/dashboard/Edit.vue"), + name: "instanceEdit", + meta: { + title: "dashboardEdit", + exact: false, + notShow: true, + }, + }, ], }, ]; diff --git a/src/router/index.ts b/src/router/index.ts index 95a2080f..13b8ace9 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -46,7 +46,7 @@ const router = createRouter({ (window as any).axiosCancel = []; router.beforeEach((to, from, next) => { - const token = window.localStorage.getItem("skywalking-authority"); + // const token = window.localStorage.getItem("skywalking-authority"); if ((window as any).axiosCancel.length !== 0) { for (const func of (window as any).axiosCancel) { setTimeout(func(), 0); diff --git a/src/views/dashboard/Edit.vue b/src/views/dashboard/Edit.vue new file mode 100644 index 00000000..6ecc4bd9 --- /dev/null +++ b/src/views/dashboard/Edit.vue @@ -0,0 +1 @@ + diff --git a/src/views/dashboard/New.vue b/src/views/dashboard/New.vue index f104bb27..8181114a 100644 --- a/src/views/dashboard/New.vue +++ b/src/views/dashboard/New.vue @@ -57,7 +57,7 @@ limitations under the License. --> -
+
Service
-
+
Service / Endpoint
:style="{ width: '600px' }" >
-
+
Service / Instance
:style="{ width: '600px' }" >
-
+
Destination Service
-
+
Destination Service / Endpoint :style="{ width: '600px' }" >
-
+
Destination Service / Instance diff --git a/src/views/dashboard/data.ts b/src/views/dashboard/data.ts index d13455c3..dbe83cc9 100644 --- a/src/views/dashboard/data.ts +++ b/src/views/dashboard/data.ts @@ -15,13 +15,13 @@ * limitations under the License. */ export const EntityType = [ - { value: "Service", label: "Service" }, - { value: "All", label: "All" }, - { value: "Endpoint", label: "Service Endpoint" }, - { value: "ServiceInstance", label: "Service Instance" }, - { value: "ServiceRelation", label: "Service Relation" }, - { value: "ServiceInstanceRelation", label: "Service Instance Relation" }, - { value: "EndpointRelation", label: "Endpoint Relation" }, + { value: "service", label: "Service" }, + { value: "all", label: "All" }, + { value: "endpoint", label: "Service Endpoint" }, + { value: "serviceInstance", label: "Service Instance" }, + { value: "serviceRelation", label: "Service Relation" }, + { value: "serviceInstanceRelation", label: "Service Instance Relation" }, + { value: "endpointRelation", label: "Endpoint Relation" }, ]; export const SelectOpt = [ {