|
|
@ -99,12 +99,16 @@ export class CloudWatchMetricsQueryRunner extends CloudWatchRequest { |
|
|
|
interpolateMetricsQueryVariables( |
|
|
|
interpolateMetricsQueryVariables( |
|
|
|
query: CloudWatchMetricsQuery, |
|
|
|
query: CloudWatchMetricsQuery, |
|
|
|
scopedVars: ScopedVars |
|
|
|
scopedVars: ScopedVars |
|
|
|
): Pick<CloudWatchMetricsQuery, 'alias' | 'metricName' | 'namespace' | 'period' | 'dimensions' | 'sqlExpression'> { |
|
|
|
): Pick< |
|
|
|
|
|
|
|
CloudWatchMetricsQuery, |
|
|
|
|
|
|
|
'alias' | 'metricName' | 'namespace' | 'period' | 'dimensions' | 'sqlExpression' | 'expression' |
|
|
|
|
|
|
|
> { |
|
|
|
return { |
|
|
|
return { |
|
|
|
alias: this.replaceVariableAndDisplayWarningIfMulti(query.alias, scopedVars), |
|
|
|
alias: this.replaceVariableAndDisplayWarningIfMulti(query.alias, scopedVars), |
|
|
|
metricName: this.replaceVariableAndDisplayWarningIfMulti(query.metricName, scopedVars), |
|
|
|
metricName: this.replaceVariableAndDisplayWarningIfMulti(query.metricName, scopedVars), |
|
|
|
namespace: this.replaceVariableAndDisplayWarningIfMulti(query.namespace, scopedVars), |
|
|
|
namespace: this.replaceVariableAndDisplayWarningIfMulti(query.namespace, scopedVars), |
|
|
|
period: this.replaceVariableAndDisplayWarningIfMulti(query.period, scopedVars), |
|
|
|
period: this.replaceVariableAndDisplayWarningIfMulti(query.period, scopedVars), |
|
|
|
|
|
|
|
expression: this.templateSrv.replace(query.expression, scopedVars), |
|
|
|
sqlExpression: this.replaceVariableAndDisplayWarningIfMulti(query.sqlExpression, scopedVars), |
|
|
|
sqlExpression: this.replaceVariableAndDisplayWarningIfMulti(query.sqlExpression, scopedVars), |
|
|
|
dimensions: this.convertDimensionFormat(query.dimensions ?? {}, scopedVars), |
|
|
|
dimensions: this.convertDimensionFormat(query.dimensions ?? {}, scopedVars), |
|
|
|
}; |
|
|
|
}; |
|
|
|