mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 00:01:48 +08:00
Plugins: Fix plugin URL paths on Windows (#28548)
* Plugins: Fix plugin URL paths on Windows Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Plugins: Fix plugin URL paths on Windows Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@ -54,8 +54,8 @@ func (fp *FrontendPluginBase) setPathsBasedOnApp(app *AppPlugin) {
|
|||||||
|
|
||||||
func (fp *FrontendPluginBase) handleModuleDefaults() {
|
func (fp *FrontendPluginBase) handleModuleDefaults() {
|
||||||
if isExternalPlugin(fp.PluginDir) {
|
if isExternalPlugin(fp.PluginDir) {
|
||||||
fp.Module = filepath.Join("plugins", fp.Id, "module")
|
fp.Module = path.Join("plugins", fp.Id, "module")
|
||||||
fp.BaseUrl = filepath.Join("public/plugins", fp.Id)
|
fp.BaseUrl = path.Join("public/plugins", fp.Id)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,8 +66,8 @@ func (fp *FrontendPluginBase) handleModuleDefaults() {
|
|||||||
currentDir := filepath.Base(fp.PluginDir)
|
currentDir := filepath.Base(fp.PluginDir)
|
||||||
// use path package for the following statements
|
// use path package for the following statements
|
||||||
// because these are not file paths
|
// because these are not file paths
|
||||||
fp.Module = filepath.Join("app/plugins", fp.Type, currentDir, "module")
|
fp.Module = path.Join("app/plugins", fp.Type, currentDir, "module")
|
||||||
fp.BaseUrl = filepath.Join("public/app/plugins", fp.Type, currentDir)
|
fp.BaseUrl = path.Join("public/app/plugins", fp.Type, currentDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
func isExternalPlugin(pluginDir string) bool {
|
func isExternalPlugin(pluginDir string) bool {
|
||||||
|
Reference in New Issue
Block a user