Browse Source

Merge branch 'master' into export-dashboard

Conflicts:
	public/app/features/dashboard/dashnav/dashnav.ts
Torkel Ödegaard 9 years ago
parent
commit
f42b47e65b

+ 13 - 1
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
 ### Enhancements
 * **Singlestat**: Support for gauges in singlestat panel. closes [#3688](https://github.com/grafana/grafana/pull/3688)
 * **Singlestat**: Support for gauges in singlestat panel. closes [#3688](https://github.com/grafana/grafana/pull/3688)

+ 1 - 1
docker/blocks/influxdb/fig

@@ -1,5 +1,5 @@
 influxdb:
 influxdb:
-  image: tutum/influxdb:latest
+  image: tutum/influxdb:0.12
   ports:
   ports:
     - "2004:2004"
     - "2004:2004"
     - "8083:8083"
     - "8083:8083"

+ 1 - 1
docs/mkdocs.yml

@@ -1,5 +1,4 @@
 site_name: Grafana Documentation
 site_name: Grafana Documentation
-#site_url: http://docs.grafana.com/
 site_url: /
 site_url: /
 site_description: Documentation for Grafana, The Graphite and Influxdb dashboard and graph composer
 site_description: Documentation for Grafana, The Graphite and Influxdb dashboard and graph composer
 site_favicon: img/fav32.png
 site_favicon: img/fav32.png
@@ -46,6 +45,7 @@ pages:
 
 
 - ['guides/basic_concepts.md', 'User Guides', 'Basic Concepts']
 - ['guides/basic_concepts.md', 'User Guides', 'Basic Concepts']
 - ['guides/gettingstarted.md', 'User Guides', 'Getting Started']
 - ['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-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-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"]
 - ['guides/whats-new-in-v2-1.md', 'User Guides', "What's New in Grafana v2.1"]

+ 196 - 0
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
+
+<img src="/img/v3/grafana_net_tour.png">
+
+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 <a href=http://www.grafana.net>check out the preview
+and sign up for an account</a> 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.
+
+<img src="/img/v3/playlist.png">
+
+## 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:
+
+<img src="/img/v3/menu.gif">
+
+And here's the new look for Dashboard settings:
+
+<img src="/img/v3/dashboard_settings.png">
+
+Check out the <a href="http://play.grafana.org" target="_blank">Play
+Site</a> 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.
+
+<img src="/img/v3/annotation_links.gif">
+
+## 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.
+
+<img src="/img/v3/data_source_variable.png">
+
+You can then use this variable as the panel data source:
+
+<img src="/img/v3/data_source_variable_use.png">
+
+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.
+<img src="/img/v3/influxdb_policy.png">
+
+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.

+ 3 - 3
docs/sources/installation/debian.md

@@ -11,7 +11,7 @@ page_keywords: grafana, installation, debian, ubuntu, guide
 Description | Download
 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)
 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
 ## Install Stable
 
 
@@ -21,9 +21,9 @@ Beta .deb for Debian-based Linux |   [grafana_3.0.0-beta61461918338_amd64.deb](h
 
 
 ## Install 3.0 Beta
 ## 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 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
 ## APT Repository
 
 

+ 4 - 4
docs/sources/installation/rpm.md

@@ -11,7 +11,7 @@ page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide
 Description | Download
 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)
 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
 ## Install Stable Release from package file
 
 
@@ -34,18 +34,18 @@ Or install manually using `rpm`.
 
 
 You can install Grafana using Yum directly.
 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`.
 Or install manually using `rpm`.
 
 
 #### On CentOS / Fedora / Redhat:
 #### On CentOS / Fedora / Redhat:
 
 
     $ sudo yum install initscripts fontconfig
     $ 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:
 #### 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
 ## Install via YUM Repository

+ 1 - 1
latest.json

@@ -1,4 +1,4 @@
 {
 {
   "stable": "2.6.0",
   "stable": "2.6.0",
-	"testing": "3.0.0-beta5"
+	"testing": "3.0.0-beta7"
 }
 }

+ 1 - 2
package.json

@@ -4,7 +4,7 @@
     "company": "Coding Instinct AB"
     "company": "Coding Instinct AB"
   },
   },
   "name": "grafana",
   "name": "grafana",
-  "version": "3.0.0-beta6",
+  "version": "3.0.0-beta7",
   "repository": {
   "repository": {
     "type": "git",
     "type": "git",
     "url": "http://github.com/grafana/grafana.git"
     "url": "http://github.com/grafana/grafana.git"
@@ -26,7 +26,6 @@
     "grunt-contrib-cssmin": "~0.14.0",
     "grunt-contrib-cssmin": "~0.14.0",
     "grunt-contrib-htmlmin": "~0.6.0",
     "grunt-contrib-htmlmin": "~0.6.0",
     "grunt-contrib-jshint": "~1.0.0",
     "grunt-contrib-jshint": "~1.0.0",
-    "grunt-contrib-less": "~0.7.0",
     "grunt-contrib-uglify": "~0.11.0",
     "grunt-contrib-uglify": "~0.11.0",
     "grunt-contrib-watch": "^0.6.1",
     "grunt-contrib-watch": "^0.6.1",
     "grunt-filerev": "^0.2.1",
     "grunt-filerev": "^0.2.1",

+ 1 - 1
public/app/core/services/datasource_srv.js

@@ -66,7 +66,7 @@ function (angular, _, coreModule, config) {
     };
     };
 
 
     this.getAnnotationSources = function() {
     this.getAnnotationSources = function() {
-      return _.reduce(config.datasources, function(memo, key, value) {
+      return _.reduce(config.datasources, function(memo, value) {
 
 
         if (value.meta && value.meta.annotations) {
         if (value.meta && value.meta.annotations) {
           memo.push(value);
           memo.push(value);

+ 1 - 0
public/app/features/dashboard/dashboardSrv.js

@@ -184,6 +184,7 @@ function (angular, $, _, moment) {
     p.formatDate = function(date, format) {
     p.formatDate = function(date, format) {
       date = moment.isMoment(date) ? date : moment(date);
       date = moment.isMoment(date) ? date : moment(date);
       format = format || 'YYYY-MM-DD HH:mm:ss';
       format = format || 'YYYY-MM-DD HH:mm:ss';
+      this.timezone = this.getTimezone();
 
 
       return this.timezone === 'browser' ?
       return this.timezone === 'browser' ?
         moment(date).format(format) :
         moment(date).format(format) :

+ 1 - 1
public/app/features/dashboard/exporter.ts

@@ -49,7 +49,7 @@ export class DashboardExporter {
     return this.makeExportable(dashboard).then(clean => {
     return this.makeExportable(dashboard).then(clean => {
       var blob = new Blob([angular.toJson(clean, true)], { type: "application/json;charset=utf-8" });
       var blob = new Blob([angular.toJson(clean, true)], { type: "application/json;charset=utf-8" });
       var wnd: any = window;
       var wnd: any = window;
-      wnd.saveAs(blob, clean.title + '-' + new Date().getTime());
+      wnd.saveAs(blob, clean.title + '-' + new Date().getTime() + '.json');
     });
     });
   }
   }
 
 

+ 4 - 1
public/app/features/panel/query_editor_row.ts

@@ -79,7 +79,10 @@ export class QueryRowCtrl {
   }
   }
 
 
   removeQuery() {
   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.panel.targets = _.without(this.panel.targets, this.target);
     this.panelCtrl.refresh();
     this.panelCtrl.refresh();
   }
   }

+ 1 - 1
public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html

@@ -54,7 +54,7 @@
 
 
 	<div ng-if="agg.type === 'terms'">
 	<div ng-if="agg.type === 'terms'">
 		<div class="gf-form offset-width-7">
 		<div class="gf-form offset-width-7">
-			<label class="gf-form-label">Order</label>
+			<label class="gf-form-label width-10">Order</label>
 			<metric-segment-model property="agg.settings.order" options="orderOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
 			<metric-segment-model property="agg.settings.order" options="orderOptions" on-change="onChangeInternal()" css-class="width-12"></metric-segment-model>
 		</div>
 		</div>
 
 

+ 1 - 1
public/app/plugins/datasource/graphite/datasource.ts

@@ -31,7 +31,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
     }
     }
 
 
     if (options.format === 'png') {
     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'};
     var httpOptions: any = {method: this.render_method, url: '/render'};

+ 1 - 1
public/app/plugins/datasource/influxdb/influx_query.ts

@@ -152,7 +152,7 @@ export default class InfluxQuery {
       if (interpolate) {
       if (interpolate) {
         value = this.templateSrv.replace(value, this.scopedVars);
         value = this.templateSrv.replace(value, this.scopedVars);
       }
       }
-      if (isNaN(+value)) {
+      if (operator !== '>' && operator !== '<') {
         value = "'" + value.replace('\\', '\\\\') + "'";
         value = "'" + value.replace('\\', '\\\\') + "'";
       }
       }
     } else if (interpolate){
     } else if (interpolate){

+ 4 - 0
public/app/plugins/datasource/influxdb/partials/query.editor.html

@@ -70,6 +70,10 @@
 				</influx-query-part-editor>
 				</influx-query-part-editor>
 			</div>
 			</div>
 
 
+			<div class="gf-form">
+				<metric-segment segment="ctrl.groupBySegment" get-options="ctrl.getGroupByOptions()" on-change="ctrl.groupByAction(part, $index)"></metric-segment>
+			</div>
+
 			<div class="gf-form gf-form--grow">
 			<div class="gf-form gf-form--grow">
 				<div class="gf-form-label gf-form-label--grow"></div>
 				<div class="gf-form-label gf-form-label--grow"></div>
 			</div>
 			</div>

+ 18 - 0
public/app/plugins/datasource/influxdb/query_part.ts

@@ -239,6 +239,24 @@ QueryPartDef.register({
   renderer: functionRenderer,
   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({
 QueryPartDef.register({
   type: 'stddev',
   type: 'stddev',
   addStrategy: addTransformationStrategy,
   addStrategy: addTransformationStrategy,

+ 13 - 0
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() {
   describe('series with groupByTag', function() {
     it('should generate correct query', function() {
     it('should generate correct query', function() {
       var query = new InfluxQuery({
       var query = new InfluxQuery({

+ 10 - 6
public/app/plugins/datasource/opentsdb/partials/query.editor.html

@@ -81,6 +81,7 @@
 
 
 		<gf-form-switch class="gf-form"
 		<gf-form-switch class="gf-form"
 										label="Disable downsampling"
 										label="Disable downsampling"
+                    label-class="query-keyword"
 										checked="ctrl.target.disableDownsampling"
 										checked="ctrl.target.disableDownsampling"
 										on-change="ctrl.targetBlur()">
 										on-change="ctrl.targetBlur()">
 		</gf-form-switch>
 		</gf-form-switch>
@@ -125,7 +126,7 @@
 			</div>
 			</div>
 
 
 			<div class="gf-form">
 			<div class="gf-form">
-				<label class="gf-form-label">Type</label>
+				<label class="gf-form-label query-keyword">Type</label>
 				<div class="gf-form-select-wrapper">
 				<div class="gf-form-select-wrapper">
 					<select ng-model="ctrl.target.currentFilterType" class="gf-form-input" ng-options="filType for filType in ctrl.filterTypes">
 					<select ng-model="ctrl.target.currentFilterType" class="gf-form-input" ng-options="filType for filType in ctrl.filterTypes">
 					</select>
 					</select>
@@ -137,7 +138,11 @@
 				</input>
 				</input>
 			</div>
 			</div>
 
 
-			<gf-form-switch class="gf-form" label="Group by" checked="ctrl.target.currentFilterGroupBy" on-change="ctrl.targetBlur()">
+      <gf-form-switch class="gf-form"
+                    label="Group by" 
+                    label-class="query-keyword"
+                    checked="ctrl.target.currentFilterGroupBy"
+                    on-change="ctrl.targetBlur()">
 			</gf-form-switch>
 			</gf-form-switch>
 
 
 			<div class="gf-form" ng-show="ctrl.addFilterMode">
 			<div class="gf-form" ng-show="ctrl.addFilterMode">
@@ -146,7 +151,6 @@
 						<i class="fa fa-warning"></i>
 						<i class="fa fa-warning"></i>
 					</a>
 					</a>
 				</label>
 				</label>
-
 				<label class="gf-form-label">
 				<label class="gf-form-label">
 					<a ng-click="ctrl.addFilter()" ng-hide="ctrl.errors.filters">add filter</a>
 					<a ng-click="ctrl.addFilter()" ng-hide="ctrl.errors.filters">add filter</a>
 					<a ng-click="ctrl.closeAddFilterMode()">
 					<a ng-click="ctrl.closeAddFilterMode()">
@@ -223,12 +227,12 @@
 		</gf-form-switch>
 		</gf-form-switch>
 
 
 		<gf-form-switch ng-hide="!ctrl.target.shouldComputeRate"
 		<gf-form-switch ng-hide="!ctrl.target.shouldComputeRate"
-										class="gf-form" label="Counter" checked="ctrl.target.isCounter" on-change="ctrl.targetBlur()">
+										class="gf-form" label="Counter" label-class="query-keyword" checked="ctrl.target.isCounter" on-change="ctrl.targetBlur()">
 		</gf-form-switch>
 		</gf-form-switch>
 
 
 
 
 		<div class="gf-form" ng-hide="!ctrl.target.isCounter || !ctrl.target.shouldComputeRate">
 		<div class="gf-form" ng-hide="!ctrl.target.isCounter || !ctrl.target.shouldComputeRate">
-			<label class="gf-form-label">Counter Max</label>
+			<label class="gf-form-label query-keyword">Counter Max</label>
 			<input type="text" class="gf-form-input"
 			<input type="text" class="gf-form-input"
 					 	 ng-disabled="!ctrl.target.shouldComputeRate"
 					 	 ng-disabled="!ctrl.target.shouldComputeRate"
 						 ng-model="ctrl.target.counterMax" spellcheck='false'
 						 ng-model="ctrl.target.counterMax" spellcheck='false'
@@ -236,7 +240,7 @@
 						 ng-blur="ctrl.targetBlur()">
 						 ng-blur="ctrl.targetBlur()">
 			</input>
 			</input>
 
 
-			<label class="gf-form-label">Reset Value</label>
+			<label class="gf-form-label query-keyword">Reset Value</label>
 			<input type="text" class="tight-form-input input-small"
 			<input type="text" class="tight-form-input input-small"
 					   ng-disabled="!ctrl.target.shouldComputeRate"
 					   ng-disabled="!ctrl.target.shouldComputeRate"
 						 ng-model="ctrl.target.counterResetValue" spellcheck='false'
 						 ng-model="ctrl.target.counterResetValue" spellcheck='false'

+ 4 - 1
public/app/plugins/datasource/prometheus/datasource.ts

@@ -63,11 +63,14 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
     var end = getPrometheusTime(options.range.to, true);
     var end = getPrometheusTime(options.range.to, true);
 
 
     var queries = [];
     var queries = [];
+    var activeTargets = [];
+
     options = _.clone(options);
     options = _.clone(options);
     _.each(options.targets, _.bind(function(target) {
     _.each(options.targets, _.bind(function(target) {
       if (!target.expr || target.hide) {
       if (!target.expr || target.hide) {
         return;
         return;
       }
       }
+      activeTargets.push(target);
 
 
       var query: any = {};
       var query: any = {};
       query.expr = templateSrv.replace(target.expr, options.scopedVars, interpolateQueryExpr);
       query.expr = templateSrv.replace(target.expr, options.scopedVars, interpolateQueryExpr);
@@ -109,7 +112,7 @@ export function PrometheusDatasource(instanceSettings, $q, backendSrv, templateS
         delete self.lastErrors.query;
         delete self.lastErrors.query;
 
 
         _.each(response.data.data.result, function(metricData) {
         _.each(response.data.data.result, function(metricData) {
-          result.push(self.transformMetricData(metricData, options.targets[index], start, end));
+          result.push(self.transformMetricData(metricData, activeTargets[index], start, end));
         });
         });
       });
       });
 
 

+ 1 - 1
public/sass/_old_responsive.scss

@@ -78,7 +78,7 @@
     }
     }
   }
   }
 
 
-  .dashnav-dashboards-btn a {
+  .page-dashboard .navbar-page-btn {
     max-width: none;
     max-width: none;
   }
   }
   .gf-timepicker-nav-btn {
   .gf-timepicker-nav-btn {