Use isIcinga2() in the ToggleInstanceFeaturesCommandForm
This commit is contained in:
parent
47b3019940
commit
863bf08864
|
@ -93,6 +93,7 @@ class HealthController extends Controller
|
|||
$this->view->programStatus = $programStatus;
|
||||
$toggleFeaturesForm = new ToggleInstanceFeaturesCommandForm();
|
||||
$toggleFeaturesForm
|
||||
->setBackend($this->backend)
|
||||
->setStatus($programStatus)
|
||||
->load($programStatus)
|
||||
->handleRequest();
|
||||
|
|
|
@ -138,7 +138,7 @@ class ToggleInstanceFeaturesCommandForm extends CommandForm
|
|||
)
|
||||
);
|
||||
|
||||
if (! preg_match('~^v2\.\d+\.\d+.*$~', $this->status->program_version)) {
|
||||
if (! $this->getBackend()->isIcinga2($this->status->program_version)) {
|
||||
$this->addElement(
|
||||
'checkbox',
|
||||
ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING,
|
||||
|
|
Loading…
Reference in New Issue