mirror of
https://github.com/grafana/grafana.git
synced 2025-01-13 09:32:12 -06:00
Fixed issue where panels would register twice. This breaks nice adding of new panels, working on it now
This commit is contained in:
parent
a76ceba30f
commit
d8f2d412cd
@ -96,6 +96,10 @@ angular.module('kibana.controllers', [])
|
||||
}
|
||||
}
|
||||
|
||||
$scope.send_render = function() {
|
||||
$scope.$broadcast('render');
|
||||
}
|
||||
|
||||
$scope.add_panel = function(row,panel) {
|
||||
console.log(panel)
|
||||
$scope.row.panels.push(panel);
|
||||
|
@ -21,6 +21,7 @@ angular.module('kibana.services', [])
|
||||
// addressed to the scope in question and runs the registered function if it
|
||||
// is.
|
||||
this.register = function(scope,type,fn) {
|
||||
console.log('registered:' + type + " for " + scope.panel.title + " " + scope.$id)
|
||||
scope.$on(type,function(event,packet){
|
||||
var _id = scope.$id;
|
||||
var _to = packet.to;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="row-fluid" ng-controller="histogram">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<form style="margin-bottom: 0px">
|
||||
<h6>Label</h6>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<kibana-panel ng-controller='histogram' style="height:{{row.height}}">
|
||||
<div histogram params="{{panel}}" style="height:{{row.height}}"></div>
|
||||
<div>
|
||||
<div histogram params="{{panel}} clearfix" style="height:{{row.height}}"></div>
|
||||
</div>
|
||||
</kibana-panel>
|
@ -1,4 +1,4 @@
|
||||
<div class="row-fluid" ng-controller="map">
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<form class="input-append">
|
||||
<h6>Query</h6>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="row-fluid" ng-switch="panel.mode" ng-controller="pie">
|
||||
<div class="row-fluid" ng-switch="panel.mode">
|
||||
<div ng-switch-when="terms">
|
||||
<div class="row-fluid">
|
||||
<div class="span4">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="row-fluid" ng-controller="table">
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<form class="input-append">
|
||||
<h5>Query</h5>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div ng-controller="text">
|
||||
<div>
|
||||
<label class="small">Font Size</label> <select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select>
|
||||
<label class=small>Content</label>
|
||||
<textarea ng-model="panel.content" rows="6" style="width:95%"></textarea>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="row-fluid" ng-controller="timepicker">
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<h6>Default Mode</h6>
|
||||
<select style="width:85%" ng-model="panel.mode" ng-options="f for f in ['relative','absolute','since']"></select>
|
||||
|
@ -13,5 +13,5 @@
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" ng-click="dismiss()">Close</button>
|
||||
<button type="button" class="btn btn-success" ng-click="dismiss();$broadcast('render')">Close</button>
|
||||
</div>
|
@ -45,5 +45,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" ng-click="dismiss();reset_panel();">Close</button>
|
||||
<button type="button" class="btn btn-success" ng-click="dismiss();reset_panel();send_render()">Close</button>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user