mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-16 01:09:48 -05:00
Businessprocess\Controller: optional state types
Only set state type if given, default is set at process load time
This commit is contained in:
parent
f7ed590d87
commit
c2e02796fa
1 changed files with 9 additions and 4 deletions
|
|
@ -63,14 +63,19 @@ class Controller extends ModuleActionController
|
|||
|
||||
$bp = $storage->loadProcess($process);
|
||||
|
||||
if ($this->_getParam('state_type') === 'soft'
|
||||
|| (isset($bpconf->states) && $bpconf->states === 'soft')) {
|
||||
$bp->useSoftStates();
|
||||
if (null !== ($stateType = $this->params->get('state_type'))) {
|
||||
if ($stateType === 'soft') {
|
||||
$bp->useSoftStates();
|
||||
}
|
||||
if ($stateType === 'soft') {
|
||||
$bp->useHardStates();
|
||||
}
|
||||
}
|
||||
|
||||
$bp->retrieveStatesFromBackend($this->backend);
|
||||
return $bp;
|
||||
|
||||
}
|
||||
|
||||
protected function loadSlas()
|
||||
{
|
||||
$bpconf = $this->bpconf;
|
||||
|
|
|
|||
Loading…
Reference in a new issue