From 6e8d5cd8732d5a674dc8ef3ebc9f7da071ba9adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 25 Aug 2015 09:34:43 +0200 Subject: [PATCH] fix(opentsdb): blur event triggered twice for metric selector, caused double query to opentsdb after metric name change --- .../opentsdb/partials/query.editor.html | 222 ++++++++---------- .../plugins/datasource/opentsdb/queryCtrl.js | 4 - 2 files changed, 101 insertions(+), 125 deletions(-) diff --git a/public/app/plugins/datasource/opentsdb/partials/query.editor.html b/public/app/plugins/datasource/opentsdb/partials/query.editor.html index 9af1523e780..23781365eb0 100644 --- a/public/app/plugins/datasource/opentsdb/partials/query.editor.html +++ b/public/app/plugins/datasource/opentsdb/partials/query.editor.html @@ -42,15 +42,9 @@ Metric
  • - + @@ -75,11 +69,11 @@
  • + ng-model="target.alias" + spellcheck='false' + placeholder="series alias" + data-min-length=0 data-items=100 + ng-blur="targetBlur()">
  • @@ -94,115 +88,101 @@
  • -
  • + ng-model="target.downsampleInterval" + ng-model-onblur + ng-change="targetBlur()" + placeholder="interval (empty = auto)"> + -
  • - Aggregator -
  • +
  • + Aggregator +
  • -
  • - -
  • +
  • + +
  • -
  • - -
  • +
  • + +
  • - -
    - - -
    - -
    -
    - -
    - - -
    -
    - + +
    + + +
    + +
    +
    + +
    + + +
    diff --git a/public/app/plugins/datasource/opentsdb/queryCtrl.js b/public/app/plugins/datasource/opentsdb/queryCtrl.js index 44c8496ca8a..2636fa12b03 100644 --- a/public/app/plugins/datasource/opentsdb/queryCtrl.js +++ b/public/app/plugins/datasource/opentsdb/queryCtrl.js @@ -21,10 +21,6 @@ function (angular, _, kbn) { if (!$scope.target.downsampleAggregator) { $scope.target.downsampleAggregator = 'avg'; } - - $scope.$on('typeahead-updated', function() { - $timeout($scope.targetBlur); - }); }; $scope.targetBlur = function() {