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

Series names and column name typeahead cache fix (Fixes #522)

Torkel Ödegaard 11 лет назад
Родитель
Сommit
ed0c71fa56
2 измененных файлов с 3 добавлено и 1 удалено
  1. 1 0
      CHANGELOG.md
  2. 2 1
      src/app/controllers/influxTargetCtrl.js

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ vNext
 
 
 - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500)
 - Fixes regex InfluxDB queries intoduced in 1.6.0 (PR #500)
 - Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506)
 - Bug in when using % sign in legends (aliases), fixed by removing url decoding of metric names (Fixes #506)
+- Series names and column name typeahead cache fix (Fixes #522)
 
 
 # 1.6.0 (2014-06-16)
 # 1.6.0 (2014-06-16)
 
 

+ 2 - 1
src/app/controllers/influxTargetCtrl.js

@@ -42,6 +42,7 @@ function (angular) {
     $scope.seriesBlur = function() {
     $scope.seriesBlur = function() {
       if ($scope.oldSeries !== $scope.target.series) {
       if ($scope.oldSeries !== $scope.target.series) {
         $scope.oldSeries = $scope.target.series;
         $scope.oldSeries = $scope.target.series;
+        $scope.columnList = null;
         $scope.get_data();
         $scope.get_data();
       }
       }
     };
     };
@@ -67,7 +68,7 @@ function (angular) {
     };
     };
 
 
     $scope.listSeries = function(query, callback) {
     $scope.listSeries = function(query, callback) {
-      if (!seriesList) {
+      if (!seriesList || query === '') {
         seriesList = [];
         seriesList = [];
         $scope.datasource.listSeries().then(function(series) {
         $scope.datasource.listSeries().then(function(series) {
           seriesList = series;
           seriesList = series;