diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 75597f1e..f5baff01 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -397,5 +397,8 @@ const msg = { instances: "Instances", snapshot: "Snapshot", expression: "Expression", + metricsTTL: "Metrics TTL", + clusterNodes: "Cluster Nodes", + debuggingConfigDump: "Dump Effective Configurations", }; export default msg; diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts index 1e714278..eeaab80f 100644 --- a/src/locales/lang/es.ts +++ b/src/locales/lang/es.ts @@ -397,5 +397,8 @@ const msg = { snapshot: "Snapshot", expression: "Expression", asSelector: "As Selector", + metricsTTL: "Metrics TTL", + clusterNodes: "Cluster Nodes", + debuggingConfigDump: "Dump Effective Configurations", }; export default msg; diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index b6c1fbb8..8d58c7ff 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -395,5 +395,8 @@ const msg = { instances: "实例", snapshot: "快照", expression: "表达式", + metricsTTL: "Metrics TTL", + clusterNodes: "集群节点", + debuggingConfigDump: "转储有效配置", }; export default msg; diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index d185d94b..31722194 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -20,7 +20,6 @@ import fetchQuery from "@/graphql/http"; import type { Cluster, ConfigTTL } from "@/types/settings"; interface SettingsState { - loading: boolean; clusterNodes: Cluster[]; debuggingConfig: Indexable; configTTL: Recordable; @@ -30,37 +29,30 @@ export const settingsStore = defineStore({ id: "settings", state: (): SettingsState => ({ clusterNodes: [], - loading: false, debuggingConfig: {}, configTTL: {}, }), actions: { async getClusterNodes() { - this.loading = true; const res = await fetchQuery({ method: "get", path: "ClusterNodes", }); - this.loading = false; return res.nodes; }, async getConfigTTL() { - this.loading = true; const res = await fetchQuery({ method: "get", path: "ConfigTTL", }); - this.loading = false; this.configTTL = res; return res; }, async getDebuggingConfigDump() { - this.loading = true; const res = await fetchQuery({ method: "get", path: "DebuggingConfigDump", }); - this.loading = false; this.debuggingConfig = res; return res; }, diff --git a/src/views/Settings.vue b/src/views/Settings.vue index e3a26549..d4bebf7d 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -48,15 +48,58 @@ limitations under the License. -->
- {{ t("TTL") }} -
TTL
+ {{ t("metricsTTL") }} +
+ Day: + {{ settingsStore.configTTL.metrics?.day ?? -1 }} + Hour: + {{ settingsStore.configTTL.metrics?.hour ?? -1 }} + Minute: + {{ settingsStore.configTTL.metrics?.minute ?? -1 }} +
+
+ Cold Day: + {{ settingsStore.configTTL.metrics?.coldDay ?? -1 }} + Cold Hour: + {{ settingsStore.configTTL.metrics?.coldHour ?? -1 }} + Cold Minute: + {{ settingsStore.configTTL.metrics?.coldMinute ?? -1 }} +
+
+
+ {{ t("clusterNodes") }} +
+ + + + + + +
+
+
+ {{ t("debuggingConfigDump") }} +
+ {{ `${item}: ${settingsStore.debuggingConfig[item]}` }} +
+
No Data