mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add dimensions() to CloudWatch templating query
This commit is contained in:
@@ -146,7 +146,7 @@ describe('CloudWatchDatasource', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describeMetricFindQuery('dimension_values(us-east-1,AWS/EC2,CPUUtilization)', scenario => {
|
||||
describeMetricFindQuery('dimensions(us-east-1,AWS/EC2,CPUUtilization)', scenario => {
|
||||
scenario.setup(() => {
|
||||
scenario.requestResponse = {
|
||||
Metrics: [
|
||||
@@ -170,4 +170,28 @@ describe('CloudWatchDatasource', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describeMetricFindQuery('dimension_values(us-east-1,AWS/EC2,CPUUtilization,InstanceId)', scenario => {
|
||||
scenario.setup(() => {
|
||||
scenario.requestResponse = {
|
||||
Metrics: [
|
||||
{
|
||||
Namespace: 'AWS/EC2',
|
||||
MetricName: 'CPUUtilization',
|
||||
Dimensions: [
|
||||
{
|
||||
Name: 'InstanceId',
|
||||
Value: 'i-12345678'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
it('should call __ListMetrics and return result', () => {
|
||||
expect(scenario.result[0].text).to.be('i-12345678');
|
||||
expect(scenario.request.data.action).to.be('ListMetrics');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user