diff --git a/src/datasource/components/QueryEditor/ProblemsQueryEditor.tsx b/src/datasource/components/QueryEditor/ProblemsQueryEditor.tsx index 4cc5503..ec6d6bc 100644 --- a/src/datasource/components/QueryEditor/ProblemsQueryEditor.tsx +++ b/src/datasource/components/QueryEditor/ProblemsQueryEditor.tsx @@ -3,7 +3,7 @@ import React, { useEffect, FormEvent } from 'react'; import { useAsyncFn } from 'react-use'; import { SelectableValue } from '@grafana/data'; -import { InlineField, Input, Select } from '@grafana/ui'; +import { InlineField, Input, MultiSelect, Select } from '@grafana/ui'; import { QueryEditorRow } from './QueryEditorRow'; import { MetricPicker } from '../../../components'; import { getVariableOptions } from './utils'; @@ -143,9 +143,9 @@ export const ProblemsQueryEditor = ({ query, datasource, onChange }: Props) => { }; }; - const onMinSeverityChange = (option: SelectableValue) => { - if (option.value !== null) { - onChange({ ...query, options: { ...query.options, minSeverity: option.value } }); + const onSeveritiesChange = (options: SelectableValue[]) => { + if (options !== null) { + onChange({ ...query, options: { ...query.options, severities: options.map((o) => o.value) } }); } }; @@ -217,13 +217,14 @@ export const ProblemsQueryEditor = ({ query, datasource, onChange }: Props) => { onChange={onPropChange('showProblems')} /> - -