| 
									
										
										
										
											2015-11-20 16:43:10 +08:00
										 |  |  | package dtos | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-07 18:23:53 +08:00
										 |  |  | import ( | 
					
						
							|  |  |  | 	"github.com/grafana/grafana/pkg/setting" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	"html/template" | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2020-11-12 19:29:43 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-20 16:43:10 +08:00
										 |  |  | type IndexViewData struct { | 
					
						
							| 
									
										
										
										
											2016-05-03 15:00:58 +08:00
										 |  |  | 	User                    *CurrentUser | 
					
						
							|  |  |  | 	Settings                map[string]interface{} | 
					
						
							|  |  |  | 	AppUrl                  string | 
					
						
							|  |  |  | 	AppSubUrl               string | 
					
						
							|  |  |  | 	GoogleAnalyticsId       string | 
					
						
							|  |  |  | 	GoogleTagManagerId      string | 
					
						
							| 
									
										
										
										
											2017-08-15 23:52:52 +08:00
										 |  |  | 	NavTree                 []*NavLink | 
					
						
							| 
									
										
										
										
											2016-05-03 15:00:58 +08:00
										 |  |  | 	BuildVersion            string | 
					
						
							|  |  |  | 	BuildCommit             string | 
					
						
							| 
									
										
										
										
											2017-10-12 03:36:03 +08:00
										 |  |  | 	Theme                   string | 
					
						
							| 
									
										
										
										
											2016-05-03 15:00:58 +08:00
										 |  |  | 	NewGrafanaVersionExists bool | 
					
						
							|  |  |  | 	NewGrafanaVersion       string | 
					
						
							| 
									
										
										
										
											2018-07-02 19:33:39 +08:00
										 |  |  | 	AppName                 string | 
					
						
							| 
									
										
										
										
											2018-11-01 04:40:58 +08:00
										 |  |  | 	AppNameBodyClass        string | 
					
						
							| 
									
										
										
										
											2020-12-07 18:23:53 +08:00
										 |  |  | 	FavIcon                 template.URL | 
					
						
							|  |  |  | 	AppleTouchIcon          template.URL | 
					
						
							| 
									
										
										
										
											2020-02-25 22:18:37 +08:00
										 |  |  | 	AppTitle                string | 
					
						
							| 
									
										
										
										
											2020-11-12 19:29:43 +08:00
										 |  |  | 	Sentry                  *setting.Sentry | 
					
						
							| 
									
										
										
										
											2021-02-01 17:13:09 +08:00
										 |  |  | 	ContentDeliveryURL      string | 
					
						
							| 
									
										
										
										
											2021-01-12 14:42:32 +08:00
										 |  |  | 	// Nonce is a cryptographic identifier for use with Content Security Policy.
 | 
					
						
							|  |  |  | 	Nonce string | 
					
						
							| 
									
										
										
										
											2015-11-20 16:43:10 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-11-15 16:28:55 +08:00
										 |  |  | 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 | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-11-20 16:43:10 +08:00
										 |  |  | 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"` | 
					
						
							| 
									
										
										
										
											2019-11-15 16:28:55 +08:00
										 |  |  | 	SortWeight   int64      `json:"sortWeight,omitempty"` | 
					
						
							| 
									
										
										
										
											2017-08-16 02:24:16 +08:00
										 |  |  | 	Divider      bool       `json:"divider,omitempty"` | 
					
						
							|  |  |  | 	HideFromMenu bool       `json:"hideFromMenu,omitempty"` | 
					
						
							| 
									
										
										
										
											2017-12-01 18:32:00 +08:00
										 |  |  | 	HideFromTabs bool       `json:"hideFromTabs,omitempty"` | 
					
						
							| 
									
										
										
										
											2017-08-16 02:24:16 +08:00
										 |  |  | 	Children     []*NavLink `json:"children,omitempty"` | 
					
						
							| 
									
										
										
										
											2015-11-20 16:43:10 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-02-20 16:02:06 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | // NavIDCfg is the id for org configuration navigation node
 | 
					
						
							|  |  |  | const NavIDCfg = "cfg" |