Added the ability to toggle filters

This commit is contained in:
Rashid Khan
2013-07-15 10:52:57 -07:00
parent 803f24cb4c
commit 1d4af12f57
7 changed files with 151 additions and 119 deletions
+7 -3
View File
@@ -26,6 +26,11 @@ angular.module('kibana.filtering', [])
dashboard.refresh();
}
$scope.toggle = function(id) {
filterSrv.list[id].active = !filterSrv.list[id].active;
dashboard.refresh();
}
$scope.refresh = function(query) {
$rootScope.$broadcast('refresh')
}
@@ -34,9 +39,8 @@ angular.module('kibana.filtering', [])
$rootScope.$broadcast('render')
}
$scope.stripped = function(filter) {
var filter = _.omit(filter,'type','id','alias','mandate')
return filter
$scope.show_key = function(key) {
return !_.contains(['type','id','alias','mandate','active'],key)
}
});