From e8fa60793dae9bfb26945573ae4d0ab61d2e99bd Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Fri, 27 Apr 2018 13:41:20 +0200 Subject: [PATCH 1/5] revert renaming of unit key ppm #11211 removed the unit key ppm in favor of conppm. A change which is not forward compatible. This commit revert the unit key back to ppm. Also adds some better error description if trying to use a unit which don't exists. Fixes #11743 (cherry picked from commit 138c8c348eaf209c59c72d478528006d6082e6d1) --- public/app/core/utils/kbn.ts | 4 ++-- public/app/plugins/panel/graph/graph.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/app/core/utils/kbn.ts b/public/app/core/utils/kbn.ts index 8c3e3e72dda..6e06ec8f2a3 100644 --- a/public/app/core/utils/kbn.ts +++ b/public/app/core/utils/kbn.ts @@ -595,7 +595,7 @@ kbn.valueFormats.radr = kbn.formatBuilders.decimalSIPrefix('R'); kbn.valueFormats.radsvh = kbn.formatBuilders.decimalSIPrefix('Sv/h'); // Concentration -kbn.valueFormats.conppm = kbn.formatBuilders.fixedUnit('ppm'); +kbn.valueFormats.ppm = kbn.formatBuilders.fixedUnit('ppm'); kbn.valueFormats.conppb = kbn.formatBuilders.fixedUnit('ppb'); kbn.valueFormats.conngm3 = kbn.formatBuilders.fixedUnit('ng/m3'); kbn.valueFormats.conngNm3 = kbn.formatBuilders.fixedUnit('ng/Nm3'); @@ -1099,7 +1099,7 @@ kbn.getUnitFormats = function() { { text: 'concentration', submenu: [ - { text: 'parts-per-million (ppm)', value: 'conppm' }, + { text: 'parts-per-million (ppm)', value: 'ppm' }, { text: 'parts-per-billion (ppb)', value: 'conppb' }, { text: 'nanogram per cubic metre (ng/m3)', value: 'conngm3' }, { text: 'nanogram per normal cubic metre (ng/Nm3)', value: 'conngNm3' }, diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 8a2aea8c4c2..07ce0fed49f 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -634,6 +634,9 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) { function configureAxisMode(axis, format) { axis.tickFormatter = function(val, axis) { + if (!kbn.valueFormats[format]) { + throw new Error(`Unit '${format}' is not supported`); + } return kbn.valueFormats[format](val, axis.tickDecimals, axis.scaledDecimals); }; } From e4d9c886d75b711b128402a9d4a459c8a4e3298f Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Mon, 30 Apr 2018 14:41:52 +0200 Subject: [PATCH 2/5] increase length of auth_id column in user_auth table (cherry picked from commit 3d9b7a5892f11920c3be744287f0a4b46cfd5464) --- pkg/services/sqlstore/migrations/user_auth_mig.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/services/sqlstore/migrations/user_auth_mig.go b/pkg/services/sqlstore/migrations/user_auth_mig.go index 4d8a18ce33e..be4d112f6f6 100644 --- a/pkg/services/sqlstore/migrations/user_auth_mig.go +++ b/pkg/services/sqlstore/migrations/user_auth_mig.go @@ -21,4 +21,9 @@ func addUserAuthMigrations(mg *Migrator) { mg.AddMigration("create user auth table", NewAddTableMigration(userAuthV1)) // add indices addTableIndicesMigrations(mg, "v1", userAuthV1) + + mg.AddMigration("alter user_auth.auth_id to length 255", new(RawSqlMigration). + Sqlite("SELECT 0 WHERE 0;"). + Postgres("ALTER TABLE user_auth ALTER COLUMN auth_id TYPE VARCHAR(255);"). + Mysql("ALTER TABLE user_auth MODIFY auth_id VARCHAR(255);")) } From 3daaf37d6a65be8bd6cef08020e04d75d28d74c9 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 2 May 2018 12:43:25 +0300 Subject: [PATCH 3/5] scroll: fix scrolling on mobile Chrome (#11710) (cherry picked from commit 64283408ee610e6bd1832abf37a946ca25505c81) --- public/sass/pages/_dashboard.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index cf32522df7f..aeb9e28975b 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -45,6 +45,8 @@ div.flot-text { height: calc(100% - 27px); position: relative; overflow: hidden; + // Fixes scrolling on mobile devices + overflow-y: scroll; } .panel-title-container { From fe108270bbb208b8555c00b673b1e0633920d582 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 3 May 2018 11:54:02 +0300 Subject: [PATCH 4/5] scroll: remove firefox scrollbars (cherry picked from commit 83d599670da3832982553327003dbb5f606e6bfe) --- public/sass/pages/_dashboard.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/sass/pages/_dashboard.scss b/public/sass/pages/_dashboard.scss index aeb9e28975b..471e90ed9cf 100644 --- a/public/sass/pages/_dashboard.scss +++ b/public/sass/pages/_dashboard.scss @@ -44,9 +44,8 @@ div.flot-text { padding: $panel-padding; height: calc(100% - 27px); position: relative; - overflow: hidden; // Fixes scrolling on mobile devices - overflow-y: scroll; + overflow: auto; } .panel-title-container { From 1f9995d4d3af4a6293ab5cb438f97943732fce3c Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Mon, 7 May 2018 09:31:55 +0200 Subject: [PATCH 5/5] 5.1.1 release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5d0c1be47a4..980f69380f2 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Grafana Labs" }, "name": "grafana", - "version": "5.1.0", + "version": "5.1.1", "repository": { "type": "git", "url": "http://github.com/grafana/grafana.git"