mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudWatch: fix duplicated IDs (#42658)
This commit is contained in:
committed by
GitHub
parent
ec994c3e1f
commit
e061cbd25b
@@ -66,7 +66,7 @@ export function MetricStatEditor({
|
|||||||
|
|
||||||
<EditorField label="Statistic" width={16}>
|
<EditorField label="Statistic" width={16}>
|
||||||
<Select
|
<Select
|
||||||
inputId="metric-stat-editor-select-statistic"
|
inputId={`${query.refId}-metric-stat-editor-select-statistic`}
|
||||||
allowCustomValue
|
allowCustomValue
|
||||||
value={toOption(query.statistic ?? datasource.standardStatistics[0])}
|
value={toOption(query.statistic ?? datasource.standardStatistics[0])}
|
||||||
options={appendTemplateVariables(
|
options={appendTemplateVariables(
|
||||||
@@ -109,7 +109,7 @@ export function MetricStatEditor({
|
|||||||
tooltip="Only show metrics that exactly match all defined dimension names."
|
tooltip="Only show metrics that exactly match all defined dimension names."
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
id="cloudwatch-match-exact"
|
id={`${query.refId}-cloudwatch-match-exact`}
|
||||||
value={!!query.matchExact}
|
value={!!query.matchExact}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
onQueryChange({
|
onQueryChange({
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const SQLBuilderSelectRow: React.FC<SQLBuilderSelectRowProps> = ({ datasource, q
|
|||||||
<EditorField label="Namespace" width={16}>
|
<EditorField label="Namespace" width={16}>
|
||||||
<Select
|
<Select
|
||||||
value={namespace ? toOption(namespace) : null}
|
value={namespace ? toOption(namespace) : null}
|
||||||
inputId="cloudwatch-sql-namespace"
|
inputId={`${query.refId}-cloudwatch-sql-namespace`}
|
||||||
options={namespaceOptions}
|
options={namespaceOptions}
|
||||||
allowCustomValue
|
allowCustomValue
|
||||||
onChange={({ value }) => value && onQueryChange(setNamespace(query, value))}
|
onChange={({ value }) => value && onQueryChange(setNamespace(query, value))}
|
||||||
@@ -69,7 +69,7 @@ const SQLBuilderSelectRow: React.FC<SQLBuilderSelectRowProps> = ({ datasource, q
|
|||||||
|
|
||||||
<EditorField label="With schema">
|
<EditorField label="With schema">
|
||||||
<Switch
|
<Switch
|
||||||
id="cloudwatch-sql-withSchema"
|
id={`${query.refId}-cloudwatch-sql-withSchema`}
|
||||||
value={withSchemaEnabled}
|
value={withSchemaEnabled}
|
||||||
onChange={(ev) =>
|
onChange={(ev) =>
|
||||||
ev.target instanceof HTMLInputElement && onQueryChange(setWithSchema(query, ev.target.checked))
|
ev.target instanceof HTMLInputElement && onQueryChange(setWithSchema(query, ev.target.checked))
|
||||||
@@ -80,7 +80,7 @@ const SQLBuilderSelectRow: React.FC<SQLBuilderSelectRowProps> = ({ datasource, q
|
|||||||
{withSchemaEnabled && (
|
{withSchemaEnabled && (
|
||||||
<EditorField label="Schema labels">
|
<EditorField label="Schema labels">
|
||||||
<Select
|
<Select
|
||||||
id="cloudwatch-sql-schema-label-keys"
|
id={`${query.refId}-cloudwatch-sql-schema-label-keys`}
|
||||||
width="auto"
|
width="auto"
|
||||||
isMulti={true}
|
isMulti={true}
|
||||||
disabled={!namespace}
|
disabled={!namespace}
|
||||||
|
|||||||
Reference in New Issue
Block a user