Просмотр исходного кода

show error message when cloudwatch datasource can't add

Mitsuhiro Tanda 8 лет назад
Родитель
Сommit
40b11654fd
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      public/app/plugins/datasource/cloudwatch/datasource.js

+ 2 - 0
public/app/plugins/datasource/cloudwatch/datasource.js

@@ -318,6 +318,8 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
 
       return this.getDimensionValues(region, namespace, metricName, 'ServiceName', dimensions).then(function () {
         return { status: 'success', message: 'Data source is working' };
+      }, function (err) {
+        return { status: 'error', message: err.message };
       });
     };