Commit dd012735 by Rashid Khan

removed debug panel, fixed labels on pie

parent 2d542aed
<div class="row-fluid">
<div class="row-fluid">
<div class="span3">
<h5>Length</h5>
<input type="number" class="input-mini" ng-model="panel.size">
</div>
<div class="span3"><h6>Font Size</h6>
<select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
</div>
\ No newline at end of file
<kibana-panel ng-controller='debug' ng-init='init()'>
<table class="table-hover table table-condensed" ng-style="panel.style" style="height:{{panel.height || row.height}};overflow-y:auto;overflow-x:auto">
<thead>
<th style="white-space:nowrap" ng-repeat="th in ['timestamp','from','to','type']">
{{th}}
</th>
</thead>
<tbody ng-repeat="event in events" ng-class-odd="'odd'">
<tr ng-click="toggle_details(event)">
<td>{{event.header.time}}</td>
<td>{{event.header.from}}</td>
<td>{{event.header.to}}</td>
<td>{{event.header.type}}</td>
</tr>
<tr ng-show="event.details">
<td>
<h6>Event header</h6>
<pre ng-style="panel.style">{{event.header | json}}</pre>
</td>
<td colspan=1000>
<h6>Event payload</h6>
<pre ng-style="panel.style">{{event.data | json}}</pre>
</td>
</tr>
</tbody>
</table>
</kibana-panel>
\ No newline at end of file
/*
## Debug
Shows the exchange of events between panels. Disabled by default and usually
should be. This panel exists in the ALL group by default so that it receives
all of the events from every panel
### Parameters
* size :: How many events to show
* style :: A hash containing css style parameters
### Group Events
#### Receives
* $kibana_debug :: Contains a meta object of any event sent
*/
angular.module('kibana.debug', [])
.controller('debug', function($scope, eventBus) {
// Set and populate defaults
var _d = {
status : "Experimental",
group : "ALL",
style : {'font-size':'9pt'},
size : 20
}
_.defaults($scope.panel,_d)
$scope.init = function () {
$scope.set_listeners($scope.panel.group)
// Now that we're all setup, request the time from our group
eventBus.broadcast($scope.$id,$scope.panel.group,"get_time")
$scope.events = []
}
$scope.toggle_details = function(event) {
event.details = event.details ? false : true;
}
$scope.set_listeners = function(group) {
eventBus.register($scope,'$kibana_debug',function(event,data,header) {
if($scope.events.length >= $scope.panel.size)
$scope.events = $scope.events.slice(0,$scope.panel.size-1)
$scope.events.unshift({header:header,data:data})
});
}
});
\ No newline at end of file
......@@ -200,8 +200,9 @@ angular.module('kibana.pie', [])
show: scope.panel.labels,
radius: 2/3,
formatter: function(label, series){
console.log(series)
return '<div "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+
series.info.alias+'<br/>'+Math.round(series.percent)+'%</div>';
label+'<br/>'+Math.round(series.percent)+'%</div>';
},
threshold: 0.1
}
......
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