diff --git a/src/router/dashboard.ts b/src/router/dashboard.ts index 520fc710..a98134fa 100644 --- a/src/router/dashboard.ts +++ b/src/router/dashboard.ts @@ -48,29 +48,9 @@ export const routesDashboard: Array = [ }, }, { - path: "/dashboard/edit/service/:serviceId", + path: "/dashboard/edit/:layerId/:entityId/:dashboardId", 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", + name: "Edit", meta: { title: "dashboardEdit", exact: false, diff --git a/src/views/dashboard/New.vue b/src/views/dashboard/New.vue index 342d25c7..0d441ddf 100644 --- a/src/views/dashboard/New.vue +++ b/src/views/dashboard/New.vue @@ -57,86 +57,6 @@ limitations under the License. --> -
-
{{ t("service") }}
- - - - -
-
-
{{ t("service") }} / {{ t("endpoint") }}
- -
-
-
{{ t("service") }} / {{ t("instance") }}
- -
-
-
{{ t("destService") }}
- - - - -
-
- {{ t("destService") }} / {{ t("destServiceInstance") }} - -
-
- - {{ t("destService") }} / {{ t("destEndpoint") }} - - -
{{ t("create") }} @@ -148,15 +68,9 @@ limitations under the License. --> import { reactive } from "vue"; import { useI18n } from "vue-i18n"; import router from "@/router"; -import { - ElSelect, - ElOption, - ElCascader, - ElInput, - ElButton, -} from "element-plus"; +import { ElSelect, ElOption, ElInput, ElButton } from "element-plus"; import { useSelectorStore } from "@/store/modules/selectors"; -import { EntityType, SelectOpt, Options } from "./data"; +import { EntityType, Options } from "./data"; const { t } = useI18n(); const selectorStore = useSelectorStore(); @@ -167,29 +81,10 @@ const state = reactive({ name: "", layer: "", entity: EntityType[0].value, - service: "", - serviceEndpoint: "", - serviceInstance: "", - destService: "", - destServiceEndpoint: "", - destServiceInstance: "", }); -const handleChange = (value: any) => { - console.log(value); -}; const onCreate = () => { - let path = `/dashboard/edit/${state.entity}/`; - switch (state.entity) { - case EntityType[0].value: - path += state.service || 1; - break; - case EntityType[2].value: - path += `${state.service}/${state.serviceEndpoint}`; - break; - case EntityType[3].value: - path += `${state.service}/${state.serviceInstance}`; - break; - } + const id = "1"; + const path = `/dashboard/edit/${state.layer}/${state.entity}/${id}`; router.push(path); }; selectorStore.fetchServices("general");