diff --git a/src/router/dashboard.ts b/src/router/dashboard.ts index c1924a21..0bb9e519 100644 --- a/src/router/dashboard.ts +++ b/src/router/dashboard.ts @@ -48,9 +48,29 @@ export const routesDashboard: Array = [ }, }, { - path: "/dashboard/edit/:layerId/:entity/:dashboardId", + path: "/dashboard/:layerId/:entity/:name", component: () => import("@/views/dashboard/Edit.vue"), - name: "Edit", + name: "Create", + meta: { + title: "dashboardEdit", + exact: false, + notShow: true, + }, + }, + { + path: "/dashboard/:layerId/:entity/:serviceId/:name", + component: () => import("@/views/dashboard/Edit.vue"), + name: "CreateService", + meta: { + title: "dashboardEdit", + exact: false, + notShow: true, + }, + }, + { + path: "/dashboard/:layerId/:entity/:serviceId/:podId/:name", + component: () => import("@/views/dashboard/Edit.vue"), + name: "ViewPod", meta: { title: "dashboardEdit", exact: false, diff --git a/src/views/dashboard/New.vue b/src/views/dashboard/New.vue index 419ed188..6147dc4d 100644 --- a/src/views/dashboard/New.vue +++ b/src/views/dashboard/New.vue @@ -58,7 +58,6 @@ import { useI18n } from "vue-i18n"; import router from "@/router"; import { useSelectorStore } from "@/store/modules/selectors"; import { EntityType } from "./data"; -import uuid from "@/utils/uuid"; import { ElMessage } from "element-plus"; const { t } = useI18n(); @@ -70,8 +69,8 @@ const states = reactive({ layers: [], }); const onCreate = () => { - const id = uuid(); - const path = `/dashboard/edit/${states.selectedLayer}/${states.entity}/${id}`; + const name = states.name.split(" ").join("-"); + const path = `/dashboard/${states.selectedLayer}/${states.entity}/${name}`; router.push(path); }; onBeforeMount(async () => { diff --git a/src/views/dashboard/configuration/ConfigEdit.vue b/src/views/dashboard/configuration/ConfigEdit.vue index 727a6aec..db821c0c 100644 --- a/src/views/dashboard/configuration/ConfigEdit.vue +++ b/src/views/dashboard/configuration/ConfigEdit.vue @@ -50,11 +50,7 @@ limitations under the License. --> - +
{ } }); function linkInstance(row: any) { - const path = `/dashboard/view/${row.layer}/serviceInstance/${selectorStore.currentService}/${row.value}`; + const path = `/dashboard/${row.layer}/serviceInstance/${selectorStore.currentService}/${row.value}/test`; router.push(path); } diff --git a/src/views/dashboard/graphs/ServiceList.vue b/src/views/dashboard/graphs/ServiceList.vue new file mode 100644 index 00000000..d07dfd09 --- /dev/null +++ b/src/views/dashboard/graphs/ServiceList.vue @@ -0,0 +1,65 @@ + + + + diff --git a/src/views/dashboard/graphs/index.ts b/src/views/dashboard/graphs/index.ts index d84aae03..dedb6454 100644 --- a/src/views/dashboard/graphs/index.ts +++ b/src/views/dashboard/graphs/index.ts @@ -25,6 +25,7 @@ import Pie from "./Pie.vue"; import Card from "./Card.vue"; import InstanceList from "./InstanceList.vue"; import EndpointList from "./EndpointList.vue"; +import ServiceList from "./ServiceList.vue"; export default { Line, @@ -37,4 +38,5 @@ export default { Card, EndpointList, InstanceList, + ServiceList, };