mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 13:15:24 +00:00
add k8s
This commit is contained in:
parent
abcd41e5d1
commit
92f142d9e1
@ -27,17 +27,24 @@ export const routesInfra: Array<RouteRecordRaw> = [
|
||||
exact: true,
|
||||
hasGroup: true,
|
||||
},
|
||||
redirect: "/infrastructure",
|
||||
redirect: "/linux",
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: "/infrastructure",
|
||||
path: "/linux",
|
||||
name: "Linux",
|
||||
meta: {
|
||||
title: "linux",
|
||||
},
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
// component: () => import("@/views/infrastructure/Infrastructure.vue"),
|
||||
},
|
||||
{
|
||||
path: "/kubernetes",
|
||||
name: "Kubernetes",
|
||||
meta: {
|
||||
title: "kubernetes",
|
||||
},
|
||||
component: () => import("@/views/Layer.vue"),
|
||||
},
|
||||
// {
|
||||
// path: "/infrastructure/vm",
|
||||
|
@ -43,6 +43,7 @@ const routeNames = [
|
||||
"Satellite",
|
||||
"Functions",
|
||||
"Browser",
|
||||
"Kubernetes",
|
||||
];
|
||||
const layer = ref<string>("GENERAL");
|
||||
|
||||
@ -101,6 +102,9 @@ function setLayer(n: string) {
|
||||
case routeNames[9]:
|
||||
layer.value = "BROWSER";
|
||||
break;
|
||||
case routeNames[10]:
|
||||
layer.value = "K8S";
|
||||
break;
|
||||
default:
|
||||
layer.value = "GENERAL";
|
||||
break;
|
||||
|
@ -55,6 +55,9 @@ async function setTemplate() {
|
||||
await dashboardStore.setDashboards();
|
||||
|
||||
if (!p.entity) {
|
||||
if (!dashboardStore.currentDashboard) {
|
||||
return;
|
||||
}
|
||||
const { layer, entity, name } = dashboardStore.currentDashboard;
|
||||
layoutKey.value = `${layer}_${entity}_${name}`;
|
||||
}
|
||||
|
@ -119,7 +119,6 @@ import { ElMessage } from "element-plus";
|
||||
import { Option } from "@/types/app";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useThrottleFn } from "@vueuse/core";
|
||||
import getDashboard from "@/hooks/useDashboardsSession";
|
||||
|
||||
const { t } = useI18n();
|
||||
const dashboardStore = useDashboardStore();
|
||||
@ -274,15 +273,20 @@ async function getServices() {
|
||||
selectorStore.setCurrentDestService(
|
||||
selectorStore.services.length ? selectorStore.services[1] : null
|
||||
);
|
||||
if (!selectorStore.currentService) {
|
||||
return;
|
||||
}
|
||||
states.currentService = selectorStore.currentService.value;
|
||||
states.currentDestService =
|
||||
selectorStore.currentDestService && selectorStore.currentDestService.value;
|
||||
const e = dashboardStore.entity.split("Relation")[0];
|
||||
if (
|
||||
[EntityType[2].value, EntityType[3].value].includes(dashboardStore.entity)
|
||||
) {
|
||||
fetchPods(e, selectorStore.currentService.id, true);
|
||||
}
|
||||
if (!selectorStore.currentDestService) {
|
||||
return;
|
||||
}
|
||||
states.currentDestService = selectorStore.currentDestService.value;
|
||||
if (
|
||||
[EntityType[5].value, EntityType[6].value].includes(dashboardStore.entity)
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user