forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added debug panel (not by default), added inspector link to pie and t…
…able
- Loading branch information
Rashid Khan
committed
Mar 12, 2013
1 parent
ffe392c
commit a7a42b3
Showing
12 changed files
with
166 additions
and
222,816 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="row-fluid" ng-controller="debug"> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
angular.module('kibana.debug', []) | ||
.controller('debug', function($scope, eventBus) { | ||
|
||
// Set and populate defaults | ||
var _d = { | ||
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}) | ||
}); | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<kibana-panel ng-controller='pie' ng-init="init()"> | ||
<span style="position:absolute;right:0px;top:0px" class='panelextra pointer'> | ||
<i bs-modal="'partials/modal.html'" class="icon-eye-open"></i> | ||
</span> | ||
|
||
<div pie params="{{panel}}" style="height:{{panel.height || row.height}};position:relative"></div> | ||
</kibana-panel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h3>{{modal.title}}</h3> | ||
</div> | ||
<div class="modal-body"> | ||
|
||
<div ng-bind-html='modal.body'></div> | ||
|
||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-success" ng-click="dismiss();send_render()">Close</button> | ||
</div> |
Oops, something went wrong.