feat: Implement custom configurations for metrics on dashboards and topology (#39)

This commit is contained in:
Fine0830
2022-03-26 22:52:43 +08:00
committed by GitHub
parent c369de2cb1
commit c00d5d2a05
30 changed files with 965 additions and 364 deletions

View File

@@ -36,8 +36,17 @@ export interface LayoutConfig {
metricTypes: string[];
children?: any;
activedTabIndex?: number;
metricConfig?: MetricConfigOpt[];
}
export type MetricConfigOpt = {
unit: string;
label: string;
calculation: string;
labelsIndex: string;
sortOrder: string;
};
export interface WidgetConfig {
title?: string;
tips?: string;
@@ -87,7 +96,7 @@ export interface AreaConfig {
export interface CardConfig {
type?: string;
fontSize?: number;
showUint?: boolean;
showUnit?: boolean;
textAlign?: "center" | "right" | "left";
}