diff --git a/CHANGELOG.md b/CHANGELOG.md index a33a38140514c..3cfe94cdf06f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ * **Graphite PNG*: Fixed issue graphite png rendering option, fixes [#4864](https://github.com/grafana/grafana/issues/4864) * **InfluxDB**: Fixed issue missing plus group by iconn, fixes [#4862](https://github.com/grafana/grafana/issues/4862) +### Enhancements +* **InfluxDB**: Added new functions moving_average and difference to query editor, closes [#4698](https://github.com/grafana/grafana/issues/4698) + # 3.0.0-beta6 (2016-04-29) ### Enhancements diff --git a/docker/blocks/influxdb/fig b/docker/blocks/influxdb/fig index 931f8a2640ab7..c537a74b00360 100644 --- a/docker/blocks/influxdb/fig +++ b/docker/blocks/influxdb/fig @@ -1,5 +1,5 @@ influxdb: - image: tutum/influxdb:latest + image: tutum/influxdb:0.12 ports: - "2004:2004" - "8083:8083" diff --git a/public/app/plugins/datasource/influxdb/query_part.ts b/public/app/plugins/datasource/influxdb/query_part.ts index 922440bd482ff..63d70be5653e5 100644 --- a/public/app/plugins/datasource/influxdb/query_part.ts +++ b/public/app/plugins/datasource/influxdb/query_part.ts @@ -239,6 +239,24 @@ QueryPartDef.register({ renderer: functionRenderer, }); +QueryPartDef.register({ + type: 'difference', + addStrategy: addTransformationStrategy, + category: categories.Transformations, + params: [], + defaultParams: [], + renderer: functionRenderer, +}); + +QueryPartDef.register({ + type: 'moving_average', + addStrategy: addTransformationStrategy, + category: categories.Transformations, + params: [{ name: "window", type: "number", options: [5, 10, 20, 30, 40]}], + defaultParams: [10], + renderer: functionRenderer, +}); + QueryPartDef.register({ type: 'stddev', addStrategy: addTransformationStrategy,