mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(apps): pages work
This commit is contained in:
@@ -6,12 +6,13 @@ import (
|
||||
)
|
||||
|
||||
type AppSettings struct {
|
||||
Name string `json:"name"`
|
||||
AppId string `json:"appId"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Pinned bool `json:"pinned"`
|
||||
Info *plugins.PluginInfo `json:"info"`
|
||||
JsonData map[string]interface{} `json:"jsonData"`
|
||||
Name string `json:"name"`
|
||||
AppId string `json:"appId"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Pinned bool `json:"pinned"`
|
||||
Info *plugins.PluginInfo `json:"info"`
|
||||
Pages []*plugins.AppPluginPage `json:"pages"`
|
||||
JsonData map[string]interface{} `json:"jsonData"`
|
||||
}
|
||||
|
||||
func NewAppSettingsDto(def *plugins.AppPlugin, data *models.AppSettings) *AppSettings {
|
||||
@@ -19,6 +20,7 @@ func NewAppSettingsDto(def *plugins.AppPlugin, data *models.AppSettings) *AppSet
|
||||
AppId: def.Id,
|
||||
Name: def.Name,
|
||||
Info: &def.Info,
|
||||
Pages: def.Pages,
|
||||
}
|
||||
|
||||
if data != nil {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type AppPluginPage struct {
|
||||
Text string `json:"text"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
ReqRole models.RoleType `json:"reqRole"`
|
||||
}
|
||||
@@ -19,8 +19,8 @@ type AppPluginCss struct {
|
||||
|
||||
type AppPlugin struct {
|
||||
FrontendPluginBase
|
||||
Css *AppPluginCss `json:"css"`
|
||||
Page []*AppPluginPage `json:"page"`
|
||||
Css *AppPluginCss `json:"css"`
|
||||
Pages []*AppPluginPage `json:"pages"`
|
||||
|
||||
Pinned bool `json:"-"`
|
||||
Enabled bool `json:"-"`
|
||||
|
||||
@@ -24,6 +24,8 @@ type PluginInfo struct {
|
||||
Description string `json:"description"`
|
||||
Links []PluginInfoLink `json:"links"`
|
||||
Logos PluginLogos `json:"logos"`
|
||||
Version string `json:"version"`
|
||||
Updated string `json:"updated"`
|
||||
}
|
||||
|
||||
type PluginInfoLink struct {
|
||||
|
||||
Reference in New Issue
Block a user