From 968b1b430827472057195c798282649982392801 Mon Sep 17 00:00:00 2001 From: aibou Date: Thu, 23 Apr 2015 17:42:04 +0900 Subject: [PATCH 01/11] Fix and update documents --- conf/defaults.ini | 5 +++-- conf/sample.ini | 4 ++-- docs/sources/installation/configuration.md | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) 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. From 8526025792f125666390fcbcc31f6183057447ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Apr 2015 16:18:00 +0200 Subject: [PATCH 02/11] MySQL: Dashboard.data column type changed to mediumtext (sql migration added), Fixes #1863 --- CHANGELOG.md | 1 + pkg/services/sqlstore/datasource_test.go | 4 ++-- pkg/services/sqlstore/migrations/dashboard_mig.go | 6 ++++++ .../sqlstore/migrations/dashboard_snapshot_mig.go | 6 ++++++ pkg/services/sqlstore/migrator/migrations.go | 12 ++++++++++-- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d656e3685c..0f21b45db61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ **Fixes** - [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/pkg/services/sqlstore/datasource_test.go b/pkg/services/sqlstore/datasource_test.go index 4142602c472..cbe81ebbb75 100644 --- a/pkg/services/sqlstore/datasource_test.go +++ b/pkg/services/sqlstore/datasource_test.go @@ -14,9 +14,9 @@ import ( func InitTestDB(t *testing.T) { t.Log("InitTestDB") - x, err := xorm.NewEngine(sqlutil.TestDB_Sqlite3.DriverName, sqlutil.TestDB_Sqlite3.ConnStr) + //x, err := xorm.NewEngine(sqlutil.TestDB_Sqlite3.DriverName, sqlutil.TestDB_Sqlite3.ConnStr) //x, err := xorm.NewEngine(sqlutil.TestDB_Mysql.DriverName, sqlutil.TestDB_Mysql.ConnStr) - //x, err := xorm.NewEngine(sqlutil.TestDB_Postgres.DriverName, sqlutil.TestDB_Postgres.ConnStr) + x, err := xorm.NewEngine(sqlutil.TestDB_Postgres.DriverName, sqlutil.TestDB_Postgres.ConnStr) if err != nil { t.Fatalf("Failed to init in memory sqllite3 db %v", err) 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 From b99ee2562e0facc6c035ffbb6a8f143f8549479e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 23 Apr 2015 16:21:49 +0200 Subject: [PATCH 03/11] Restored sql integration tests to use in mem sqlite3 --- pkg/services/sqlstore/datasource_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/services/sqlstore/datasource_test.go b/pkg/services/sqlstore/datasource_test.go index cbe81ebbb75..4142602c472 100644 --- a/pkg/services/sqlstore/datasource_test.go +++ b/pkg/services/sqlstore/datasource_test.go @@ -14,9 +14,9 @@ import ( func InitTestDB(t *testing.T) { t.Log("InitTestDB") - //x, err := xorm.NewEngine(sqlutil.TestDB_Sqlite3.DriverName, sqlutil.TestDB_Sqlite3.ConnStr) + x, err := xorm.NewEngine(sqlutil.TestDB_Sqlite3.DriverName, sqlutil.TestDB_Sqlite3.ConnStr) //x, err := xorm.NewEngine(sqlutil.TestDB_Mysql.DriverName, sqlutil.TestDB_Mysql.ConnStr) - x, err := xorm.NewEngine(sqlutil.TestDB_Postgres.DriverName, sqlutil.TestDB_Postgres.ConnStr) + //x, err := xorm.NewEngine(sqlutil.TestDB_Postgres.DriverName, sqlutil.TestDB_Postgres.ConnStr) if err != nil { t.Fatalf("Failed to init in memory sqllite3 db %v", err) From 3fdab59029c0140196dc7c081cc03ee256292ce4 Mon Sep 17 00:00:00 2001 From: Chris Madden Date: Thu, 23 Apr 2015 23:53:15 +0200 Subject: [PATCH 04/11] Documented units for timepicker Timepicker units (like s, m, M, etc) were not in the documentation so I have added them. --- docs/sources/reference/timerange.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/reference/timerange.md b/docs/sources/reference/timerange.md index 4f5f4659594..47c9186e119 100644 --- a/docs/sources/reference/timerange.md +++ b/docs/sources/reference/timerange.md @@ -24,7 +24,7 @@ All of this applies to all Panels in the Dashboard (except those with Panel Time It's possible to customize the options displayed for relative time and the auto-refresh options. -From Dashboard setttings, click the Timepicker tab. From here you can specify the relative and auto refresh intervals. The Timepicker tab settings are saved on a per Dashboard basis. +From Dashboard setttings, click the Timepicker tab. From here you can specify the relative and auto refresh intervals. The Timepicker tab settings are saved on a per Dashboard basis. Entries are comma seperated and accept a number followed by one of the following units: s (seconds), m (minutes), h (hours), d (days), w (weeks), M (months), y (years). ![](/img/v1/timepicker_editor.png) From f8ceb341d6b5e941d9e55fd898e3df6a45d4f483 Mon Sep 17 00:00:00 2001 From: Mark Oellermann Date: Fri, 24 Apr 2015 13:23:54 +1000 Subject: [PATCH 05/11] Added units for voltage, current and frequency --- public/app/components/kbn.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/app/components/kbn.js b/public/app/components/kbn.js index 1193285787f..fa2b8214873 100644 --- a/public/app/components/kbn.js +++ b/public/app/components/kbn.js @@ -380,6 +380,9 @@ function($, _, moment) { kbn.valueFormats.Bps = kbn.formatFuncCreator(1000, [' Bps', ' KBps', ' MBps', ' GBps', ' TBps', ' PBps', ' EBps', ' ZBps', ' YBps']); kbn.valueFormats.short = kbn.formatFuncCreator(1000, ['', ' K', ' Mil', ' Bil', ' Tri', ' Qaudr', ' Quint', ' Sext', ' Sept']); kbn.valueFormats.joule = kbn.formatFuncCreator(1000, [' J', ' kJ', ' MJ', ' GJ', ' TJ', ' PJ', ' EJ', ' ZJ', ' YJ']); + kbn.valueFormats.amp = kbn.formatFuncCreator(1000, [' A', ' kA', ' MA', ' GA', ' TA', ' PA', ' EA', ' ZA', ' YA']); + kbn.valueFormats.volt = kbn.formatFuncCreator(1000, [' V', ' kV', ' MV', ' GV', ' TV', ' PV', ' EV', ' ZV', ' YV']); + kbn.valueFormats.hertz = kbn.formatFuncCreator(1000, [' Hz', ' kHz', ' MHz', ' GHz', ' THz', ' PHz', ' EHz', ' ZHz', ' YHz']); kbn.valueFormats.watt = kbn.formatFuncCreator(1000, [' W', ' kW', ' MW', ' GW', ' TW', ' PW', ' EW', ' ZW', ' YW']); kbn.valueFormats.kwatt = kbn.formatFuncCreator(1000, [' kW', ' MW', ' GW', ' TW', ' PW', ' EW', ' ZW', ' YW']); kbn.valueFormats.watth = kbn.formatFuncCreator(1000, [' Wh', ' kWh', ' MWh', ' GWh', ' TWh', ' PWh', ' EWh', ' ZWh', ' YWh']); @@ -534,6 +537,7 @@ function($, _, moment) { {text: 'microseconds (µs)', value: 'µs'}, {text: 'milliseconds (ms)', value: 'ms'}, {text: 'seconds (s)', value: 's'}, + {text: 'Hertz (1/s)', value: 'hertz'}, ] }, { @@ -561,6 +565,8 @@ function($, _, moment) { {text: 'kilowatt-hour (kWh)', value: 'kwatth'}, {text: 'joule (J)', value: 'joule'}, {text: 'electron volt (eV)', value: 'ev'}, + {text: 'Ampere (A)', value: 'amp'}, + {text: 'Volt (V)', value: 'volt'}, ] }, { From 7064d871068a37863f6d4aed17bc0c9503b8260c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 24 Apr 2015 11:20:09 +0200 Subject: [PATCH 06/11] Firefox/IE issue, invisible text in dashboard search fixed, Fixes #1872 --- CHANGELOG.md | 1 + public/css/less/search.less | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f21b45db61..b9133bf8601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 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) 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 { From 4fd2c0570c18366167e91b2f98dee0a1b6718a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 24 Apr 2015 15:46:16 +0200 Subject: [PATCH 07/11] Replaced slug dependency with one that did not use gopkgs.com --- Godeps/Godeps.json | 18 +++++++------- .../{gosimple => dalu}/slug/README.md | 10 +++----- .../slug/default_substitution.go | 0 .../github.com/{gosimple => dalu}/slug/doc.go | 6 +---- .../slug/languages_substitution.go | 0 .../{gosimple => dalu}/slug/slug.go | 2 +- .../{gosimple => dalu}/slug/slug_test.go | 0 .../dalu/unidecode}/.gitignore | 0 .../dalu/unidecode}/LICENSE | 0 .../dalu/unidecode}/README.md | 6 ----- .../dalu/unidecode}/decode.go | 0 .../dalu/unidecode}/make_table.go | 0 .../dalu/unidecode}/table.go | 0 .../dalu/unidecode}/table.txt | 0 .../dalu/unidecode}/unidecode.go | 0 .../dalu/unidecode}/unidecode_test.go | 0 .../src/github.com/gosimple/slug/.gitignore | 2 -- .../src/gopkgs.com/unidecode.v1/gopkgs.go | 24 ------------------- pkg/models/dashboards.go | 2 +- 19 files changed, 15 insertions(+), 55 deletions(-) rename Godeps/_workspace/src/github.com/{gosimple => dalu}/slug/README.md (72%) rename Godeps/_workspace/src/github.com/{gosimple => dalu}/slug/default_substitution.go (100%) rename Godeps/_workspace/src/github.com/{gosimple => dalu}/slug/doc.go (91%) rename Godeps/_workspace/src/github.com/{gosimple => dalu}/slug/languages_substitution.go (100%) rename Godeps/_workspace/src/github.com/{gosimple => dalu}/slug/slug.go (99%) rename Godeps/_workspace/src/github.com/{gosimple => dalu}/slug/slug_test.go (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/.gitignore (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/LICENSE (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/README.md (65%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/decode.go (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/make_table.go (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/table.go (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/table.txt (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/unidecode.go (100%) rename Godeps/_workspace/src/{gopkgs.com/unidecode.v1 => github.com/dalu/unidecode}/unidecode_test.go (100%) delete mode 100644 Godeps/_workspace/src/github.com/gosimple/slug/.gitignore delete mode 100644 Godeps/_workspace/src/gopkgs.com/unidecode.v1/gopkgs.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a7e150e215e..dd08ac91121 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/grafana/grafana", - "GoVersion": "go1.4.2", + "GoVersion": "go1.3", "Packages": [ "./pkg/..." ], @@ -13,6 +13,14 @@ "ImportPath": "github.com/Unknwon/macaron", "Rev": "93de4f3fad97bf246b838f828e2348f46f21f20a" }, + { + "ImportPath": "github.com/dalu/slug", + "Rev": "6dbd13912e9be466e2c1de349a2c7d1466c97e07" + }, + { + "ImportPath": "github.com/dalu/unidecode", + "Rev": "339814d47f3e32a6f7036a0a4c56ed9b373dd755" + }, { "ImportPath": "github.com/go-sql-driver/mysql", "Comment": "v1.2-26-g9543750", @@ -27,10 +35,6 @@ "Comment": "v0.4.2-58-ge2889e5", "Rev": "e2889e5517600b82905f1d2ba8b70deb71823ffe" }, - { - "ImportPath": "github.com/gosimple/slug", - "Rev": "a2392a4a87fa0366cbff131d3fd421f83f52492f" - }, { "ImportPath": "github.com/jtolds/gls", "Rev": "f1ac7f4f24f50328e6bc838ca4437d1612a0243c" @@ -87,10 +91,6 @@ { "ImportPath": "gopkgs.com/pool.v1", "Rev": "c850f092aad1780cbffff25f471c5cc32097932a" - }, - { - "ImportPath": "gopkgs.com/unidecode.v1", - "Rev": "4deae2c05236b41cc39f8144ac87a837ba974d40" } ] } diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/README.md b/Godeps/_workspace/src/github.com/dalu/slug/README.md similarity index 72% rename from Godeps/_workspace/src/github.com/gosimple/slug/README.md rename to Godeps/_workspace/src/github.com/dalu/slug/README.md index a2649bdb170..ddefc36ff04 100644 --- a/Godeps/_workspace/src/github.com/gosimple/slug/README.md +++ b/Godeps/_workspace/src/github.com/dalu/slug/README.md @@ -4,10 +4,9 @@ slug Package `slug` generate slug from unicode string, URL-friendly slugify with multiple languages support. -[![GoDoc](https://godoc.org/github.com/gosimple/slug?status.png)](https://godoc.org/github.com/gosimple/slug) -[![Build Status](https://drone.io/github.com/gosimple/slug/status.png)](https://drone.io/github.com/gosimple/slug/latest) +[![GoDoc](https://godoc.org/github.com/dalu/slug?status.png)](https://godoc.org/github.com/dalu/slug) -[Documentation online](http://godoc.org/github.com/gosimple/slug) +[Documentation online](http://godoc.org/github.com/dalu/slug) ## Example @@ -38,12 +37,9 @@ multiple languages support. fmt.Println(textSub) // Will print 'sand-is-hot' } -### Requests or bugs? - - ## Installation - go get -u github.com/gosimple/slug + go get -u github.com/dalu/slug ## License diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/default_substitution.go b/Godeps/_workspace/src/github.com/dalu/slug/default_substitution.go similarity index 100% rename from Godeps/_workspace/src/github.com/gosimple/slug/default_substitution.go rename to Godeps/_workspace/src/github.com/dalu/slug/default_substitution.go diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/doc.go b/Godeps/_workspace/src/github.com/dalu/slug/doc.go similarity index 91% rename from Godeps/_workspace/src/github.com/gosimple/slug/doc.go rename to Godeps/_workspace/src/github.com/dalu/slug/doc.go index ffbe2c223f5..39f57b30eb4 100644 --- a/Godeps/_workspace/src/github.com/gosimple/slug/doc.go +++ b/Godeps/_workspace/src/github.com/dalu/slug/doc.go @@ -12,7 +12,7 @@ Example: package main import( - "github.com/gosimple/slug" + "github.com/dalu/slug" "fmt" ) @@ -35,9 +35,5 @@ Example: textSub := slug.Make("water is hot") fmt.Println(textSub) // Will print 'sand-is-hot' } - -Requests or bugs? - -https://github.com/gosimple/slug/issues */ package slug diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/languages_substitution.go b/Godeps/_workspace/src/github.com/dalu/slug/languages_substitution.go similarity index 100% rename from Godeps/_workspace/src/github.com/gosimple/slug/languages_substitution.go rename to Godeps/_workspace/src/github.com/dalu/slug/languages_substitution.go diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/slug.go b/Godeps/_workspace/src/github.com/dalu/slug/slug.go similarity index 99% rename from Godeps/_workspace/src/github.com/gosimple/slug/slug.go rename to Godeps/_workspace/src/github.com/dalu/slug/slug.go index 26974fbd7d8..85d614f941e 100644 --- a/Godeps/_workspace/src/github.com/gosimple/slug/slug.go +++ b/Godeps/_workspace/src/github.com/dalu/slug/slug.go @@ -6,7 +6,7 @@ package slug import ( - "gopkgs.com/unidecode.v1" + "github.com/dalu/unidecode" "regexp" "strings" ) diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/slug_test.go b/Godeps/_workspace/src/github.com/dalu/slug/slug_test.go similarity index 100% rename from Godeps/_workspace/src/github.com/gosimple/slug/slug_test.go rename to Godeps/_workspace/src/github.com/dalu/slug/slug_test.go diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/.gitignore b/Godeps/_workspace/src/github.com/dalu/unidecode/.gitignore similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/.gitignore rename to Godeps/_workspace/src/github.com/dalu/unidecode/.gitignore diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/LICENSE b/Godeps/_workspace/src/github.com/dalu/unidecode/LICENSE similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/LICENSE rename to Godeps/_workspace/src/github.com/dalu/unidecode/LICENSE diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/README.md b/Godeps/_workspace/src/github.com/dalu/unidecode/README.md similarity index 65% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/README.md rename to Godeps/_workspace/src/github.com/dalu/unidecode/README.md index fa5d70841fb..589d955593c 100644 --- a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/README.md +++ b/Godeps/_workspace/src/github.com/dalu/unidecode/README.md @@ -3,10 +3,4 @@ unidecode Unicode transliterator in Golang - Replaces non-ASCII characters with their ASCII approximations. -Please, use the following import path to ensure a stable API: - -```go - import "gopkgs.com/unidecode.v1" -``` - View other available versions, documentation and examples at http://gopkgs.com/unidecode diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/decode.go b/Godeps/_workspace/src/github.com/dalu/unidecode/decode.go similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/decode.go rename to Godeps/_workspace/src/github.com/dalu/unidecode/decode.go diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/make_table.go b/Godeps/_workspace/src/github.com/dalu/unidecode/make_table.go similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/make_table.go rename to Godeps/_workspace/src/github.com/dalu/unidecode/make_table.go diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/table.go b/Godeps/_workspace/src/github.com/dalu/unidecode/table.go similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/table.go rename to Godeps/_workspace/src/github.com/dalu/unidecode/table.go diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/table.txt b/Godeps/_workspace/src/github.com/dalu/unidecode/table.txt similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/table.txt rename to Godeps/_workspace/src/github.com/dalu/unidecode/table.txt diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/unidecode.go b/Godeps/_workspace/src/github.com/dalu/unidecode/unidecode.go similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/unidecode.go rename to Godeps/_workspace/src/github.com/dalu/unidecode/unidecode.go diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/unidecode_test.go b/Godeps/_workspace/src/github.com/dalu/unidecode/unidecode_test.go similarity index 100% rename from Godeps/_workspace/src/gopkgs.com/unidecode.v1/unidecode_test.go rename to Godeps/_workspace/src/github.com/dalu/unidecode/unidecode_test.go diff --git a/Godeps/_workspace/src/github.com/gosimple/slug/.gitignore b/Godeps/_workspace/src/github.com/gosimple/slug/.gitignore deleted file mode 100644 index 02a8da53752..00000000000 --- a/Godeps/_workspace/src/github.com/gosimple/slug/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_* -cover*.out diff --git a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/gopkgs.go b/Godeps/_workspace/src/gopkgs.com/unidecode.v1/gopkgs.go deleted file mode 100644 index a907de14384..00000000000 --- a/Godeps/_workspace/src/gopkgs.com/unidecode.v1/gopkgs.go +++ /dev/null @@ -1,24 +0,0 @@ -package unidecode - -import ( - "fmt" - "reflect" -) - -// gopkgs.go: v1 - -// NOTE: This file is autogenerated by gopkgs.com. -const ( - goPkgsSrcPath = "github.com/rainycape/unidecode" - goPkgsName = "unidecode" - goPkgsErrFmt = "invalid import path %s - please use gopkgs.com/%s.v1 or see http://gopkgs.com/%s" -) - -type goPkgsCheck struct{} - -func init() { - typ := reflect.TypeOf(goPkgsCheck{}) - if typ.PkgPath() == goPkgsSrcPath { - panic(fmt.Errorf(goPkgsErrFmt, typ.PkgPath(), goPkgsName, goPkgsName)) - } -} diff --git a/pkg/models/dashboards.go b/pkg/models/dashboards.go index 7c4e8db1611..159d4e1a3c6 100644 --- a/pkg/models/dashboards.go +++ b/pkg/models/dashboards.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/gosimple/slug" + "github.com/dalu/slug" ) // Typed errors From 380b7f4d9421369abe61b048fdf787afc4d05158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 24 Apr 2015 15:57:20 +0200 Subject: [PATCH 08/11] updated version to 2.1.0-pre1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64e393616f6..8785632eaee 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Coding Instinct AB" }, "name": "grafana", - "version": "2.0.3-pre1", + "version": "2.1.0-pre1", "repository": { "type": "git", "url": "http://github.com/torkelo/grafana.git" From d84d92f73c9bdb4578a6ce48540fb38bfab8b710 Mon Sep 17 00:00:00 2001 From: Anthony Woods Date: Sat, 25 Apr 2015 18:46:30 +0800 Subject: [PATCH 09/11] fixes #1880 correct mysql statement for modifying column data type --- pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go index 9cbb5c8c7ab..2e3d2d2a188 100644 --- a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go +++ b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go @@ -53,5 +53,5 @@ func addDashboardSnapshotMigrations(mg *Migrator) { 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;")) + Mysql("ALTER TABLE dashboard_snapshot MODIFY data MEDIUMTEXT;")) } From f227002a804c4fcdc360939ce5bb7e0b5194a3aa Mon Sep 17 00:00:00 2001 From: Anthony Woods Date: Sat, 25 Apr 2015 18:51:25 +0800 Subject: [PATCH 10/11] fixes #1880 dashboard_snapshot table does not have a data column --- pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go index 2e3d2d2a188..352619ee6e9 100644 --- a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go +++ b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go @@ -49,9 +49,4 @@ 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 MODIFY data MEDIUMTEXT;")) } From e410fbb558be6ae491523a413872b24002028211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 25 Apr 2015 20:28:50 +0200 Subject: [PATCH 11/11] Corrected SQL migration for snapshot table column type change, #1880 --- pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go index 352619ee6e9..b08cc451e55 100644 --- a/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go +++ b/pkg/services/sqlstore/migrations/dashboard_snapshot_mig.go @@ -49,4 +49,9 @@ func addDashboardSnapshotMigrations(mg *Migrator) { mg.AddMigration("create dashboard_snapshot table v5 #2", NewAddTableMigration(snapshotV5)) addTableIndicesMigrations(mg, "v5", snapshotV5) + // change column type of dashboard + mg.AddMigration("alter dashboard_snapshot to mediumtext v2", new(RawSqlMigration). + Sqlite("SELECT 0 WHERE 0;"). + Postgres("SELECT 0;"). + Mysql("ALTER TABLE dashboard_snapshot MODIFY dashboard MEDIUMTEXT;")) }