mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' of github.com:grafana/grafana
This commit is contained in:
commit
623019ee56
@ -3,10 +3,12 @@ vNext
|
|||||||
- Allow special characters in serie names (influxdb datasource), PR #390 - thx @majst01
|
- Allow special characters in serie names (influxdb datasource), PR #390 - thx @majst01
|
||||||
- Refactoring of filterSrv (Issue #428), thx @Tetha
|
- Refactoring of filterSrv (Issue #428), thx @Tetha
|
||||||
- New config for playlist feature. Set playlist_timespan to set default playlist interval (Issue #445) - thx @rmca
|
- New config for playlist feature. Set playlist_timespan to set default playlist interval (Issue #445) - thx @rmca
|
||||||
|
- New graphite function definition added isNonNull (PR #461), - thx @tmonk42
|
||||||
- New InfluxDB function difference add to function dropdown (PR #455)
|
- New InfluxDB function difference add to function dropdown (PR #455)
|
||||||
- Added parameter to keepLastValue graphite function definition (default 100), Closes #459
|
- Added parameter to keepLastValue graphite function definition (default 100), Closes #459
|
||||||
- improved asset (css/js) build pipeline, added revision to css and js. Will remove issues related
|
- improved asset (css/js) build pipeline, added revision to css and js. Will remove issues related
|
||||||
to the browser cache when upgrading grafana and improve load performance (Fixes #418)
|
to the browser cache when upgrading grafana and improve load performance (Fixes #418)
|
||||||
|
- Partial support for url encoded metrics when using Graphite datasource (PR #327) - thx @axe-felix
|
||||||
|
|
||||||
# Fixes
|
# Fixes
|
||||||
- Filter option loading when having muliple nested filters now works better.
|
- Filter option loading when having muliple nested filters now works better.
|
||||||
@ -14,6 +16,8 @@ vNext
|
|||||||
After an option is changed and a nested template param is also reloaded, if the current value
|
After an option is changed and a nested template param is also reloaded, if the current value
|
||||||
exists after the options are reloaded the current selected value is kept (Closes #447, Closes #412)
|
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
|
- 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)
|
# 1.5.4 (2014-05-13)
|
||||||
### New features and improvements
|
### New features and improvements
|
||||||
|
@ -18,7 +18,7 @@ function (angular, app, _, $, gfunc) {
|
|||||||
|
|
||||||
var buttonTemplate = '<a class="grafana-target-segment grafana-target-function dropdown-toggle"' +
|
var buttonTemplate = '<a class="grafana-target-segment grafana-target-function dropdown-toggle"' +
|
||||||
' tabindex="1" gf-dropdown="functionMenu" data-toggle="dropdown"' +
|
' tabindex="1" gf-dropdown="functionMenu" data-toggle="dropdown"' +
|
||||||
' data-placement="bottom"><i class="icon-plus"></i></a>';
|
' data-placement="top"><i class="icon-plus"></i></a>';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
link: function($scope, elem) {
|
link: function($scope, elem) {
|
||||||
|
17
src/app/directives/bootstrap-tagsinput.js
vendored
17
src/app/directives/bootstrap-tagsinput.js
vendored
@ -87,13 +87,12 @@ function (angular, $) {
|
|||||||
.module('kibana.directives')
|
.module('kibana.directives')
|
||||||
.directive('gfDropdown', function ($parse, $compile, $timeout) {
|
.directive('gfDropdown', function ($parse, $compile, $timeout) {
|
||||||
|
|
||||||
function buildTemplate(items, ul) {
|
function buildTemplate(items, placement) {
|
||||||
if (!ul) {
|
var upclass = placement === 'top' ? 'dropup' : '';
|
||||||
ul = [
|
var ul = [
|
||||||
'<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">',
|
'<ul class="dropdown-menu ' + upclass + '" role="menu" aria-labelledby="drop1">',
|
||||||
'</ul>'
|
'</ul>'
|
||||||
];
|
];
|
||||||
}
|
|
||||||
|
|
||||||
angular.forEach(items, function (item, index) {
|
angular.forEach(items, function (item, index) {
|
||||||
if (item.divider) {
|
if (item.divider) {
|
||||||
@ -122,10 +121,12 @@ function (angular, $) {
|
|||||||
link: function postLink(scope, iElement, iAttrs) {
|
link: function postLink(scope, iElement, iAttrs) {
|
||||||
var getter = $parse(iAttrs.gfDropdown), items = getter(scope);
|
var getter = $parse(iAttrs.gfDropdown), items = getter(scope);
|
||||||
$timeout(function () {
|
$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);
|
dropdown.insertAfter(iElement);
|
||||||
$compile(iElement.next('ul.dropdown-menu'))(scope);
|
$compile(iElement.next('ul.dropdown-menu'))(scope);
|
||||||
});
|
});
|
||||||
|
|
||||||
iElement.addClass('dropdown-toggle').attr('data-toggle', 'dropdown');
|
iElement.addClass('dropdown-toggle').attr('data-toggle', 'dropdown');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
15
src/app/directives/grafanaGraph.js
Normal file → Executable file
15
src/app/directives/grafanaGraph.js
Normal file → Executable file
@ -15,7 +15,7 @@ function (angular, $, kbn, moment, _) {
|
|||||||
restrict: 'A',
|
restrict: 'A',
|
||||||
template: '<div> </div>',
|
template: '<div> </div>',
|
||||||
link: function(scope, elem) {
|
link: function(scope, elem) {
|
||||||
var data, plot;
|
var data, plot, annotations;
|
||||||
var hiddenData = {};
|
var hiddenData = {};
|
||||||
|
|
||||||
scope.$on('refresh',function() {
|
scope.$on('refresh',function() {
|
||||||
@ -35,8 +35,9 @@ function (angular, $, kbn, moment, _) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Receive render events
|
// Receive render events
|
||||||
scope.$on('render',function(event, d) {
|
scope.$on('render',function(event, renderData) {
|
||||||
data = d || data;
|
data = renderData || data;
|
||||||
|
annotations = data.annotations;
|
||||||
render_panel();
|
render_panel();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -206,13 +207,13 @@ function (angular, $, kbn, moment, _) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addAnnotations(options) {
|
function addAnnotations(options) {
|
||||||
if(!data.annotations || data.annotations.length === 0) {
|
if(!annotations || annotations.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var types = {};
|
var types = {};
|
||||||
|
|
||||||
_.each(data.annotations, function(event) {
|
_.each(annotations, function(event) {
|
||||||
if (!types[event.annotation.name]) {
|
if (!types[event.annotation.name]) {
|
||||||
types[event.annotation.name] = {
|
types[event.annotation.name] = {
|
||||||
level: _.keys(types).length + 1,
|
level: _.keys(types).length + 1,
|
||||||
@ -235,7 +236,7 @@ function (angular, $, kbn, moment, _) {
|
|||||||
|
|
||||||
options.events = {
|
options.events = {
|
||||||
levels: _.keys(types).length + 1,
|
levels: _.keys(types).length + 1,
|
||||||
data: data.annotations,
|
data: annotations,
|
||||||
types: types
|
types: types
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -313,7 +314,7 @@ function (angular, $, kbn, moment, _) {
|
|||||||
if (seriesInfo.alias) {
|
if (seriesInfo.alias) {
|
||||||
group = '<small style="font-size:0.9em;">' +
|
group = '<small style="font-size:0.9em;">' +
|
||||||
'<i class="icon-circle" style="color:'+item.series.color+';"></i>' + ' ' +
|
'<i class="icon-circle" style="color:'+item.series.color+';"></i>' + ' ' +
|
||||||
(seriesInfo.alias || seriesInfo.query)+
|
(decodeURIComponent(seriesInfo.alias)) +
|
||||||
'</small><br>';
|
'</small><br>';
|
||||||
} else {
|
} else {
|
||||||
group = kbn.query_color_dot(item.series.color, 15) + ' ';
|
group = kbn.query_color_dot(item.series.color, 15) + ' ';
|
||||||
|
6
src/app/filters/all.js
Normal file → Executable file
6
src/app/filters/all.js
Normal file → Executable file
@ -114,4 +114,10 @@ define(['angular', 'jquery', 'underscore', 'moment'], function (angular, $, _, m
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
module.filter('urlDecode', function() {
|
||||||
|
return function(input) {
|
||||||
|
return decodeURIComponent(input);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
2
src/app/panels/filtering/module.html
Normal file → Executable file
2
src/app/panels/filtering/module.html
Normal file → Executable file
@ -17,7 +17,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li ng-repeat="option in filter.options">
|
<li ng-repeat="option in filter.options">
|
||||||
<a ng-click="filterOptionSelected(filter, option)">{{option.text}}</a>
|
<a ng-click="filterOptionSelected(filter, option)">{{option.text | urlDecode}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
2
src/app/panels/graphite/legend.html
Normal file → Executable file
2
src/app/panels/graphite/legend.html
Normal file → Executable file
@ -9,7 +9,7 @@
|
|||||||
</i>
|
</i>
|
||||||
<span class='small histogram-legend-item'>
|
<span class='small histogram-legend-item'>
|
||||||
<a ng-click="toggleSeries(series, $event)" data-unique="1" data-placement="{{series.yaxis === 2 ? 'bottomRight' : 'bottomLeft'}}">
|
<a ng-click="toggleSeries(series, $event)" data-unique="1" data-placement="{{series.yaxis === 2 ? 'bottomRight' : 'bottomLeft'}}">
|
||||||
{{series.alias}}
|
{{series.alias | urlDecode}}
|
||||||
</a>
|
</a>
|
||||||
<span ng-if="panel.legend.values">
|
<span ng-if="panel.legend.values">
|
||||||
<span ng-show="panel.legend.current">
|
<span ng-show="panel.legend.current">
|
||||||
|
0
src/app/partials/graphite/editor.html
Normal file → Executable file
0
src/app/partials/graphite/editor.html
Normal file → Executable file
@ -69,6 +69,11 @@ function (_) {
|
|||||||
category: categories.Combine,
|
category: categories.Combine,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
addFuncDef({
|
||||||
|
name: 'isNonNull',
|
||||||
|
category: categories.Combine,
|
||||||
|
});
|
||||||
|
|
||||||
addFuncDef({
|
addFuncDef({
|
||||||
name: 'rangeOfSeries',
|
name: 'rangeOfSeries',
|
||||||
category: categories.Combine
|
category: categories.Combine
|
||||||
|
@ -118,7 +118,7 @@ function (angular, _, $, config, kbn, moment) {
|
|||||||
GraphiteDatasource.prototype.metricFindQuery = function(filterSrv, query) {
|
GraphiteDatasource.prototype.metricFindQuery = function(filterSrv, query) {
|
||||||
var interpolated;
|
var interpolated;
|
||||||
try {
|
try {
|
||||||
interpolated = filterSrv.applyTemplateToTarget(query);
|
interpolated = encodeURIComponent(filterSrv.applyTemplateToTarget(query));
|
||||||
}
|
}
|
||||||
catch(err) {
|
catch(err) {
|
||||||
return $q.reject(err);
|
return $q.reject(err);
|
||||||
|
@ -124,6 +124,7 @@ define([
|
|||||||
i === 45 || // -
|
i === 45 || // -
|
||||||
i === 42 || // *
|
i === 42 || // *
|
||||||
i === 58 || // :
|
i === 58 || // :
|
||||||
|
i === 37 || // %
|
||||||
i >= 97 && i <= 122; // a-z
|
i >= 97 && i <= 122; // a-z
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user