PLT-8289 Added ability to change location of client plugins (#7942)
Этот коммит содержится в:
коммит произвёл
Chris
родитель
154a502f8e
Коммит
36777057f2
@@ -149,7 +149,8 @@ const (
|
||||
DATA_RETENTION_SETTINGS_DEFAULT_FILE_RETENTION_DAYS = 365
|
||||
DATA_RETENTION_SETTINGS_DEFAULT_DELETION_JOB_START_TIME = "02:00"
|
||||
|
||||
PLUGIN_SETTINGS_DEFAULT_DIRECTORY = "./plugins"
|
||||
PLUGIN_SETTINGS_DEFAULT_DIRECTORY = "./plugins"
|
||||
PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY = "./client/plugins"
|
||||
)
|
||||
|
||||
type ServiceSettings struct {
|
||||
@@ -1476,11 +1477,12 @@ type PluginState struct {
|
||||
}
|
||||
|
||||
type PluginSettings struct {
|
||||
Enable *bool
|
||||
EnableUploads *bool
|
||||
Directory *string
|
||||
Plugins map[string]interface{}
|
||||
PluginStates map[string]*PluginState
|
||||
Enable *bool
|
||||
EnableUploads *bool
|
||||
Directory *string
|
||||
ClientDirectory *string
|
||||
Plugins map[string]interface{}
|
||||
PluginStates map[string]*PluginState
|
||||
}
|
||||
|
||||
func (s *PluginSettings) SetDefaults() {
|
||||
@@ -1500,6 +1502,14 @@ func (s *PluginSettings) SetDefaults() {
|
||||
*s.Directory = PLUGIN_SETTINGS_DEFAULT_DIRECTORY
|
||||
}
|
||||
|
||||
if s.ClientDirectory == nil {
|
||||
s.ClientDirectory = NewString(PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY)
|
||||
}
|
||||
|
||||
if *s.ClientDirectory == "" {
|
||||
*s.ClientDirectory = PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY
|
||||
}
|
||||
|
||||
if s.Plugins == nil {
|
||||
s.Plugins = make(map[string]interface{})
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user