2023-11-15 17:14:09 +05:30
|
|
|
import { DefaultOptionType } from 'antd/es/select';
|
2023-11-16 15:27:48 +05:30
|
|
|
import { PANEL_TYPES } from 'constants/queryBuilder';
|
2023-11-15 17:14:09 +05:30
|
|
|
import { categoryToSupport } from 'container/QueryBuilder/filters/BuilderUnitsFilter/config';
|
|
|
|
|
|
|
|
|
|
import { getCategorySelectOptionByName } from './alertFomatCategories';
|
|
|
|
|
|
|
|
|
|
export const operatorOptions: DefaultOptionType[] = [
|
|
|
|
|
{ value: '>', label: '>' },
|
|
|
|
|
{ value: '>=', label: '>=' },
|
|
|
|
|
{ value: '<', label: '<' },
|
|
|
|
|
{ value: '<=', label: '<=' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const unitOptions = categoryToSupport.map((category) => ({
|
|
|
|
|
label: category,
|
|
|
|
|
options: getCategorySelectOptionByName(category),
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
export const showAsOptions: DefaultOptionType[] = [
|
|
|
|
|
{ value: 'Text', label: 'Text' },
|
|
|
|
|
{ value: 'Background', label: 'Background' },
|
|
|
|
|
];
|
2023-11-16 15:27:48 +05:30
|
|
|
|
|
|
|
|
export const panelTypeVsThreshold: { [key in PANEL_TYPES]: boolean } = {
|
|
|
|
|
[PANEL_TYPES.TIME_SERIES]: true,
|
|
|
|
|
[PANEL_TYPES.VALUE]: true,
|
2023-11-23 15:32:06 +05:30
|
|
|
[PANEL_TYPES.TABLE]: true,
|
2023-11-16 15:27:48 +05:30
|
|
|
[PANEL_TYPES.LIST]: false,
|
|
|
|
|
[PANEL_TYPES.TRACE]: false,
|
|
|
|
|
[PANEL_TYPES.EMPTY_WIDGET]: false,
|
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
|
|
export const panelTypeVsDragAndDrop: { [key in PANEL_TYPES]: boolean } = {
|
|
|
|
|
[PANEL_TYPES.TIME_SERIES]: false,
|
|
|
|
|
[PANEL_TYPES.VALUE]: true,
|
|
|
|
|
[PANEL_TYPES.TABLE]: true,
|
|
|
|
|
[PANEL_TYPES.LIST]: false,
|
|
|
|
|
[PANEL_TYPES.TRACE]: false,
|
|
|
|
|
[PANEL_TYPES.EMPTY_WIDGET]: false,
|
|
|
|
|
} as const;
|