mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Re-added query history; clean up
This commit is contained in:
parent
fabf9f3835
commit
5158cacebe
@ -35,6 +35,7 @@ angular.module('kibana.query', [])
|
||||
};
|
||||
|
||||
$scope.refresh = function(query) {
|
||||
update_history(_.pluck($scope.queries.list,'query'));
|
||||
$rootScope.$broadcast('refresh');
|
||||
};
|
||||
|
||||
@ -42,15 +43,6 @@ angular.module('kibana.query', [])
|
||||
$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) {
|
||||
if($scope.panel.remember > 0) {
|
||||
$scope.panel.history = _.union(query.reverse(),$scope.panel.history);
|
||||
|
Loading…
Reference in New Issue
Block a user