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}>
|
||||
<Select
|
||||
inputId="metric-stat-editor-select-statistic"
|
||||
inputId={`${query.refId}-metric-stat-editor-select-statistic`}
|
||||
allowCustomValue
|
||||
value={toOption(query.statistic ?? datasource.standardStatistics[0])}
|
||||
options={appendTemplateVariables(
|
||||
@@ -109,7 +109,7 @@ export function MetricStatEditor({
|
||||
tooltip="Only show metrics that exactly match all defined dimension names."
|
||||
>
|
||||
<Switch
|
||||
id="cloudwatch-match-exact"
|
||||
id={`${query.refId}-cloudwatch-match-exact`}
|
||||
value={!!query.matchExact}
|
||||
onChange={(e) => {
|
||||
onQueryChange({
|
||||
|
||||
@@ -59,7 +59,7 @@ const SQLBuilderSelectRow: React.FC<SQLBuilderSelectRowProps> = ({ datasource, q
|
||||
<EditorField label="Namespace" width={16}>
|
||||
<Select
|
||||
value={namespace ? toOption(namespace) : null}
|
||||
inputId="cloudwatch-sql-namespace"
|
||||
inputId={`${query.refId}-cloudwatch-sql-namespace`}
|
||||
options={namespaceOptions}
|
||||
allowCustomValue
|
||||
onChange={({ value }) => value && onQueryChange(setNamespace(query, value))}
|
||||
@@ -69,7 +69,7 @@ const SQLBuilderSelectRow: React.FC<SQLBuilderSelectRowProps> = ({ datasource, q
|
||||
|
||||
<EditorField label="With schema">
|
||||
<Switch
|
||||
id="cloudwatch-sql-withSchema"
|
||||
id={`${query.refId}-cloudwatch-sql-withSchema`}
|
||||
value={withSchemaEnabled}
|
||||
onChange={(ev) =>
|
||||
ev.target instanceof HTMLInputElement && onQueryChange(setWithSchema(query, ev.target.checked))
|
||||
@@ -80,7 +80,7 @@ const SQLBuilderSelectRow: React.FC<SQLBuilderSelectRowProps> = ({ datasource, q
|
||||
{withSchemaEnabled && (
|
||||
<EditorField label="Schema labels">
|
||||
<Select
|
||||
id="cloudwatch-sql-schema-label-keys"
|
||||
id={`${query.refId}-cloudwatch-sql-schema-label-keys`}
|
||||
width="auto"
|
||||
isMulti={true}
|
||||
disabled={!namespace}
|
||||
|
||||
Reference in New Issue
Block a user