grafana/pkg/api/dtos/index.go

58 lines
1.8 KiB
Go
Raw Normal View History

package dtos
import "github.com/grafana/grafana/pkg/setting"
type IndexViewData struct {
User *CurrentUser
Settings map[string]interface{}
AppUrl string
AppSubUrl string
GoogleAnalyticsId string
GoogleTagManagerId string
2017-08-15 23:52:52 +08:00
NavTree []*NavLink
BuildVersion string
BuildCommit string
2017-10-12 03:36:03 +08:00
Theme string
NewGrafanaVersionExists bool
NewGrafanaVersion string
AppName string
AppNameBodyClass string
FavIcon string
AppleTouchIcon string
AppTitle string
Sentry *setting.Sentry
}
const (
// These weights may be used by an extension to reliably place
// itself in relation to a particular item in the menu. The weights
// are negative to ensure that the default items are placed above
// any items with default weight.
WeightCreate = (iota - 20) * 100
WeightDashboard
WeightExplore
WeightProfile
WeightAlerting
WeightPlugin
WeightConfig
WeightAdmin
WeightHelp
)
type NavLink struct {
2017-08-16 02:24:16 +08:00
Id string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Description string `json:"description,omitempty"`
2017-11-30 22:37:03 +08:00
SubTitle string `json:"subTitle,omitempty"`
2017-08-16 02:24:16 +08:00
Icon string `json:"icon,omitempty"`
Img string `json:"img,omitempty"`
Url string `json:"url,omitempty"`
Target string `json:"target,omitempty"`
SortWeight int64 `json:"sortWeight,omitempty"`
2017-08-16 02:24:16 +08:00
Divider bool `json:"divider,omitempty"`
HideFromMenu bool `json:"hideFromMenu,omitempty"`
HideFromTabs bool `json:"hideFromTabs,omitempty"`
2017-08-16 02:24:16 +08:00
Children []*NavLink `json:"children,omitempty"`
}