Added fields and hits panels, updated config and default dashboard.

This commit is contained in:
Rashid Khan
2013-02-06 14:14:17 -07:00
parent 70f6a29700
commit 085b688850
18 changed files with 242 additions and 140 deletions
+6 -1
View File
@@ -16,13 +16,18 @@ angular.module('kibana.sort', [])
$scope.init = function() {
$scope.fields = [];
$scope.$on($scope.panel.group+"-fields", function(event, fields) {
$scope.panel.sort = fields.sort;
$scope.panel.sort = _.clone(fields.sort);
$scope.fields = _.union(fields.all,$scope.fields);
});
}
$scope.set_sort = function() {
$rootScope.$broadcast($scope.panel.group+"-sort",$scope.panel.sort)
}
$scope.toggle_sort = function() {
$scope.panel.sort[1] = $scope.panel.sort[1] == 'asc' ? 'desc' : 'asc';
$rootScope.$broadcast($scope.panel.group+"-sort",$scope.panel.sort)
}
$scope.init();
})