Merge pull request #11844 from grafana/cp-5.1.1

Cherry-picks for v5.1.1
This commit is contained in:
Daniel Lee
2018-05-07 13:50:10 +02:00
committed by GitHub
5 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -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"
@@ -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);"))
}
+2 -2
View File
@@ -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' },
+3
View File
@@ -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);
};
}
+2 -1
View File
@@ -44,7 +44,8 @@ div.flot-text {
padding: $panel-padding;
height: calc(100% - 27px);
position: relative;
overflow: hidden;
// Fixes scrolling on mobile devices
overflow: auto;
}
.panel-title-container {