mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-14 09:00:50 +00:00
created trace store
This commit is contained in:
parent
51a8382c77
commit
dd92af68d7
@ -17,9 +17,35 @@
|
|||||||
|
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { store } from "@/store";
|
import { store } from "@/store";
|
||||||
import { Trace, Span } from "@/types/trace";
|
// import { Trace, Span } from "@/types/trace";
|
||||||
|
|
||||||
|
|
||||||
interface jbTraceStates {
|
interface jbTraceStates {
|
||||||
|
activeFilter: string;
|
||||||
|
displayMode: string;
|
||||||
|
currentView: string;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
export const jbTraceStore = defineStore({
|
||||||
|
id: "jb-trace",
|
||||||
|
state: (): jbTraceStates => ({
|
||||||
|
displayMode: "List",
|
||||||
|
currentView: "traceList",
|
||||||
|
activeFilter: "",
|
||||||
|
}),
|
||||||
|
actions: {
|
||||||
|
setDisplayMode(data: string) {
|
||||||
|
this.displayMode = data;
|
||||||
|
},
|
||||||
|
setCurrentView(data: string) {
|
||||||
|
this.currentView = data;
|
||||||
|
},
|
||||||
|
setActiveFilter(data: string) {
|
||||||
|
if (!data) this.activeFilter = "";
|
||||||
|
this.activeFilter = data;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export function useJbTraceStore(): any {
|
||||||
|
return jbTraceStore(store);
|
||||||
|
}
|
||||||
|
@ -23,7 +23,6 @@ import graphql from "@/graphql";
|
|||||||
import { AxiosResponse } from "axios";
|
import { AxiosResponse } from "axios";
|
||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
import { useSelectorStore } from "@/store/modules/selectors";
|
import { useSelectorStore } from "@/store/modules/selectors";
|
||||||
|
|
||||||
interface TraceState {
|
interface TraceState {
|
||||||
services: Service[];
|
services: Service[];
|
||||||
instances: Instance[];
|
instances: Instance[];
|
||||||
|
Loading…
Reference in New Issue
Block a user