Merge branch 'master' into alerting

This commit is contained in:
bergquist
2016-06-20 10:44:48 +02:00
35 changed files with 102 additions and 170 deletions
+1 -7
View File
@@ -123,11 +123,6 @@ type DashboardSearchProjection struct {
}
func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
limit := query.Limit
if limit == 0 {
limit = 1000
}
var sql bytes.Buffer
params := make([]interface{}, 0)
@@ -170,8 +165,7 @@ func SearchDashboards(query *search.FindPersistedDashboardsQuery) error {
params = append(params, "%"+query.Title+"%")
}
sql.WriteString(fmt.Sprintf(" ORDER BY dashboard.title ASC LIMIT ?"))
params = append(params, limit)
sql.WriteString(fmt.Sprintf(" ORDER BY dashboard.title ASC LIMIT 1000"))
var res []DashboardSearchProjection
@@ -107,4 +107,8 @@ func addDashboardMigration(mg *Migrator) {
mg.AddMigration("Add column gnetId in dashboard", NewAddColumnMigration(dashboardV2, &Column{
Name: "gnet_id", Type: DB_BigInt, Nullable: true,
}))
mg.AddMigration("Add index for gnetId in dashboard", NewAddIndexMigration(dashboardV2, &Index{
Cols: []string{"gnet_id"}, Type: IndexType,
}))
}