From 63fa9f453557cf4654706d79ad09ad2d6e831d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 6 Jan 2015 17:32:39 +0100 Subject: [PATCH 1/5] InfluxDB: Fix handling of empty array in templating variable query, Fixes #1298 --- CHANGELOG.md | 3 +++ src/app/features/influxdb/datasource.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9564f1d932d..da346aa2836 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ - [Issue #1297](https://github.com/grafana/grafana/issues/1297). Graphite: Added cumulative and minimumBelow graphite functions - [Issue #1296](https://github.com/grafana/grafana/issues/1296). InfluxDB: Auto escape column names with special characters. Thanks @steven-aerts +**Fixes** +- [Issue #1298](https://github.com/grafana/grafana/issues/1298). InfluxDB: Fix handling of empty array in templating variable query + # 1.9.1 (2014-12-29) **Enhancements** diff --git a/src/app/features/influxdb/datasource.js b/src/app/features/influxdb/datasource.js index 3de499ff40e..cef933d8d42 100644 --- a/src/app/features/influxdb/datasource.js +++ b/src/app/features/influxdb/datasource.js @@ -117,6 +117,8 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) { return this._seriesQuery(interpolated) .then(function (results) { + if (!results || results.length === 0) { return []; } + return _.map(results[0].points, function (metric) { return { text: metric[1], From ffbbb5bc9ee3efd327db8b0aa6f27ea7099d1465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 7 Jan 2015 20:03:51 +0100 Subject: [PATCH 2/5] Graph: Fixed issue when using zero as a grid threshold, Fixes #1309 --- CHANGELOG.md | 1 + src/app/panels/graph/graph.js | 4 ++-- src/test/specs/graph-specs.js | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da346aa2836..34f3d757b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Fixes** - [Issue #1298](https://github.com/grafana/grafana/issues/1298). InfluxDB: Fix handling of empty array in templating variable query +- [Issue #1309](https://github.com/grafana/grafana/issues/1309). Graph: Fixed issue when using zero as a grid threshold # 1.9.1 (2014-12-29) diff --git a/src/app/panels/graph/graph.js b/src/app/panels/graph/graph.js index 485d64d76ae..62fd543d0e8 100755 --- a/src/app/panels/graph/graph.js +++ b/src/app/panels/graph/graph.js @@ -260,14 +260,14 @@ function (angular, $, kbn, moment, _, GraphTooltip) { } function addGridThresholds(options, panel) { - if (panel.grid.threshold1) { + if (_.isNumber(panel.grid.threshold1)) { var limit1 = panel.grid.thresholdLine ? panel.grid.threshold1 : (panel.grid.threshold2 || null); options.grid.markings.push({ yaxis: { from: panel.grid.threshold1, to: limit1 }, color: panel.grid.threshold1Color }); - if (panel.grid.threshold2) { + if (_.isNumber(panel.grid.threshold2)) { var limit2; if (panel.grid.thresholdLine) { limit2 = panel.grid.threshold2; diff --git a/src/test/specs/graph-specs.js b/src/test/specs/graph-specs.js index 98968adaa09..1a4e52ad875 100644 --- a/src/test/specs/graph-specs.js +++ b/src/test/specs/graph-specs.js @@ -126,6 +126,20 @@ define([ }); }); + graphScenario('grid thresholds from zero', function(ctx) { + ctx.setup(function(scope) { + scope.panel.grid = { + threshold1: 0, + threshold1Color: "#111", + }; + }); + + it('should add grid markings', function() { + var markings = ctx.plotOptions.grid.markings; + expect(markings[0].yaxis.from).to.be(0); + }); + }); + graphScenario('should use timeStep for barWidth', function(ctx) { ctx.setup(function(scope, data) { scope.panel.bars = true; From 1f1244f285badcb8110f9bc1927dfa69f3b3af7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 8 Jan 2015 11:03:27 +0100 Subject: [PATCH 3/5] Upgrade Font-Awesome from 3.2 to 4.2 --- CHANGELOG.md | 3 + src/app/directives/panelMenu.js | 8 +- src/app/directives/tip.js | 2 +- .../features/annotations/partials/editor.html | 12 +- src/app/features/graphite/addGraphiteFunc.js | 2 +- src/app/features/graphite/funcEditor.js | 16 +- .../graphite/partials/query.editor.html | 14 +- .../influxdb/partials/query.editor.html | 18 +- .../opentsdb/partials/query.editor.html | 18 +- src/app/features/panellinkeditor/module.html | 2 +- src/app/panels/graph/axisEditor.html | 8 +- src/app/panels/graph/legend.js | 4 +- src/app/panels/graph/legend.popover.html | 2 +- src/app/panels/graph/module.html | 2 +- src/app/panels/graph/styleEditor.html | 4 +- src/app/panels/singlestat/editor.html | 6 +- src/app/panels/singlestat/module.html | 2 +- src/app/panels/timepicker/custom.html | 6 +- src/app/panels/timepicker/editor.html | 2 +- src/app/panels/timepicker/module.html | 4 +- src/app/panels/timepicker/refreshctrl.html | 5 - src/app/partials/confirm_modal.html | 2 +- src/app/partials/console.html | 2 +- src/app/partials/dashboard.html | 6 +- src/app/partials/dashboard_topnav.html | 12 +- src/app/partials/dasheditor.html | 8 +- src/app/partials/edit_json.html | 2 +- src/app/partials/help_modal.html | 2 +- src/app/partials/inspector.html | 2 +- src/app/partials/paneleditor.html | 2 +- src/app/partials/playlist.html | 12 +- src/app/partials/roweditor.html | 8 +- src/app/partials/search.html | 16 +- src/app/partials/share-panel.html | 2 +- src/app/partials/submenu.html | 4 +- src/app/partials/templating_editor.html | 24 +- src/app/partials/unsaved-changes.html | 2 +- src/css/less/grafana.less | 10 +- src/css/less/graph.less | 11 +- src/css/less/search.less | 4 +- src/font/FontAwesome.otf | Bin 61896 -> 0 bytes src/font/fontawesome-webfont.eot | Bin 37405 -> 0 bytes src/font/fontawesome-webfont.woff | Bin 43572 -> 0 bytes src/fonts/FontAwesome.otf | Bin 0 -> 85908 bytes src/fonts/fontawesome-webfont.eot | Bin 0 -> 56006 bytes src/{font => fonts}/fontawesome-webfont.svg | 189 +- src/{font => fonts}/fontawesome-webfont.ttf | Bin 79076 -> 112160 bytes src/fonts/fontawesome-webfont.woff | Bin 0 -> 65452 bytes src/vendor/bootstrap/less/sprites.less | 196 -- src/vendor/css/font-awesome.min.css | 2075 +++++++++++++---- 50 files changed, 1959 insertions(+), 772 deletions(-) delete mode 100644 src/app/panels/timepicker/refreshctrl.html delete mode 100644 src/font/FontAwesome.otf delete mode 100644 src/font/fontawesome-webfont.eot delete mode 100644 src/font/fontawesome-webfont.woff create mode 100644 src/fonts/FontAwesome.otf create mode 100644 src/fonts/fontawesome-webfont.eot rename src/{font => fonts}/fontawesome-webfont.svg (64%) rename src/{font => fonts}/fontawesome-webfont.ttf (53%) create mode 100644 src/fonts/fontawesome-webfont.woff diff --git a/CHANGELOG.md b/CHANGELOG.md index 34f3d757b33..0331dfd5d95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ - [Issue #1298](https://github.com/grafana/grafana/issues/1298). InfluxDB: Fix handling of empty array in templating variable query - [Issue #1309](https://github.com/grafana/grafana/issues/1309). Graph: Fixed issue when using zero as a grid threshold +**Tech** +- [Issue #1311](https://github.com/grafana/grafana/issues/1311). Tech: Updated Font-Awesome from 3.2 to 4.2 + # 1.9.1 (2014-12-29) **Enhancements** diff --git a/src/app/directives/panelMenu.js b/src/app/directives/panelMenu.js index 286d6e0bab7..d72b47cc977 100644 --- a/src/app/directives/panelMenu.js +++ b/src/app/directives/panelMenu.js @@ -19,14 +19,14 @@ function (angular, $, _) { var template = '
'; template += '
'; template += '
'; - template += ''; - template += ''; - template += ''; + template += ''; + template += ''; + template += ''; template += '
'; template += '
'; template += '
'; - template += ''; + template += ''; _.each($scope.panelMeta.menu, function(item) { template += ''; elem.replaceWith($compile(angular.element(_t))(scope)); } diff --git a/src/app/features/annotations/partials/editor.html b/src/app/features/annotations/partials/editor.html index cec67e28e66..b6118f15d63 100644 --- a/src/app/features/annotations/partials/editor.html +++ b/src/app/features/annotations/partials/editor.html @@ -2,7 +2,7 @@
- + Annotations
@@ -22,20 +22,20 @@ - - + + diff --git a/src/app/features/graphite/addGraphiteFunc.js b/src/app/features/graphite/addGraphiteFunc.js index 5ea45618ce1..47fe8206c92 100644 --- a/src/app/features/graphite/addGraphiteFunc.js +++ b/src/app/features/graphite/addGraphiteFunc.js @@ -17,7 +17,7 @@ function (angular, app, _, $, gfunc) { var buttonTemplate = ''; + ' data-placement="top">'; return { link: function($scope, elem) { diff --git a/src/app/features/graphite/funcEditor.js b/src/app/features/graphite/funcEditor.js index 2deef5b5246..62352aea389 100644 --- a/src/app/features/graphite/funcEditor.js +++ b/src/app/features/graphite/funcEditor.js @@ -16,10 +16,10 @@ function (angular, _, $) { var funcControlsTemplate = '
' + - '' + - '' + - '' + - '' + + '' + + '' + + '' + + '' + '
'; return { @@ -195,7 +195,7 @@ function (angular, _, $) { function registerFuncControlsActions() { $funcControls.click(function(e) { var $target = $(e.target); - if ($target.hasClass('icon-remove')) { + if ($target.hasClass('fa-remove')) { toggleFuncControls(); $scope.$apply(function() { $scope.removeFunction($scope.func); @@ -203,7 +203,7 @@ function (angular, _, $) { return; } - if ($target.hasClass('icon-arrow-left')) { + if ($target.hasClass('fa-arrow-left')) { $scope.$apply(function() { _.move($scope.functions, $scope.$index, $scope.$index - 1); $scope.targetChanged(); @@ -211,7 +211,7 @@ function (angular, _, $) { return; } - if ($target.hasClass('icon-arrow-right')) { + if ($target.hasClass('fa-arrow-right')) { $scope.$apply(function() { _.move($scope.functions, $scope.$index, $scope.$index + 1); $scope.targetChanged(); @@ -219,7 +219,7 @@ function (angular, _, $) { return; } - if ($target.hasClass('icon-info-sign')) { + if ($target.hasClass('fa-question-circle')) { window.open("http://graphite.readthedocs.org/en/latest/functions.html#graphite.render.functions." + funcDef.name,'_blank'); return; } diff --git a/src/app/features/graphite/partials/query.editor.html b/src/app/features/graphite/partials/query.editor.html index d57184c16fd..8857ab83983 100755 --- a/src/app/features/graphite/partials/query.editor.html +++ b/src/app/features/graphite/partials/query.editor.html @@ -10,19 +10,19 @@ @@ -93,7 +93,7 @@
- - + + diff --git a/src/app/partials/edit_json.html b/src/app/partials/edit_json.html index a43e1d56bcd..4a8580dfcc5 100644 --- a/src/app/partials/edit_json.html +++ b/src/app/partials/edit_json.html @@ -2,7 +2,7 @@
- + JSON
diff --git a/src/app/partials/help_modal.html b/src/app/partials/help_modal.html index 866d44898eb..977553b73c6 100644 --- a/src/app/partials/help_modal.html +++ b/src/app/partials/help_modal.html @@ -1,7 +1,7 @@
-   +   {{annotation.name}} - + Edit - +
' + statName; if (panel.legend.sort === statName) { - var cssClass = panel.legend.sortDesc ? 'icon-caret-down' : 'icon-caret-up' ; + var cssClass = panel.legend.sortDesc ? 'fa fa-caret-down' : 'fa-caret-up' ; html += ' '; } @@ -136,7 +136,7 @@ function (angular, app, _, kbn, $) { if (scope.hiddenSeries[series.alias]) { html += ' graph-legend-series-hidden'; } html += '" data-series-index="' + i + '">'; html += '
'; - html += ''; + html += ''; html += '
'; html += '
'; diff --git a/src/app/panels/graph/legend.popover.html b/src/app/panels/graph/legend.popover.html index 631f4cfeabc..4d24136309e 100644 --- a/src/app/panels/graph/legend.popover.html +++ b/src/app/panels/graph/legend.popover.html @@ -18,7 +18,7 @@
 
diff --git a/src/app/panels/graph/module.html b/src/app/panels/graph/module.html index 65fbb00b1f7..fa205e488a6 100644 --- a/src/app/panels/graph/module.html +++ b/src/app/panels/graph/module.html @@ -23,7 +23,7 @@
- + Graph
diff --git a/src/app/panels/graph/styleEditor.html b/src/app/panels/graph/styleEditor.html index f230c2ba20a..77eb933f855 100644 --- a/src/app/panels/graph/styleEditor.html +++ b/src/app/panels/graph/styleEditor.html @@ -70,7 +70,7 @@
  • - +
  • @@ -85,7 +85,7 @@ class="input-medium grafana-target-segment-input" >
  • - + {{option.name}}: {{option.value}}
  • diff --git a/src/app/panels/singlestat/editor.html b/src/app/panels/singlestat/editor.html index 88fc438c39f..2460571a4b3 100644 --- a/src/app/panels/singlestat/editor.html +++ b/src/app/panels/singlestat/editor.html @@ -86,14 +86,14 @@
    • - +
    • - +
    • @@ -101,7 +101,7 @@
    • - +
    • diff --git a/src/app/panels/singlestat/module.html b/src/app/panels/singlestat/module.html index e59fb82f303..15711ea2adb 100644 --- a/src/app/panels/singlestat/module.html +++ b/src/app/panels/singlestat/module.html @@ -7,7 +7,7 @@
      - + Singlestat
      diff --git a/src/app/panels/timepicker/custom.html b/src/app/panels/timepicker/custom.html index 5497d0b6549..a762597eaf2 100644 --- a/src/app/panels/timepicker/custom.html +++ b/src/app/panels/timepicker/custom.html @@ -1,6 +1,6 @@
      - + Custom time range
      @@ -56,7 +56,7 @@
      - +
      @@ -66,7 +66,7 @@ .
      -   Right Now +   Right Now
      diff --git a/src/app/panels/timepicker/editor.html b/src/app/panels/timepicker/editor.html index c72fc023261..fc51d35ad9f 100644 --- a/src/app/panels/timepicker/editor.html +++ b/src/app/panels/timepicker/editor.html @@ -11,7 +11,7 @@


      - + For these changes to fully take effect save and reload the dashboard.

      diff --git a/src/app/panels/timepicker/module.html b/src/app/panels/timepicker/module.html index c4cd4069e91..f0cfb2e316c 100644 --- a/src/app/panels/timepicker/module.html +++ b/src/app/panels/timepicker/module.html @@ -23,7 +23,7 @@ refreshed every {{dashboard.refresh}} - + diff --git a/src/app/panels/timepicker/refreshctrl.html b/src/app/panels/timepicker/refreshctrl.html deleted file mode 100644 index 289e1bff117..00000000000 --- a/src/app/panels/timepicker/refreshctrl.html +++ /dev/null @@ -1,5 +0,0 @@ -
      -
      - - -
      \ No newline at end of file diff --git a/src/app/partials/confirm_modal.html b/src/app/partials/confirm_modal.html index 6c954d756bd..2269b2b8c24 100644 --- a/src/app/partials/confirm_modal.html +++ b/src/app/partials/confirm_modal.html @@ -1,7 +1,7 @@
{{row.title}} - +
- +
- No dashboards marked as favorites + No dashboards marked as favorites
- + dashboards available in the playlist are only the ones marked as favorites (stored in local browser storage). to mark a dashboard as favorite, use save icon in the menu and in the dropdown select mark as favorite

@@ -56,7 +56,7 @@
diff --git a/src/app/partials/roweditor.html b/src/app/partials/roweditor.html index 57060ebf93c..e15f765d2af 100644 --- a/src/app/partials/roweditor.html +++ b/src/app/partials/roweditor.html @@ -1,6 +1,6 @@
- + Row settings
@@ -38,11 +38,11 @@ {{panel.title}} {{panel.type}} - - + + - + diff --git a/src/app/partials/search.html b/src/app/partials/search.html index 2d220b206fd..f2de26a7477 100644 --- a/src/app/partials/search.html +++ b/src/app/partials/search.html @@ -2,22 +2,22 @@
- + Search
@@ -38,7 +38,7 @@ ng-class="{'selected': $index === selectedIndex }" ng-click="filterByTag(tag.term, $event)"> - + {{tag.term}}  ({{tag.count}})
@@ -52,10 +52,10 @@ @@ -66,7 +66,7 @@
- + diff --git a/src/app/partials/share-panel.html b/src/app/partials/share-panel.html index d2c85e423ce..27b1f6c904e 100644 --- a/src/app/partials/share-panel.html +++ b/src/app/partials/share-panel.html @@ -2,7 +2,7 @@