mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-06-29 18:06:19 +00:00
update types
This commit is contained in:
parent
2c5f145f5c
commit
cd191866a9
@ -17,11 +17,13 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { store } from "@/store";
|
import { store } from "@/store";
|
||||||
import fetchQuery from "@/graphql/http";
|
import fetchQuery from "@/graphql/http";
|
||||||
import type { Cluster } from "@/types/settings";
|
import type { Cluster, ConfigTTL } from "@/types/settings";
|
||||||
|
|
||||||
interface SettingsState {
|
interface SettingsState {
|
||||||
loading: boolean;
|
loading: boolean;
|
||||||
clusterNodes: Cluster[];
|
clusterNodes: Cluster[];
|
||||||
|
debuggingConfig: Indexable<string>;
|
||||||
|
configTTL: Recordable<ConfigTTL>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const settingsStore = defineStore({
|
export const settingsStore = defineStore({
|
||||||
@ -29,6 +31,8 @@ export const settingsStore = defineStore({
|
|||||||
state: (): SettingsState => ({
|
state: (): SettingsState => ({
|
||||||
clusterNodes: [],
|
clusterNodes: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
debuggingConfig: {},
|
||||||
|
configTTL: {},
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
async getClusterNodes() {
|
async getClusterNodes() {
|
||||||
@ -47,6 +51,7 @@ export const settingsStore = defineStore({
|
|||||||
path: "ConfigTTL",
|
path: "ConfigTTL",
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.configTTL = res;
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
async getDebuggingConfigDump() {
|
async getDebuggingConfigDump() {
|
||||||
@ -56,6 +61,7 @@ export const settingsStore = defineStore({
|
|||||||
path: "DebuggingConfigDump",
|
path: "DebuggingConfigDump",
|
||||||
});
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.debuggingConfig = res;
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -14,8 +14,16 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { MetricsTTL, RecordsTTL } from "@/types/app";
|
||||||
|
|
||||||
export type Cluster = {
|
export type Cluster = {
|
||||||
host: string;
|
host: string;
|
||||||
port: number;
|
port: number;
|
||||||
isSelf: boolean;
|
isSelf: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ConfigTTL = {
|
||||||
|
metrics: MetricsTTL;
|
||||||
|
records: RecordsTTL;
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user