diff --git a/CHANGELOG.md b/CHANGELOG.md index 18933684bf9..bbe1d57cfae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ vNext exists after the options are reloaded the current selected value is kept (Closes #447, Closes #412) - Legend Current value did not display when value was zero, Fixes #460 - Fix to series toggling bug that caused annotations to be hidden when toggling (hiding) series. Fixes #328 +- Fix for graphite function selection menu that some times draws outside screen. It now displays upward (Fixes #293) # 1.5.4 (2014-05-13) ### New features and improvements diff --git a/src/app/directives/addGraphiteFunc.js b/src/app/directives/addGraphiteFunc.js index 6ea24a18cfe..f5801bb3106 100644 --- a/src/app/directives/addGraphiteFunc.js +++ b/src/app/directives/addGraphiteFunc.js @@ -18,7 +18,7 @@ function (angular, app, _, $, gfunc) { var buttonTemplate = ''; + ' data-placement="top">'; return { link: function($scope, elem) { diff --git a/src/app/directives/bootstrap-tagsinput.js b/src/app/directives/bootstrap-tagsinput.js index 5012fa03212..95dc78a6bf7 100644 --- a/src/app/directives/bootstrap-tagsinput.js +++ b/src/app/directives/bootstrap-tagsinput.js @@ -87,13 +87,12 @@ function (angular, $) { .module('kibana.directives') .directive('gfDropdown', function ($parse, $compile, $timeout) { - function buildTemplate(items, ul) { - if (!ul) { - ul = [ - '
' - ]; - } + function buildTemplate(items, placement) { + var upclass = placement === 'top' ? 'dropup' : ''; + var ul = [ + ' ' + ]; angular.forEach(items, function (item, index) { if (item.divider) { @@ -122,10 +121,12 @@ function (angular, $) { link: function postLink(scope, iElement, iAttrs) { var getter = $parse(iAttrs.gfDropdown), items = getter(scope); $timeout(function () { - var dropdown = angular.element(buildTemplate(items).join('')); + var placement = iElement.data('placement'); + var dropdown = angular.element(buildTemplate(items, placement).join('')); dropdown.insertAfter(iElement); $compile(iElement.next('ul.dropdown-menu'))(scope); }); + iElement.addClass('dropdown-toggle').attr('data-toggle', 'dropdown'); } }; diff --git a/src/app/directives/grafanaGraph.js b/src/app/directives/grafanaGraph.js index 69c74c7bcf5..ca9da221ac6 100644 --- a/src/app/directives/grafanaGraph.js +++ b/src/app/directives/grafanaGraph.js @@ -37,7 +37,7 @@ function (angular, $, kbn, moment, _) { // Receive render events scope.$on('render',function(event, renderData) { data = renderData || data; - annotations = renderData.annotations; + annotations = data.annotations; render_panel(); });