Fixed angularjs variable names
This commit is contained in:
@@ -118,5 +118,23 @@ func SearchDashboardSnapshots(c *middleware.Context) Response {
|
||||
return ApiError(500, "Search failed", err)
|
||||
}
|
||||
|
||||
return Json(200, searchQuery.Result)
|
||||
dtos := make([]*m.DashboardSnapshotDTO, len(searchQuery.Result))
|
||||
for i, snapshot := range searchQuery.Result {
|
||||
dtos[i] = &m.DashboardSnapshotDTO{
|
||||
Id: snapshot.Id,
|
||||
Name: snapshot.Name,
|
||||
Key: snapshot.Key,
|
||||
DeleteKey: snapshot.DeleteKey,
|
||||
OrgId: snapshot.OrgId,
|
||||
UserId: snapshot.UserId,
|
||||
External: snapshot.External,
|
||||
ExternalUrl: snapshot.ExternalUrl,
|
||||
Expires: snapshot.Expires,
|
||||
Created: snapshot.Created,
|
||||
Updated: snapshot.Updated,
|
||||
}
|
||||
}
|
||||
|
||||
return Json(200, dtos)
|
||||
//return Json(200, searchQuery.Result)
|
||||
}
|
||||
|
||||
@@ -20,6 +20,22 @@ type DashboardSnapshot struct {
|
||||
Dashboard map[string]interface{}
|
||||
}
|
||||
|
||||
// DashboardSnapshotDTO without dashboard map
|
||||
type DashboardSnapshotDTO struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Key string `json:"key"`
|
||||
DeleteKey string `json:"deleteKey"`
|
||||
OrgId int64 `json:"orgId"`
|
||||
UserId int64 `json:"userId"`
|
||||
External bool `json:"external"`
|
||||
ExternalUrl string `json:"externalUrl"`
|
||||
|
||||
Expires time.Time `json:"expires"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
// -----------------
|
||||
// COMMANDS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user