feat: the log widget and the trace widget associate with each other, remove log tables on the trace widget (#128)

This commit is contained in:
Fine0830
2022-07-27 16:24:34 +08:00
committed by GitHub
parent 673b1a41a8
commit 2ba3c67d31
21 changed files with 230 additions and 168 deletions

View File

@@ -39,6 +39,7 @@ interface DashboardState {
dashboards: DashboardItem[];
currentDashboard: Nullable<DashboardItem>;
editMode: boolean;
currentTabIndex: number;
}
export const dashboardStore = defineStore({
@@ -56,6 +57,7 @@ export const dashboardStore = defineStore({
dashboards: [],
currentDashboard: null,
editMode: false,
currentTabIndex: 0,
}),
actions: {
setLayout(data: LayoutConfig[]) {
@@ -189,6 +191,7 @@ export const dashboardStore = defineStore({
this.activedGridItem = index;
},
setActiveTabIndex(index: number, target?: number) {
this.currentTabIndex = index;
const m = target || this.activedGridItem;
const idx = this.layout.findIndex((d: LayoutConfig) => d.i === m);
if (idx < 0) {

View File

@@ -63,6 +63,14 @@ export const traceStore = defineStore({
setTraceSpans(spans: Span) {
this.traceSpans = spans;
},
resetCondition() {
this.conditions = {
queryDuration: useAppStoreWithOut().durationTime,
paging: { pageNum: 1, pageSize: 20 },
traceState: "ALL",
queryOrder: "BY_START_TIME",
};
},
async getServices(layer: string) {
const res: AxiosResponse = await graphql.query("queryServices").params({
layer,