mirror of
https://github.com/vatesfr/xen-orchestra.git
synced 2026-09-10 22:14:48 -05:00
feat(xo-web/plugins): auto-load follow load/unload (#7317)
Loading, or unloading, will respectively enable, or disable, _Auto-load at server start_, this should lead to least surprising behaviors.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- [Tasks] Hide `/rrd_updates` tasks by default
|
||||
- [Sign in] Support _Remember me_ feature with external providers (PR [#7298](https://github.com/vatesfr/xen-orchestra/pull/7298))
|
||||
- [Pool/Host] Add a warning if hosts do not have the same version within a pool [#7059](https://github.com/vatesfr/xen-orchestra/issues/7059) (PR [#7280](https://github.com/vatesfr/xen-orchestra/pull/7280))
|
||||
- [Plugins] Loading, or unloading, will respectively enable, or disable, _Auto-load at server start_, this should lead to least surprising behaviors (PR [#7317](https://github.com/vatesfr/xen-orchestra/pull/7317))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
|
||||
@@ -76,12 +76,15 @@ class Plugin extends Component {
|
||||
|
||||
_updateLoad = () => {
|
||||
const { props } = this
|
||||
const { id } = props
|
||||
|
||||
if (!props.loaded) {
|
||||
return loadPlugin(props.id)
|
||||
enablePluginAutoload(id).catch(console.warn)
|
||||
return loadPlugin(id)
|
||||
}
|
||||
if (props.unloadable !== false) {
|
||||
return unloadPlugin(props.id)
|
||||
disablePluginAutoload(id).catch(console.warn)
|
||||
return unloadPlugin(id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user