From b73d196c6b9b2012541adbeffb2c536c60deda56 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 22 Mar 2016 14:30:06 +0100 Subject: [PATCH 1/5] feat(influxdb): add support for 0.11.0 tags this change is backwards compatible. closes #4392 --- public/app/plugins/datasource/influxdb/datasource.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/influxdb/datasource.ts b/public/app/plugins/datasource/influxdb/datasource.ts index 1136c9709bd..f1dff01f95d 100644 --- a/public/app/plugins/datasource/influxdb/datasource.ts +++ b/public/app/plugins/datasource/influxdb/datasource.ts @@ -109,7 +109,7 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv) return $q.reject(err); } - return this._seriesQuery(interpolated).then(function (results) { + return this._seriesQuery(interpolated).then((results) => { if (!results || results.results.length === 0) { return []; } var influxResults = results.results[0]; @@ -118,9 +118,9 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv) } var series = influxResults.series[0]; - return _.map(series.values, function(value) { + return _.map(series.values, (value) => { if (_.isArray(value)) { - return { text: value[0] }; + return { text: this.getValueBasedOnInfluxVersion(value) }; } else { return { text: value }; } @@ -128,6 +128,12 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv) }); }; + this.getValueBasedOnInfluxVersion = function(value) { + //influxdb 0.10.0 sends the value in first position + //influxdb 0.11.0 sends the value in second position + return value[1] || value[0]; + }; + this._seriesQuery = function(query) { return this._influxRequest('GET', '/query', {q: query, epoch: 'ms'}); }; From 4c5291f941a0217d46e6383cc30de78a2ae6badc Mon Sep 17 00:00:00 2001 From: Matt Toback Date: Tue, 22 Mar 2016 10:21:47 -0400 Subject: [PATCH 2/5] Updated card views to accommodate a 2 column layout at lg breakpoints --- public/sass/components/_cards.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/public/sass/components/_cards.scss b/public/sass/components/_cards.scss index 0d4d1ae88c9..582e782ce9a 100644 --- a/public/sass/components/_cards.scss +++ b/public/sass/components/_cards.scss @@ -99,6 +99,10 @@ .card-list-layout-grid { + .card-item-header-action { + float: right; + } + .card-item-wrapper { width: 100%; padding: 0 1.5rem 1.5rem 0rem; @@ -128,6 +132,14 @@ width: 33.333333%; } } + + &.card-list-layout-grid--max-2-col { + @include media-breakpoint-up(lg) { + .card-item-wrapper { + width: 50%; + } + } + } } .card-list-layout-list { From 83b73973980bceaf55634745807a4b848d3a9504 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 22 Mar 2016 16:04:54 +0100 Subject: [PATCH 3/5] Revert "feat(influxdb): add support for 0.11.0 tags" This reverts commit b73d196c6b9b2012541adbeffb2c536c60deda56. --- public/app/plugins/datasource/influxdb/datasource.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/public/app/plugins/datasource/influxdb/datasource.ts b/public/app/plugins/datasource/influxdb/datasource.ts index f1dff01f95d..1136c9709bd 100644 --- a/public/app/plugins/datasource/influxdb/datasource.ts +++ b/public/app/plugins/datasource/influxdb/datasource.ts @@ -109,7 +109,7 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv) return $q.reject(err); } - return this._seriesQuery(interpolated).then((results) => { + return this._seriesQuery(interpolated).then(function (results) { if (!results || results.results.length === 0) { return []; } var influxResults = results.results[0]; @@ -118,9 +118,9 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv) } var series = influxResults.series[0]; - return _.map(series.values, (value) => { + return _.map(series.values, function(value) { if (_.isArray(value)) { - return { text: this.getValueBasedOnInfluxVersion(value) }; + return { text: value[0] }; } else { return { text: value }; } @@ -128,12 +128,6 @@ export function InfluxDatasource(instanceSettings, $q, backendSrv, templateSrv) }); }; - this.getValueBasedOnInfluxVersion = function(value) { - //influxdb 0.10.0 sends the value in first position - //influxdb 0.11.0 sends the value in second position - return value[1] || value[0]; - }; - this._seriesQuery = function(query) { return this._influxRequest('GET', '/query', {q: query, epoch: 'ms'}); }; From bbc4c361bb0249d7d05594c0182a3219b53df4e7 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 22 Mar 2016 17:23:15 +0100 Subject: [PATCH 4/5] fix(npm): updates phantomjs requirement --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 887c41650d2..0ef4d95b7fd 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "karma-phantomjs-launcher": "0.2.1", "load-grunt-tasks": "3.4.0", "mocha": "2.3.4", - "phantomjs": "~2.1.3", + "phantomjs": "^2.1.3", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.0", "sass-lint": "^1.5.0", From 185438145607b2464e40f41f304e600f45f68bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 22 Mar 2016 18:32:08 +0100 Subject: [PATCH 5/5] tech(): updated es6-shim, removed es5-shim, no longer needed as we upraded phantomjs to 2.x, also removed es6-promise, dont think we need it --- package.json | 2 +- public/views/index.html | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 0ef4d95b7fd..40cf48950d4 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "angular2": "2.0.0-beta.0", "autoprefixer": "^6.3.3", "es6-promise": "^3.0.2", - "es6-shim": "^0.33.3", + "es6-shim": "^0.35.0", "expect.js": "~0.2.0", "glob": "~3.2.7", "grunt": "~0.4.0", diff --git a/public/views/index.html b/public/views/index.html index 49bfe2c5bb9..c4bffae5019 100644 --- a/public/views/index.html +++ b/public/views/index.html @@ -51,9 +51,7 @@ - -