瀏覽代碼

Fix: Cloudwatch fix for dimension value (#16356)

Fixes autocomplete suggestion after changing dimension key

Fixes #15984
Mitsuhiro Tanda 6 年之前
父節點
當前提交
58eb74660d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      public/app/plugins/datasource/cloudwatch/query_parameter_ctrl.ts

+ 1 - 0
public/app/plugins/datasource/cloudwatch/query_parameter_ctrl.ts

@@ -112,6 +112,7 @@ export class CloudWatchQueryParameterCtrl {
         query = $scope.datasource.getDimensionKeys($scope.target.namespace, $scope.target.region);
         query = $scope.datasource.getDimensionKeys($scope.target.namespace, $scope.target.region);
       } else if (segment.type === 'value') {
       } else if (segment.type === 'value') {
         const dimensionKey = $scope.dimSegments[$index - 2].value;
         const dimensionKey = $scope.dimSegments[$index - 2].value;
+        delete target.dimensions[dimensionKey];
         query = $scope.datasource.getDimensionValues(
         query = $scope.datasource.getDimensionValues(
           target.region,
           target.region,
           target.namespace,
           target.namespace,