From d8f2d412cd8b38f7171d7395b32571c9ecb9af21 Mon Sep 17 00:00:00 2001 From: Rashid Khan Date: Thu, 14 Feb 2013 08:37:03 -0700 Subject: [PATCH] Fixed issue where panels would register twice. This breaks nice adding of new panels, working on it now --- js/controllers.js | 4 ++++ js/services.js | 1 + panels/histogram/editor.html | 2 +- panels/histogram/module.html | 4 +++- panels/map/editor.html | 2 +- panels/pie/editor.html | 2 +- panels/table/editor.html | 2 +- panels/text/editor.html | 2 +- panels/timepicker/editor.html | 2 +- partials/paneleditor.html | 2 +- partials/roweditor.html | 2 +- 11 files changed, 16 insertions(+), 9 deletions(-) diff --git a/js/controllers.js b/js/controllers.js index dbbca95d5d8..0cc87f4319d 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -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); diff --git a/js/services.js b/js/services.js index c3730ec0b1e..6fce70abd08 100644 --- a/js/services.js +++ b/js/services.js @@ -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; diff --git a/panels/histogram/editor.html b/panels/histogram/editor.html index 543260ce9e6..eddb63a6947 100644 --- a/panels/histogram/editor.html +++ b/panels/histogram/editor.html @@ -1,4 +1,4 @@ -
+
Label
diff --git a/panels/histogram/module.html b/panels/histogram/module.html index dd94a34b7a9..0d194ae2a71 100644 --- a/panels/histogram/module.html +++ b/panels/histogram/module.html @@ -1,3 +1,5 @@ -
+
+
+
\ No newline at end of file diff --git a/panels/map/editor.html b/panels/map/editor.html index 4f87e9f207e..ef8762d7f50 100644 --- a/panels/map/editor.html +++ b/panels/map/editor.html @@ -1,4 +1,4 @@ -
+
Query
diff --git a/panels/pie/editor.html b/panels/pie/editor.html index ddcc94bf87b..291307eade7 100644 --- a/panels/pie/editor.html +++ b/panels/pie/editor.html @@ -1,4 +1,4 @@ -
+
diff --git a/panels/table/editor.html b/panels/table/editor.html index 1b6a7dc4e28..dc70b3fba5f 100644 --- a/panels/table/editor.html +++ b/panels/table/editor.html @@ -1,4 +1,4 @@ -
+
Query
diff --git a/panels/text/editor.html b/panels/text/editor.html index add058a6232..9ad880192fc 100644 --- a/panels/text/editor.html +++ b/panels/text/editor.html @@ -1,4 +1,4 @@ -
+
diff --git a/panels/timepicker/editor.html b/panels/timepicker/editor.html index c66b1dda710..a00aeeea138 100644 --- a/panels/timepicker/editor.html +++ b/panels/timepicker/editor.html @@ -1,4 +1,4 @@ -
+
Default Mode
diff --git a/partials/paneleditor.html b/partials/paneleditor.html index f5389aa1648..fd1572f83cf 100644 --- a/partials/paneleditor.html +++ b/partials/paneleditor.html @@ -13,5 +13,5 @@
\ No newline at end of file diff --git a/partials/roweditor.html b/partials/roweditor.html index ceed6fa2252..866a5144f86 100644 --- a/partials/roweditor.html +++ b/partials/roweditor.html @@ -45,5 +45,5 @@
\ No newline at end of file