feat: associate metrics with trace widget on dashboards (#174)

This commit is contained in:
Fine0830
2022-10-25 11:36:49 +08:00
committed by GitHub
parent 78f0096c00
commit eda44db0cd
33 changed files with 1041 additions and 192 deletions

15
src/types/app.d.ts vendored
View File

@@ -32,3 +32,18 @@ export type Paging = {
pageNum: number;
pageSize: number;
};
export type EventParams = {
componentType: string;
seriesType: string;
seriesIndex: number;
seriesName: string;
name: string;
dataIndex: number;
data: unknown;
dataType: string;
value: number | Array;
color: string;
event: any;
dataIndex: number;
};

View File

@@ -25,6 +25,7 @@ declare module '@vue/runtime-core' {
ElPopover: typeof import('element-plus/es')['ElPopover']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSlider: typeof import('element-plus/es')['ElSlider']

View File

@@ -1,3 +1,4 @@
import { DurationTime } from "@/types/app";
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -39,19 +40,32 @@ export interface LayoutConfig {
id?: string;
associate?: { widgetId: string }[];
eventAssociate?: boolean;
filters?: {
dataIndex: number;
sourceId: string;
isRange?: boolean;
duration?: {
startTime: string;
endTime: string;
};
traceId?: string;
spanId?: string;
segmentId?: string;
};
filters?: Filters;
relatedTrace?: RelatedTrace;
}
export type RelatedTrace = {
duration: DurationTime;
status: string;
queryOrder: string;
latency: boolean;
enableRelate: boolean;
};
export type Filters = {
dataIndex: number;
sourceId: string;
isRange?: boolean;
duration?: {
startTime: string;
endTime: string;
};
traceId?: string;
spanId?: string;
segmentId?: string;
id?: string;
queryOrder?: string;
status?: string;
};
export type MetricConfigOpt = {
unit?: string;