CloudWatch: Annotations query editor loading fix (#20687)

* Re-adding lost import

* Make sure wildcard is not in annotations editor
pull/20711/head
Erik Sundell 6 years ago committed by GitHub
parent 21fed8c5f1
commit 2929649fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      public/app/plugins/datasource/cloudwatch/components/QueryEditor.tsx
  2. 2
      public/app/plugins/datasource/cloudwatch/datasource.ts
  3. 1
      public/app/plugins/datasource/cloudwatch/module.tsx

@ -159,6 +159,7 @@ export class QueryEditor extends PureComponent<Props, State> {
const { [newKey]: value, ...newDimensions } = query.dimensions;
return datasource
.getDimensionValues(query.region, query.namespace, query.metricName, newKey, newDimensions)
.then(values => (values.length ? [{ value: '*', text: '*', label: '*' }, ...values] : values))
.then(this.appendTemplateVariables);
}}
/>

@ -375,7 +375,7 @@ export default class CloudWatchDatasource extends DataSourceApi<CloudWatchQuery,
dimensions: this.convertDimensionFormat(filterDimensions, {}),
});
return values.length ? [{ value: '*', text: '*', label: '*' }, ...values] : values;
return values;
}
getEbsVolumeIds(region: string, instanceId: string) {

@ -1,3 +1,4 @@
import './query_parameter_ctrl';
import { DataSourcePlugin } from '@grafana/data';
import { ConfigEditor } from './components/ConfigEditor';
import { QueryEditor } from './components/QueryEditor';

Loading…
Cancel
Save