diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b8cd4f7128..a67f45e69ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,16 @@ -# 3.0.0-beta6 (unreleased) +# 3.0.0-beta7 (2016-05-02) + +### Bug fixes +* **Dashboard title**: Fixed max dashboard title width (media query) for large screens, fixes [#4859](https://github.com/grafana/grafana/issues/4859) +* **Annotations**: Fixed issue with entering annotation edit view, fixes [#4857](https://github.com/grafana/grafana/issues/4857) +* **Remove query**: Fixed issue with removing query for data sources without collapsable query editors, fixes [#4856](https://github.com/grafana/grafana/issues/4856) +* **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 * **Singlestat**: Support for gauges in singlestat panel. closes [#3688](https://github.com/grafana/grafana/pull/3688) diff --git a/docker/blocks/influxdb/fig b/docker/blocks/influxdb/fig index 931f8a2640a..c537a74b003 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/docs/mkdocs.yml b/docs/mkdocs.yml index 46b0b964b59..ff88133dfdd 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,5 +1,4 @@ site_name: Grafana Documentation -#site_url: http://docs.grafana.com/ site_url: / site_description: Documentation for Grafana, The Graphite and Influxdb dashboard and graph composer site_favicon: img/fav32.png @@ -46,6 +45,7 @@ pages: - ['guides/basic_concepts.md', 'User Guides', 'Basic Concepts'] - ['guides/gettingstarted.md', 'User Guides', 'Getting Started'] +- ['guides/whats-new-in-v3.md', 'User Guides', "What's New in Grafana v3.0"] - ['guides/whats-new-in-v2-6.md', 'User Guides', "What's New in Grafana v2.6"] - ['guides/whats-new-in-v2-5.md', 'User Guides', "What's New in Grafana v2.5"] - ['guides/whats-new-in-v2-1.md', 'User Guides', "What's New in Grafana v2.1"] diff --git a/docs/sources/guides/whats-new-in-v3.md b/docs/sources/guides/whats-new-in-v3.md new file mode 100644 index 00000000000..eb1030f8f31 --- /dev/null +++ b/docs/sources/guides/whats-new-in-v3.md @@ -0,0 +1,196 @@ +--- +page_title: What's New in Grafana v3.0 +page_description: What's new in Grafana v3.0 +page_keywords: grafana, new, changes, features, documentation +--- + +# What's New in Grafana v3.0 + +## Commercial Support + +Commercial Support subscriptions for Grafana are now [generally available](https://grafana.net/support/plans/). + +Raintank is committed to a 100% open-source strategy for Grafana. We +do not want to go down the “open core” route. If your organization +finds Grafana valuable, please consider purchasing a subscription. Get +direct support, bug fixes, and training from the core Grafana team. + +## Plugins + +With the popularity of Grafana continuing to accelerate, it has been +challenging to keep up with all the requests for new features, new +panels, new data sources, and new functionality. Saying “no” so often +has been frustrating, especially for an open source project with such +a vibrant community. + +The team felt that it was time to dramatically improve extensibility +through plugin support. Grafana 3.0 comes with a completely revamped +plugin SDK / API. + +We’ve refactored our **Data Source** plugin architecture and added +two new plugin types: + +* **Panel** plugins let you add new panel types for your Dashboards. +* **App** plugins bundle **Panels** plugins, **Data Sources** plugins, +Dashboards, and Grafana **Pages**. Apps are a great way to provide an +entire experience right within Grafana. + +## Grafana.net + + + +A preview of [Grafana.net](http://grafana.net) is launching along with this release. We +think it’s the perfect compliment to Grafana. + +Grafana.net currently offers a central repository where the community +can come together to discover and share plugins (Data Sources, Panels, +Apps) and Dashboards for Grafana 3.0 and above. + +We are also working on a hosted Graphite-compatible Data Source that +will be optimized for use with Grafana. It’ll be easy to combine your +existing Data Source(s) with this OpenSaaS option. + +Finally, Grafana.net will also be a hub to manage all your Grafana +instances. You’ll be able to monitor their health and availability, +perform Dashboard backups, and more. + +Grafana.net will officially launch along with the stable version of +Grafana 3.0, but check out the preview +and sign up for an account in the meantime. + + +## grafana-cli + +Grafana 3.0 comes with a new command line tool called grafana-cli. You +can easily install plugins from Grafana.net with it. For +example: + + +``` +grafana-cli install grafana-pie-chart-panel +``` + +## Personalization & Preferences + +The home dashboard, timezone and theme can now be customized on Organization +and user Profile level. Grafana can also track recently viewed dashboards, which +can then be displayed in the dashboard list panel. + +## Improved Playlists + +You can now save Playlists, and start them by using a Playlist URL. If +you update a running Playlist, it will update after its next cycle. + +This is powerful as it allows you to remote control Grafana. If you +have a big TV display showing Grafana in your company lobby, create a +playlist named Lobby, and start it on the computer connected to the +Lobby TV. + +You can now change the Lobby playlist and have the dashboards shown in +the Lobby update accordingly, automatically. + +The playlist does not even have to contain multiple Dashboards; you +can use this feature to reload the whole Dashboard (and Grafana) +periodically and remotely. + +You can also make Playlists dynamic by using Dashboard **tags** to +define the Playlist. + + + +## Improved UI + +We’ve always tried to focus on a good looking, usable, and responsive +UI. We’ve continued to pay a lot of attention to these areas in this +release. + +Grafana 3.0 has a dramatically updated UI that not only looks better +but also has a number of usability improvements. The side menu now +works as a dropdown that you can pin to the side. The Organization / +Profile / Sign out side menu links have been combined into an on hover +slide out menu. + +In addition, all the forms and the layouts of all pages have been +updated to look and flow better, and be much more consistent. There +are literally hundreds of UI improvements and refinements. + +Here’s the new side menu in action: + + + +And here's the new look for Dashboard settings: + + + +Check out the Play +Site to get a feel for some of the UI changes. + +## Improved Annotations + +It is now possible to define a link in each annotation. You can hover +over the link and click the annotation text. This feature is very +useful for linking to particular commits or tickets where more +detailed information can be presented to the user. + + + +## Data source variables + +This has been a top requested feature for very long we are exited to finally provide +this feature. You can now add a new `Data source` type variable. That will +automatically be filled with instance names of your data sources. + + + +You can then use this variable as the panel data source: + + + +This will allow you to quickly change data source server and reuse the +same dashboard for different instances of your metrics backend. For example +you might have Graphite running in multiple data centers or environments. + +## Prometheus, InfluxDB, and OpenTSDB improvements + +All three of these popular included Data Sources have seen a variety +of improvements in this release. Here are some highlights: + +### Prometheus + +The Prometheus Data Source now supports annotations. + +### InfluxDB + +You can now select the InfluxDB policy from the query editor. + + +Grafana 3.0 also comes with support for InfluxDB 0.11 and InfluxDB 0.12. + +### OpenTSDB + +OpenTSDB 2.2 is better supported and now supports millisecond precision. + +## Breaking changes + +Dashboards from v2.6 are compatible; no manual updates should be necessary. There could +be some edge case scenarios where dashboards using templating could stop working. +If that is the case just enter the edit view for the template variable and hit Update button. +This is due to a simplification of the variable format system where template variables are +now stored without any formatting (glob/regex/etc), this is done on the fly when the +variable is interpolated. + +* Plugin API: The plugin API has changed so if you are using a custom +data source (or panel) they need to be updated as well. + +* InfluxDB 0.8: This data source is no longer included in releases, +you can still install manually from [Grafana.net](http://grafana.net) + +* KairosDB: This data source has also no longer shipped with Grafana, +you can install it manually from [Grafana.net](http://grafana.net) + +## CHANGELOG + +For a detailed list and link to github issues for everything included +in the 3.0 release please view the +[CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) +file. diff --git a/docs/sources/installation/debian.md b/docs/sources/installation/debian.md index bb870f026f3..cac6a7c92b8 100644 --- a/docs/sources/installation/debian.md +++ b/docs/sources/installation/debian.md @@ -11,7 +11,7 @@ page_keywords: grafana, installation, debian, ubuntu, guide Description | Download ------------ | ------------- Stable .deb for Debian-based Linux | [grafana_2.6.0_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_2.6.0_amd64.deb) -Beta .deb for Debian-based Linux | [grafana_3.0.0-beta61461918338_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta61461918338_amd64.deb) +Beta .deb for Debian-based Linux | [grafana_3.0.0-beta71462173753_amd64.deb](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta71462173753_amd64.deb) ## Install Stable @@ -21,9 +21,9 @@ Beta .deb for Debian-based Linux | [grafana_3.0.0-beta61461918338_amd64.deb](h ## Install 3.0 Beta - $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta61461918338_amd64.deb + $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.0-beta71462173753_amd64.deb $ sudo apt-get install -y adduser libfontconfig - $ sudo dpkg -i grafana_3.0.0-beta61461918338_amd64.deb + $ sudo dpkg -i grafana_3.0.0-beta71462173753_amd64.deb ## APT Repository diff --git a/docs/sources/installation/rpm.md b/docs/sources/installation/rpm.md index f6a7ebb9c3a..744cafe93db 100644 --- a/docs/sources/installation/rpm.md +++ b/docs/sources/installation/rpm.md @@ -11,7 +11,7 @@ page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide Description | Download ------------ | ------------- Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [grafana-2.6.0-1.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm) -Beta .RPM for CentOS / Fedor / OpenSuse / Redhat Linux | [grafana-3.0.0-beta61461918338.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta61461918338§.x86_64.rpm) +Beta .RPM for CentOS / Fedor / OpenSuse / Redhat Linux | [grafana-3.0.0-beta71462173753.x86_64.rpm](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta71462173753.x86_64.rpm) ## Install Stable Release from package file @@ -34,18 +34,18 @@ Or install manually using `rpm`. You can install Grafana using Yum directly. - $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta61461918338.x86_64.rpm + $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.0-beta71462173753.x86_64.rpm Or install manually using `rpm`. #### On CentOS / Fedora / Redhat: $ sudo yum install initscripts fontconfig - $ sudo rpm -Uvh grafana-3.0.0-beta61461918338.x86_64.rpm + $ sudo rpm -Uvh grafana-3.0.0-beta71462173753.x86_64.rpm #### On OpenSuse: - $ sudo rpm -i --nodeps grafana-3.0.0-beta61461918338.x86_64.rpm + $ sudo rpm -i --nodeps grafana-3.0.0-beta71462173753.x86_64.rpm ## Install via YUM Repository diff --git a/latest.json b/latest.json index 9354661781a..8ddb446ec44 100644 --- a/latest.json +++ b/latest.json @@ -1,4 +1,4 @@ { "stable": "2.6.0", - "testing": "3.0.0-beta5" + "testing": "3.0.0-beta7" } diff --git a/package.json b/package.json index e314476f999..8b9ec906ed9 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "3.0.0-beta6", + "version": "3.0.0-beta7", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git" @@ -26,7 +26,6 @@ "grunt-contrib-cssmin": "~0.14.0", "grunt-contrib-htmlmin": "~0.6.0", "grunt-contrib-jshint": "~1.0.0", - "grunt-contrib-less": "~0.7.0", "grunt-contrib-uglify": "~0.11.0", "grunt-contrib-watch": "^0.6.1", "grunt-filerev": "^0.2.1", diff --git a/public/app/core/services/datasource_srv.js b/public/app/core/services/datasource_srv.js index 2c3a043ac6c..32bc9a39725 100644 --- a/public/app/core/services/datasource_srv.js +++ b/public/app/core/services/datasource_srv.js @@ -66,7 +66,7 @@ function (angular, _, coreModule, config) { }; this.getAnnotationSources = function() { - return _.reduce(config.datasources, function(memo, key, value) { + return _.reduce(config.datasources, function(memo, value) { if (value.meta && value.meta.annotations) { memo.push(value); diff --git a/public/app/features/dashboard/dashboardSrv.js b/public/app/features/dashboard/dashboardSrv.js index 89c09ac551a..2e1cd1acbf0 100644 --- a/public/app/features/dashboard/dashboardSrv.js +++ b/public/app/features/dashboard/dashboardSrv.js @@ -184,6 +184,7 @@ function (angular, $, _, moment) { p.formatDate = function(date, format) { date = moment.isMoment(date) ? date : moment(date); format = format || 'YYYY-MM-DD HH:mm:ss'; + this.timezone = this.getTimezone(); return this.timezone === 'browser' ? moment(date).format(format) : diff --git a/public/app/features/dashboard/exporter.ts b/public/app/features/dashboard/exporter.ts index 04f4e0a203d..c1f5a13fd9b 100644 --- a/public/app/features/dashboard/exporter.ts +++ b/public/app/features/dashboard/exporter.ts @@ -49,7 +49,7 @@ export class DashboardExporter { return this.makeExportable(dashboard).then(clean => { var blob = new Blob([angular.toJson(clean, true)], { type: "application/json;charset=utf-8" }); var wnd: any = window; - wnd.saveAs(blob, clean.title + '-' + new Date().getTime()); + wnd.saveAs(blob, clean.title + '-' + new Date().getTime() + '.json'); }); } diff --git a/public/app/features/panel/query_editor_row.ts b/public/app/features/panel/query_editor_row.ts index 84cc597e388..76bdd6d8539 100644 --- a/public/app/features/panel/query_editor_row.ts +++ b/public/app/features/panel/query_editor_row.ts @@ -79,7 +79,10 @@ export class QueryRowCtrl { } removeQuery() { - delete this.panelCtrl.__collapsedQueryCache[this.target.refId]; + if (this.panelCtrl.__collapsedQueryCache) { + delete this.panelCtrl.__collapsedQueryCache[this.target.refId]; + } + this.panel.targets = _.without(this.panel.targets, this.target); this.panelCtrl.refresh(); } diff --git a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html index 4f2225e8cce..75979226963 100644 --- a/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html +++ b/public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html @@ -54,7 +54,7 @@
- +
diff --git a/public/app/plugins/datasource/graphite/datasource.ts b/public/app/plugins/datasource/graphite/datasource.ts index 515cd490937..77d44be22e0 100644 --- a/public/app/plugins/datasource/graphite/datasource.ts +++ b/public/app/plugins/datasource/graphite/datasource.ts @@ -31,7 +31,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv } if (options.format === 'png') { - return $q.when(this.url + '/render' + '?' + params.join('&')); + return $q.when({data: this.url + '/render' + '?' + params.join('&')}); } var httpOptions: any = {method: this.render_method, url: '/render'}; diff --git a/public/app/plugins/datasource/influxdb/influx_query.ts b/public/app/plugins/datasource/influxdb/influx_query.ts index 301d40a2edb..ff003859277 100644 --- a/public/app/plugins/datasource/influxdb/influx_query.ts +++ b/public/app/plugins/datasource/influxdb/influx_query.ts @@ -152,7 +152,7 @@ export default class InfluxQuery { if (interpolate) { value = this.templateSrv.replace(value, this.scopedVars); } - if (isNaN(+value)) { + if (operator !== '>' && operator !== '<') { value = "'" + value.replace('\\', '\\\\') + "'"; } } else if (interpolate){ diff --git a/public/app/plugins/datasource/influxdb/partials/query.editor.html b/public/app/plugins/datasource/influxdb/partials/query.editor.html index c2efe3093f4..c3a52531ef1 100644 --- a/public/app/plugins/datasource/influxdb/partials/query.editor.html +++ b/public/app/plugins/datasource/influxdb/partials/query.editor.html @@ -70,6 +70,10 @@
+
+ +
+
diff --git a/public/app/plugins/datasource/influxdb/query_part.ts b/public/app/plugins/datasource/influxdb/query_part.ts index 922440bd482..63d70be5653 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, diff --git a/public/app/plugins/datasource/influxdb/specs/influx_query_specs.ts b/public/app/plugins/datasource/influxdb/specs/influx_query_specs.ts index 157b9ed206a..557c626a7cc 100644 --- a/public/app/plugins/datasource/influxdb/specs/influx_query_specs.ts +++ b/public/app/plugins/datasource/influxdb/specs/influx_query_specs.ts @@ -101,6 +101,19 @@ describe('InfluxQuery', function() { }); }); + describe('query with value condition', function() { + it('should not quote value', function() { + var query = new InfluxQuery({ + measurement: 'cpu', + groupBy: [], + tags: [{key: 'value', value: '5', operator: '>'}] + }, templateSrv, {}); + + var queryText = query.render(); + expect(queryText).to.be('SELECT mean("value") FROM "cpu" WHERE "value" > 5 AND $timeFilter'); + }); + }); + describe('series with groupByTag', function() { it('should generate correct query', function() { var query = new InfluxQuery({ diff --git a/public/app/plugins/datasource/opentsdb/partials/query.editor.html b/public/app/plugins/datasource/opentsdb/partials/query.editor.html index 4683f9c300a..e4e8fc8e09f 100644 --- a/public/app/plugins/datasource/opentsdb/partials/query.editor.html +++ b/public/app/plugins/datasource/opentsdb/partials/query.editor.html @@ -81,6 +81,7 @@ @@ -125,7 +126,7 @@
- +
@@ -137,7 +138,11 @@
- +