mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Restore folder properties (#58743)
* Chore: Fix folder URL * Restore more folder properties * Fixup
This commit is contained in:
committed by
GitHub
parent
98dbc637cc
commit
93b4b9154e
@@ -34,11 +34,11 @@ type Folder struct {
|
||||
|
||||
// TODO: validate if this field is required/relevant to folders.
|
||||
// currently there is no such column
|
||||
// Version int
|
||||
// Url string
|
||||
// UpdatedBy int64
|
||||
// CreatedBy int64
|
||||
// HasACL bool
|
||||
Version int
|
||||
Url string
|
||||
UpdatedBy int64
|
||||
CreatedBy int64
|
||||
HasACL bool
|
||||
}
|
||||
|
||||
type FolderDTO struct {
|
||||
@@ -142,15 +142,15 @@ func (f *Folder) ToLegacyModel() *models.Folder {
|
||||
|
||||
func FromDashboard(dash *models.Dashboard) *Folder {
|
||||
return &Folder{
|
||||
ID: dash.Id,
|
||||
UID: dash.Uid,
|
||||
Title: dash.Title,
|
||||
//HasACL: dash.HasACL,
|
||||
//Url: dash.GetUrl(),
|
||||
//Version: dash.Version,
|
||||
Created: dash.Created,
|
||||
//CreatedBy: dash.CreatedBy,
|
||||
Updated: dash.Updated,
|
||||
//UpdatedBy: dash.UpdatedBy,
|
||||
ID: dash.Id,
|
||||
UID: dash.Uid,
|
||||
Title: dash.Title,
|
||||
HasACL: dash.HasACL,
|
||||
Url: models.GetFolderUrl(dash.Uid, dash.Slug),
|
||||
Version: dash.Version,
|
||||
Created: dash.Created,
|
||||
CreatedBy: dash.CreatedBy,
|
||||
Updated: dash.Updated,
|
||||
UpdatedBy: dash.UpdatedBy,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user