diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d656e3685c..b9133bf8601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # 2.0.3 (unreleased) **Fixes** +- [Issue #1872](https://github.com/grafana/grafana/issues/1872). Firefox/IE issue, invisible text in dashboard search fixed - [Issue #1857](https://github.com/grafana/grafana/issues/1857). /api/login/ping Fix for issue when behind reverse proxy and subpath +- [Issue #1863](https://github.com/grafana/grafana/issues/1863). MySQL: Dashboard.data column type changed to mediumtext (sql migration added) # 2.0.2 (2015-04-22) diff --git a/conf/defaults.ini b/conf/defaults.ini index 042f1a5574c..6bb3fb80857 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -7,7 +7,7 @@ app_mode = production #################################### Paths #################################### [paths] -# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is useD) +# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) # data = data # @@ -62,7 +62,7 @@ path = grafana.db #################################### Session #################################### [session] -# Either "memory", "file", "redis", "mysql", default is "memory" +# Either "memory", "file", "redis", "mysql", "postgresql", default is "file" provider = file # Provider config options @@ -70,6 +70,7 @@ provider = file # file: session dir path, is relative to grafana data_path # redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,grafana` # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1)/database_name` + provider_config = sessions # Session cookie name diff --git a/conf/sample.ini b/conf/sample.ini index 6aaa69f7314..68bd3eb3a1d 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -7,7 +7,7 @@ #################################### Paths #################################### [paths] -# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is useD) +# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) # ;data = /var/lib/grafana # @@ -62,7 +62,7 @@ #################################### Session #################################### [session] -# Either "memory", "file", "redis", "mysql", default is "memory" +# Either "memory", "file", "redis", "mysql", "postgresql", default is "file" ;provider = file # Provider config options diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md index d727f9ced41..a79a8494d73 100644 --- a/docs/sources/installation/configuration.md +++ b/docs/sources/installation/configuration.md @@ -219,7 +219,7 @@ set to true, any user successfully authenticating via google auth will be automa ## [session] ### provider -Valid values are "memory", "file", "mysql", 'postgres'. Default is "memory". +Valid values are "memory", "file", "mysql", 'postgres'. Default is "file". ### provider_config This option should be configured differently depending on what type of session provider you have configured. diff --git a/pkg/services/sqlstore/migrations/dashboard_mig.go b/pkg/services/sqlstore/migrations/dashboard_mig.go index 6ded17ff0e7..5d440d85ebc 100644 --- a/pkg/services/sqlstore/migrations/dashboard_mig.go +++ b/pkg/services/sqlstore/migrations/dashboard_mig.go @@ -86,4 +86,10 @@ func addDashboardMigration(mg *Migrator) { })) mg.AddMigration("drop table dashboard_v1", NewDropTableMigration("dashboard_v1")) + + // change column type of dashboard.data + mg.AddMigration("alter dashboard.data to mediumtext v1", new(RawSqlMigration). + Sqlite("SELECT 0 WHERE 0;"). + Postgres("SELECT 0;"). + Mysql("ALTER TABLE dashboard MODIFY data MEDIUMTEXT;")) } diff --git a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go index 4d83dfd5bc6..9cbb5c8c7ab 100644 --- a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go +++ b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go @@ -48,4 +48,10 @@ func addDashboardSnapshotMigrations(mg *Migrator) { mg.AddMigration("create dashboard_snapshot table v5 #2", NewAddTableMigration(snapshotV5)) addTableIndicesMigrations(mg, "v5", snapshotV5) + + // ncrease data type + mg.AddMigration("alter dashboard_snapshot.data to mediumtext v1", new(RawSqlMigration). + Sqlite("SELECT 0 WHERE 0;"). + Postgres("SELECT 0;"). + Mysql("ALTER TABLE dashboard_snapshot.data MODIFY data MEDIUMTEXT;")) } diff --git a/pkg/services/sqlstore/migrator/migrations.go b/pkg/services/sqlstore/migrator/migrations.go index e596ef6c171..a65c7ec7e81 100644 --- a/pkg/services/sqlstore/migrator/migrations.go +++ b/pkg/services/sqlstore/migrator/migrations.go @@ -25,8 +25,9 @@ func (m *MigrationBase) GetCondition() MigrationCondition { type RawSqlMigration struct { MigrationBase - sqlite string - mysql string + sqlite string + mysql string + postgres string } func (m *RawSqlMigration) Sql(dialect Dialect) string { @@ -35,6 +36,8 @@ func (m *RawSqlMigration) Sql(dialect Dialect) string { return m.mysql case SQLITE: return m.sqlite + case POSTGRES: + return m.postgres } panic("db type not supported") @@ -50,6 +53,11 @@ func (m *RawSqlMigration) Mysql(sql string) *RawSqlMigration { return m } +func (m *RawSqlMigration) Postgres(sql string) *RawSqlMigration { + m.postgres = sql + return m +} + type AddColumnMigration struct { MigrationBase tableName string diff --git a/public/css/less/search.less b/public/css/less/search.less index 9b3da69f0e2..7182333bd16 100644 --- a/public/css/less/search.less +++ b/public/css/less/search.less @@ -22,7 +22,8 @@ padding-bottom: 10px; input { width: 100%; - padding: 18px 8px; + padding: 8px 8px; + height: 100%; box-sizing: border-box; } button {