mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 03:02:18 +08:00
33 lines
697 B
TypeScript
33 lines
697 B
TypeScript
import { InlineField, InlineFieldRow, Select } from '@grafana/ui';
|
|
|
|
import { EditorProps } from '../QueryEditor';
|
|
|
|
const OPTIONS = [
|
|
{
|
|
label: 'Plugin',
|
|
value: 'plugin',
|
|
},
|
|
{
|
|
label: 'Downstream',
|
|
value: 'downstream',
|
|
},
|
|
];
|
|
|
|
const ErrorWithSourceQueryEditor = ({ query, onChange }: EditorProps) => {
|
|
return (
|
|
<InlineFieldRow>
|
|
<InlineField labelWidth={14} label="Error source">
|
|
<Select
|
|
options={OPTIONS}
|
|
value={query.errorSource}
|
|
onChange={(v) => {
|
|
onChange({ ...query, errorSource: v.value });
|
|
}}
|
|
/>
|
|
</InlineField>
|
|
</InlineFieldRow>
|
|
);
|
|
};
|
|
|
|
export default ErrorWithSourceQueryEditor;
|