You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

80 lines
1.3 KiB

export interface PanelOptions {
visualizationType: Pod;
gauge: {
min: ExtremumOptions;
max: ExtremumOptions;
value: ExtremumOptions;
valueSize: number;
reversed: boolean;
thresholds: {
arcBackground: string;
defaultColor: string;
thresholds: Threshold[];
};
icons: Icon[];
decimals?: number;
unit?: string;
link?: string;
additionalInfo: {
display: boolean;
value: ExtremumOptions;
size: number;
color: number;
prefix: string;
unit: string;
decimals: number;
};
};
}
export type ExtremumOptions = {
useMetric: false;
value?: number;
metricName?: string;
};
export type ValueOptions = {
metricName?: string;
};
export enum IconPosition {
UPPER_LEFT = 'Upper left',
MIDDLE = 'Middle',
UPPER_RIGHT = 'Upper right',
}
export enum Pod {
LINE = 'Line',
BAR = 'Bar',
GAUGE = 'Gauge',
}
export enum Aggregation {
MIN = 'min',
MAX = 'max',
LAST = 'last',
}
export type Threshold = {
useMetric: boolean;
value: number;
metricName: string;
color: string;
};
export type Icon = {
conditions: Condition[];
metrics: string[];
values: number[];
position: IconPosition;
size: number;
url: string;
};
export enum Condition {
EQUAL = '=',
GREATER = '>',
LESS = '<',
GREATER_OR_EQUAL = '>=',
LESS_OR_EQUAL = '<=',
}