Merge branch 'alerting' into alerting_notifications

This commit is contained in:
bergquist
2016-06-20 10:45:05 +02:00
37 changed files with 184 additions and 202 deletions
+1
View File
@@ -34,6 +34,7 @@ func Register(r *macaron.Macaron) {
r.Get("/org/", reqSignedIn, Index)
r.Get("/org/new", reqSignedIn, Index)
r.Get("/datasources/", reqSignedIn, Index)
r.Get("/datasources/new", reqSignedIn, Index)
r.Get("/datasources/edit/*", reqSignedIn, Index)
r.Get("/org/users/", reqSignedIn, Index)
r.Get("/org/apikeys/", reqSignedIn, Index)
-2
View File
@@ -63,8 +63,6 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string, targetUrl *url.URL) *ht
req.Header.Add("Authorization", dsAuth)
}
time.Sleep(time.Second * 5)
// clear cookie headers
req.Header.Del("Cookie")
req.Header.Del("Set-Cookie")
-1
View File
@@ -44,7 +44,6 @@ func searchHandler(query *Query) error {
IsStarred: query.IsStarred,
OrgId: query.OrgId,
DashboardIds: query.DashboardIds,
Limit: query.Limit,
}
if err := bus.Dispatch(&dashQuery); err != nil {
-1
View File
@@ -42,7 +42,6 @@ type FindPersistedDashboardsQuery struct {
UserId int64
IsStarred bool
DashboardIds []int
Limit int
Result HitList
}
+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,
}))
}