mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 16:54:15 +08:00
add isPublic to dashboard (#48012)
adds toggle to make a dashboard public * config struct for public dashboard config * api endpoints for public dashboard configuration * ui for toggling public dashboard on and off * load public dashboard config on share modal Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com> Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
@ -199,11 +199,16 @@ type Dashboard struct {
|
||||
FolderId int64
|
||||
IsFolder bool
|
||||
HasAcl bool
|
||||
IsPublic bool
|
||||
|
||||
Title string
|
||||
Data *simplejson.Json
|
||||
}
|
||||
|
||||
type PublicDashboardConfig struct {
|
||||
IsPublic bool `json:"isPublic"`
|
||||
}
|
||||
|
||||
func (d *Dashboard) SetId(id int64) {
|
||||
d.Id = id
|
||||
d.Data.Set("id", id)
|
||||
@ -411,6 +416,12 @@ type DeleteOrphanedProvisionedDashboardsCommand struct {
|
||||
ReaderNames []string
|
||||
}
|
||||
|
||||
type SavePublicDashboardConfigCommand struct {
|
||||
Uid string
|
||||
OrgId int64
|
||||
PublicDashboardConfig PublicDashboardConfig
|
||||
}
|
||||
|
||||
//
|
||||
// QUERIES
|
||||
//
|
||||
|
Reference in New Issue
Block a user