mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-06-29 12:47:35 +00:00
update types
This commit is contained in:
parent
2c5f145f5c
commit
cd191866a9
@ -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<string>;
|
||||
configTTL: Recordable<ConfigTTL>;
|
||||
}
|
||||
|
||||
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;
|
||||
},
|
||||
},
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user