mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudWatch: Remove error message when using multi-valued template vars in region field (#45886)
* don't show error message when using multi-valued template variables in region field * add unit tests * remove commented code
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import React from 'react';
|
||||
import { pick } from 'lodash';
|
||||
|
||||
import { ExploreMode, SelectableValue } from '@grafana/data';
|
||||
import { EditorHeader, InlineSelect } from '@grafana/experimental';
|
||||
import { pick } from 'lodash';
|
||||
import React from 'react';
|
||||
|
||||
import { CloudWatchDatasource } from '../datasource';
|
||||
import { CloudWatchQuery, CloudWatchQueryMode } from '../types';
|
||||
import { useRegions } from '../hooks';
|
||||
import { CloudWatchQuery, CloudWatchQueryMode } from '../types';
|
||||
import MetricsQueryHeader from './MetricsQueryHeader';
|
||||
|
||||
interface QueryHeaderProps {
|
||||
@@ -59,7 +58,7 @@ const QueryHeader: React.FC<QueryHeaderProps> = ({
|
||||
<EditorHeader>
|
||||
<InlineSelect
|
||||
label="Region"
|
||||
value={regions.find((v) => v.value === region)}
|
||||
value={region}
|
||||
placeholder="Select region"
|
||||
allowCustomValue
|
||||
onChange={({ value: region }) => region && onRegion({ value: region })}
|
||||
|
||||
Reference in New Issue
Block a user