From 8404da29a3a0172b1b460c969be6fd9961ef0aa9 Mon Sep 17 00:00:00 2001 From: Qiuxia Fan Date: Sun, 20 Mar 2022 16:11:38 +0800 Subject: [PATCH] update graph --- src/locales/lang/en.ts | 1 + src/locales/lang/zh.ts | 1 + src/store/modules/dashboard.ts | 10 ++------ src/views/dashboard/List.vue | 14 ++--------- src/views/dashboard/controls/Topology.vue | 3 ++- .../related/topology/components/Graph.vue | 24 +++++++++++-------- .../related/topology/utils/legend.ts | 4 ++-- 7 files changed, 24 insertions(+), 33 deletions(-) diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 2c56f8b4..56a8dc20 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -112,6 +112,7 @@ const msg = { showGroup: "Show Group", noRoot: "Please set a root dashboard for", noWidget: "Please add widgets.", + rename: "Rename", hourTip: "Select Hour", minuteTip: "Select Minute", secondTip: "Select Second", diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index 36c4a195..3cec3c16 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -112,6 +112,7 @@ const msg = { noRoot: "请设置根仪表板,为", showGroup: "显示分组", noWidget: "请添加组件", + rename: "重命名", hourTip: "选择小时", minuteTip: "选择分钟", secondTip: "选择秒数", diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts index 64727a09..fba942a1 100644 --- a/src/store/modules/dashboard.ts +++ b/src/store/modules/dashboard.ts @@ -143,19 +143,13 @@ export const dashboardStore = defineStore({ metrics: [""], }; if (type === "Topology") { - newItem.w = 4; - newItem.h = 6; + newItem.h = 32; newItem.graph = { - fontColor: "white", - backgroundColor: "green", - iconTheme: true, - content: "Topology", - fontSize: 18, showDepth: true, }; } if (type === "Trace" || type === "Profile" || type === "Log") { - newItem.h = 24; + newItem.h = 32; } if (this.layout[idx].children) { const items = children.map((d: LayoutConfig) => { diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue index 02d4edcb..87608495 100644 --- a/src/views/dashboard/List.vue +++ b/src/views/dashboard/List.vue @@ -60,7 +60,7 @@ limitations under the License. --> {{ t("view") }} - {{ t("edit") }} + {{ t("rename") }} (false); const multipleTableRef = ref>(); const multipleSelection = ref([]); const dashboardFile = ref>(null); -// # - os-linux -// # - k8s -// # - general(agent-installed) -// # - faas -// # - mesh -// # - mesh-cp -// # - mesh-dp -// # - database -// # - cache -// # - browser -// # - skywalking + appStore.setPageTitle("Dashboard List"); const handleSelectionChange = (val: DashboardItem[]) => { multipleSelection.value = val; diff --git a/src/views/dashboard/controls/Topology.vue b/src/views/dashboard/controls/Topology.vue index 12d0c5fb..d34ee819 100644 --- a/src/views/dashboard/controls/Topology.vue +++ b/src/views/dashboard/controls/Topology.vue @@ -38,6 +38,7 @@ import { useRoute } from "vue-router"; import { useI18n } from "vue-i18n"; import { useDashboardStore } from "@/store/modules/dashboard"; import Topology from "../related/topology/Index.vue"; + /*global defineProps */ const props = defineProps({ data: { @@ -56,9 +57,9 @@ function removeTopo() {