diff --git a/src/app/directives/kibanaSimplePanel.js b/src/app/directives/kibanaSimplePanel.js index 6274e8749f9..bb6b44c747c 100644 --- a/src/app/directives/kibanaSimplePanel.js +++ b/src/app/directives/kibanaSimplePanel.js @@ -60,14 +60,16 @@ function (angular, _) { loadController(name); }); - $scope.$watch(attr.panel, function (panel) { - // If the panel attribute is specified, create a new scope. This ruins configuration - // so don't do it with anything that needs to use editor.html - if(!_.isUndefined(panel)) { - $scope = $scope.$new(); - $scope.panel = angular.fromJson(panel); - } - }); + if(attr.panel) { + $scope.$watch(attr.panel, function (panel) { + // If the panel attribute is specified, create a new scope. This ruins configuration + // so don't do it with anything that needs to use editor.html + if(!_.isUndefined(panel)) { + $scope = $scope.$new(); + $scope.panel = angular.fromJson(panel); + } + }); + } } }; }); diff --git a/src/app/panels/histogram/module.html b/src/app/panels/histogram/module.html index f52b408e4cb..3db0048586f 100644 --- a/src/app/panels/histogram/module.html +++ b/src/app/panels/histogram/module.html @@ -44,10 +44,10 @@ Zoom Out - + - {{series.alias || series.query}} - {{series.alias}} + {{series.query.alias || series.query.query}} + {{series.query.alias}} ({{series.hits}}) diff --git a/src/app/panels/histogram/module.js b/src/app/panels/histogram/module.js index d2a3551d2bd..d476c95da85 100644 --- a/src/app/panels/histogram/module.js +++ b/src/app/panels/histogram/module.js @@ -425,7 +425,7 @@ function (angular, app, $, _, kbn, moment, timeSeries) { $scope.hits += entry.count; // Entire dataset level hits counter }); - $scope.legend[i] = q; + $scope.legend[i] = {query:q,hits:hits}; data[i] = { info: q,