From cd191866a97ea698b7447913c7b785b80f792821 Mon Sep 17 00:00:00 2001 From: Fine Date: Wed, 28 May 2025 10:10:27 +0800 Subject: [PATCH] update types --- src/store/modules/settings.ts | 8 +++++++- src/types/settings.ts | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index c8b9e3f5..d185d94b 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -17,11 +17,13 @@ import { defineStore } from "pinia"; import { store } from "@/store"; import fetchQuery from "@/graphql/http"; -import type { Cluster } from "@/types/settings"; +import type { Cluster, ConfigTTL } from "@/types/settings"; interface SettingsState { loading: boolean; clusterNodes: Cluster[]; + debuggingConfig: Indexable; + configTTL: Recordable; } export const settingsStore = defineStore({ @@ -29,6 +31,8 @@ export const settingsStore = defineStore({ state: (): SettingsState => ({ clusterNodes: [], loading: false, + debuggingConfig: {}, + configTTL: {}, }), actions: { async getClusterNodes() { @@ -47,6 +51,7 @@ export const settingsStore = defineStore({ path: "ConfigTTL", }); this.loading = false; + this.configTTL = res; return res; }, async getDebuggingConfigDump() { @@ -56,6 +61,7 @@ export const settingsStore = defineStore({ path: "DebuggingConfigDump", }); this.loading = false; + this.debuggingConfig = res; return res; }, }, diff --git a/src/types/settings.ts b/src/types/settings.ts index 07d978c8..c6e29060 100644 --- a/src/types/settings.ts +++ b/src/types/settings.ts @@ -14,8 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import type { MetricsTTL, RecordsTTL } from "@/types/app"; + export type Cluster = { host: string; port: number; isSelf: boolean; }; + +export type ConfigTTL = { + metrics: MetricsTTL; + records: RecordsTTL; +};