mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 22:02:22 +08:00
feat(apps): more work on apps and how apps can include panels
This commit is contained in:
@ -8,21 +8,22 @@ import (
|
||||
|
||||
type FrontendPluginBase struct {
|
||||
PluginBase
|
||||
Module string `json:"module"`
|
||||
StaticRoot string `json:"staticRoot"`
|
||||
Module string `json:"module"`
|
||||
StaticRoot string `json:"staticRoot"`
|
||||
StaticRootAbs string `json:"-"`
|
||||
}
|
||||
|
||||
func (fp *FrontendPluginBase) initFrontendPlugin() {
|
||||
if fp.StaticRoot != "" {
|
||||
fp.StaticRootAbs = filepath.Join(fp.PluginDir, fp.StaticRoot)
|
||||
StaticRoutes = append(StaticRoutes, &PluginStaticRoute{
|
||||
Directory: filepath.Join(fp.PluginDir, fp.StaticRoot),
|
||||
Directory: fp.StaticRootAbs,
|
||||
PluginId: fp.Id,
|
||||
})
|
||||
}
|
||||
|
||||
fp.Info.Logos.Small = evalRelativePluginUrlPath(fp.Info.Logos.Small, fp.Id)
|
||||
fp.Info.Logos.Large = evalRelativePluginUrlPath(fp.Info.Logos.Large, fp.Id)
|
||||
|
||||
fp.handleModuleDefaults()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user