diff --git a/src/constants/data.ts b/src/constants/data.ts index 4aa4f82a..5a8bf137 100644 --- a/src/constants/data.ts +++ b/src/constants/data.ts @@ -23,6 +23,7 @@ export enum TimeType { export const Languages = [ { label: "English", value: "en" }, { label: "Chinese", value: "zh" }, + { label: "Spanish", value: "es" }, ]; export const RoutesMap: { [key: string]: string } = { diff --git a/src/layout/components/SideBar.vue b/src/layout/components/SideBar.vue index 278f8172..34ad6852 100644 --- a/src/layout/components/SideBar.vue +++ b/src/layout/components/SideBar.vue @@ -41,7 +41,7 @@ limitations under the License. --> - + {{ t(menu.meta.title) }} @@ -57,7 +57,7 @@ limitations under the License. --> :to="m.path" :exact="m.meta.exact || false" > - {{ t(m.meta.title) }} + {{ t(m.meta.title) }} @@ -82,7 +82,7 @@ limitations under the License. --> :to="menu.children[0].path" :exact="menu.meta.exact" > - {{ t(menu.meta.title) }} + {{ t(menu.meta.title) }} @@ -208,4 +208,11 @@ span.collapse { width: 100%; height: 60px; } + +.title { + display: inline-block; + max-width: 110px; + text-overflow: ellipsis; + overflow: hidden; +} diff --git a/src/locales/index.ts b/src/locales/index.ts index 4480c941..9d161104 100644 --- a/src/locales/index.ts +++ b/src/locales/index.ts @@ -17,10 +17,12 @@ import { createI18n } from "vue-i18n"; import zh from "./lang/zh"; import en from "./lang/en"; +import es from "./lang/es"; const messages = { en, zh, + es, }; const savedLanguage = window.localStorage.getItem("language"); diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 5e06286b..056c83e6 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -194,10 +194,11 @@ const setUTCMin = () => { } .label { - width: 160px; + width: 180px; display: inline-block; font-weight: 500; color: #000; + line-height: 25px; } } diff --git a/src/views/dashboard/related/ebpf/components/EBPFStack.vue b/src/views/dashboard/related/ebpf/components/EBPFStack.vue index a363b19f..adccea90 100644 --- a/src/views/dashboard/related/ebpf/components/EBPFStack.vue +++ b/src/views/dashboard/related/ebpf/components/EBPFStack.vue @@ -68,12 +68,13 @@ function drawGraph() { root.value = param[0]; root.dumpCount = param[1]; stackTree.value = root; - const w = (graph.value && graph.value.getBoundingClientRect().width) || 10; + const width = (graph.value && graph.value.getBoundingClientRect().width) || 0; + const w = width < 800 ? 802 : width; flameChart.value = flamegraph() .width(w - 15) .cellHeight(18) .transitionDuration(750) - .minFrameSize(5) + .minFrameSize(1) .transitionEase(d3.easeCubic as any) .sort(true) .title("")