Add Problems (Alerting) query type to UI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,11 @@ const zabbixQueryTypeOptions: Array<ComboboxOption<QueryType>> = [
|
||||
label: 'User macros',
|
||||
description: 'User Macros',
|
||||
},
|
||||
{
|
||||
value: c.MODE_PROBLEMS_ALERTING,
|
||||
label: 'Problems (Alerting)',
|
||||
description: 'Query problems for alerting (returns 0/1 time series)',
|
||||
},
|
||||
];
|
||||
|
||||
const getDefaultQuery: () => Partial<ZabbixMetricsQuery> = () => ({
|
||||
@@ -226,6 +231,7 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery, range }:
|
||||
{queryType === c.MODE_TEXT && renderTextMetricsEditor()}
|
||||
{queryType === c.MODE_ITSERVICE && renderITServicesEditor()}
|
||||
{queryType === c.MODE_PROBLEMS && renderProblemsEditor()}
|
||||
{queryType === c.MODE_PROBLEMS_ALERTING && renderProblemsEditor()}
|
||||
{queryType === c.MODE_TRIGGERS && renderTriggersEditor()}
|
||||
{queryType === c.MODE_MACROS && renderUserMacrosEditor()}
|
||||
<QueryOptionsEditor queryType={queryType} queryOptions={query.options} onChange={onOptionsChange} />
|
||||
|
||||
@@ -9,7 +9,8 @@ export type QueryType =
|
||||
| typeof c.MODE_ITEMID
|
||||
| typeof c.MODE_TRIGGERS
|
||||
| typeof c.MODE_PROBLEMS
|
||||
| typeof c.MODE_MACROS;
|
||||
| typeof c.MODE_MACROS
|
||||
| typeof c.MODE_PROBLEMS_ALERTING;
|
||||
|
||||
type BaseQuery = { queryType: QueryType; datasourceId: number } & DataQuery;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user