mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(plugins): minor fix for external plugins with staticRoot
This commit is contained in:
parent
d83e24572a
commit
ab79348af5
@ -3,6 +3,7 @@ package plugins
|
||||
import (
|
||||
"net/url"
|
||||
"path"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type FrontendPluginBase struct {
|
||||
@ -14,7 +15,7 @@ type FrontendPluginBase struct {
|
||||
func (fp *FrontendPluginBase) initFrontendPlugin() {
|
||||
if fp.StaticRoot != "" {
|
||||
StaticRoutes = append(StaticRoutes, &PluginStaticRoute{
|
||||
Directory: fp.StaticRoot,
|
||||
Directory: filepath.Join(fp.PluginDir, fp.StaticRoot),
|
||||
PluginId: fp.Id,
|
||||
})
|
||||
}
|
||||
@ -31,7 +32,7 @@ func (fp *FrontendPluginBase) handleModuleDefaults() {
|
||||
}
|
||||
|
||||
if fp.StaticRoot != "" {
|
||||
fp.Module = path.Join("plugins", fp.Type, fp.Id, "module")
|
||||
fp.Module = path.Join("plugins", fp.Id, "module")
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user