feat(influxdb): adds spread functionallity

closes #5211
This commit is contained in:
bergquist 2016-05-30 14:23:24 +02:00
parent f8a535c6e8
commit 2edb0ad94d
3 changed files with 19 additions and 0 deletions

View File

@ -7,6 +7,7 @@
* **Graph**: Adds sort order options for graph tooltip, closes [#1189](https://github.com/grafana/grafana/issues/1189)
* **Theme**: Add default theme to config file [#5011](https://github.com/grafana/grafana/pull/5011)
* **Page Footer**: Added page footer with links to docs, shows Grafana version and info if new version is available, closes [#4889](https://github.com/grafana/grafana/pull/4889)
* **InfluxDB**: Add spread function, closes [#5211](https://github.com/grafana/grafana/issues/5211)
# 3.0.4 Patch release (2016-05-25)
* **Panel**: Fixed blank dashboard issue when switching to other dashboard while in fullscreen edit mode, fixes [#5163](https://github.com/grafana/grafana/pull/5163)

View File

@ -230,6 +230,15 @@ QueryPartDef.register({
renderer: functionRenderer,
});
QueryPartDef.register({
type: 'spread',
addStrategy: addTransformationStrategy,
category: categories.Transformations,
params: [],
defaultParams: [],
renderer: functionRenderer,
});
QueryPartDef.register({
type: 'non_negative_derivative',
addStrategy: addTransformationStrategy,

View File

@ -16,6 +16,15 @@ describe('InfluxQueryPart', () => {
expect(part.render('mean(value)')).to.be('derivative(mean(value), 10s)');
});
it('should nest spread function', () => {
var part = queryPart.create({
type: 'spread'
});
expect(part.text).to.be('spread()');
expect(part.render('value')).to.be('spread(value)');
});
it('should handle suffirx parts', () => {
var part = queryPart.create({
type: 'math',