Commit c9768f5d by Rashid Khan

Merge pull request #245 from rashidkpc/master

Re-added query history; clean up
parents 8927a04a 5158cace
...@@ -35,6 +35,7 @@ angular.module('kibana.query', []) ...@@ -35,6 +35,7 @@ angular.module('kibana.query', [])
}; };
$scope.refresh = function(query) { $scope.refresh = function(query) {
update_history(_.pluck($scope.queries.list,'query'));
$rootScope.$broadcast('refresh'); $rootScope.$broadcast('refresh');
}; };
...@@ -42,15 +43,6 @@ angular.module('kibana.query', []) ...@@ -42,15 +43,6 @@ angular.module('kibana.query', [])
$rootScope.$broadcast('render'); $rootScope.$broadcast('render');
}; };
$scope.add_query = function() {
if (_.isArray($scope.panel.query)) {
$scope.panel.query.push("");
} else {
$scope.panel.query = new Array($scope.panel.query);
$scope.panel.query.push("");
}
};
var update_history = function(query) { var update_history = function(query) {
if($scope.panel.remember > 0) { if($scope.panel.remember > 0) {
$scope.panel.history = _.union(query.reverse(),$scope.panel.history); $scope.panel.history = _.union(query.reverse(),$scope.panel.history);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment