mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
playlist: fixed dashboard play ordering, fixes #7688
This commit is contained in:
parent
634ee0f9fa
commit
b17a1ed557
@ -91,6 +91,6 @@ func LoadPlaylistDashboards(orgId, userId, playlistId int64) (dtos.PlaylistDashb
|
||||
result = append(result, k...)
|
||||
result = append(result, populateDashboardsByTag(orgId, userId, dashboardByTag, dashboardTagOrder)...)
|
||||
|
||||
sort.Sort(sort.Reverse(result))
|
||||
sort.Sort(result)
|
||||
return result, nil
|
||||
}
|
||||
|
@ -83,12 +83,12 @@ func UpdatePlaylist(cmd *m.UpdatePlaylistCommand) error {
|
||||
|
||||
playlistItems := make([]m.PlaylistItem, 0)
|
||||
|
||||
for _, item := range cmd.Items {
|
||||
for index, item := range cmd.Items {
|
||||
playlistItems = append(playlistItems, m.PlaylistItem{
|
||||
PlaylistId: playlist.Id,
|
||||
Type: item.Type,
|
||||
Value: item.Value,
|
||||
Order: item.Order,
|
||||
Order: index + 1,
|
||||
Title: item.Title,
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user