added charts to micropanel in table
This commit is contained in:
@@ -70,6 +70,8 @@ angular.module('kibana.table', [])
|
||||
$scope.get_data();
|
||||
};
|
||||
|
||||
$scope.percent = kbn.to_percent;
|
||||
|
||||
$scope.toggle_micropanel = function(field) {
|
||||
var docs = _.pluck($scope.data,'_source');
|
||||
$scope.micropanel = {
|
||||
@@ -80,6 +82,11 @@ angular.module('kibana.table', [])
|
||||
};
|
||||
};
|
||||
|
||||
$scope.micropanelColor = function(index) {
|
||||
var _c = ['bar-success','bar-warning','bar-danger','bar-info','bar-primary'];
|
||||
return index > _c.length ? '' : _c[index];
|
||||
};
|
||||
|
||||
$scope.set_sort = function(field) {
|
||||
if($scope.panel.sort[0] === field) {
|
||||
$scope.panel.sort[1] = $scope.panel.sort[1] === 'asc' ? 'desc' : 'asc';
|
||||
|
||||
Reference in New Issue
Block a user