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;
|
$this->view->programStatus = $programStatus;
|
||||||
$toggleFeaturesForm = new ToggleInstanceFeaturesCommandForm();
|
$toggleFeaturesForm = new ToggleInstanceFeaturesCommandForm();
|
||||||
$toggleFeaturesForm
|
$toggleFeaturesForm
|
||||||
|
->setBackend($this->backend)
|
||||||
->setStatus($programStatus)
|
->setStatus($programStatus)
|
||||||
->load($programStatus)
|
->load($programStatus)
|
||||||
->handleRequest();
|
->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(
|
$this->addElement(
|
||||||
'checkbox',
|
'checkbox',
|
||||||
ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING,
|
ToggleInstanceFeatureCommand::FEATURE_HOST_OBSESSING,
|
||||||
|
|
Loading…
Reference in New Issue