Prometheus/Loki: Fixes the query type option when multiple queries present (#47846)

This commit is contained in:
Torkel Ödegaard 2022-04-20 14:01:01 +02:00 committed by GitHub
parent 01c22ee366
commit 68aac0bd90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -58,12 +58,7 @@ export const LokiQueryBuilderOptions = React.memo<Props>(({ query, onChange, onR
/>
</EditorField>
<EditorField label="Type">
<RadioButtonGroup
id="options.query.type"
options={queryTypeOptions}
value={queryType}
onChange={onQueryTypeChange}
/>
<RadioButtonGroup options={queryTypeOptions} value={queryType} onChange={onQueryTypeChange} />
</EditorField>
{showMaxLines && (
<EditorField label="Line limit" tooltip="Upper limit for number of log lines returned by query.">

View File

@ -75,12 +75,7 @@ export const PromQueryBuilderOptions = React.memo<Props>(({ query, app, onChange
<Select value={formatOption} allowCustomValue onChange={onChangeFormat} options={FORMAT_OPTIONS} />
</EditorField>
<EditorField label="Type">
<RadioButtonGroup
id="options.query.type"
options={queryTypeOptions}
value={queryTypeValue}
onChange={onQueryTypeChange}
/>
<RadioButtonGroup options={queryTypeOptions} value={queryTypeValue} onChange={onQueryTypeChange} />
</EditorField>
{shouldShowExemplarSwitch(query, app) && (
<EditorField label="Exemplars">