mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Setup: Only allow to validate the API transport configuration
refs #3101
This commit is contained in:
parent
22c6bf75e7
commit
e4fd8d5124
@ -355,7 +355,9 @@ class TransportConfigForm extends ConfigForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getSubForm('transport_form') instanceof ApiTransportForm) {
|
if ($this->getSubForm('transport_form') instanceof ApiTransportForm) {
|
||||||
if (isset($formData['force_creation']) && $formData['force_creation']) {
|
if (! isset($formData['transport_validation'])
|
||||||
|
&& isset($formData['force_creation']) && $formData['force_creation']
|
||||||
|
) {
|
||||||
// ignore any validation result
|
// ignore any validation result
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,7 @@ class MonitoringWizard extends Wizard implements SetupWizard
|
|||||||
* @param Form $page The page to add the buttons to
|
* @param Form $page The page to add the buttons to
|
||||||
*
|
*
|
||||||
* @todo This is never called, because its a sub-wizard only
|
* @todo This is never called, because its a sub-wizard only
|
||||||
|
* @todo This is missing the ´transport_validation´ case
|
||||||
* @see WebWizard::addButtons which does some of the needed work
|
* @see WebWizard::addButtons which does some of the needed work
|
||||||
*/
|
*/
|
||||||
protected function addButtons(Form $page)
|
protected function addButtons(Form $page)
|
||||||
|
@ -36,6 +36,7 @@ use Icinga\Module\Setup\Requirement\PhpConfigRequirement;
|
|||||||
use Icinga\Module\Setup\Requirement\PhpModuleRequirement;
|
use Icinga\Module\Setup\Requirement\PhpModuleRequirement;
|
||||||
use Icinga\Module\Setup\Requirement\PhpVersionRequirement;
|
use Icinga\Module\Setup\Requirement\PhpVersionRequirement;
|
||||||
use Icinga\Module\Setup\Requirement\ConfigDirectoryRequirement;
|
use Icinga\Module\Setup\Requirement\ConfigDirectoryRequirement;
|
||||||
|
use Icinga\Module\Monitoring\Forms\Config\Transport\ApiTransportForm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Icinga Web 2 Setup Wizard
|
* Icinga Web 2 Setup Wizard
|
||||||
@ -383,6 +384,7 @@ class WebWizard extends Wizard implements SetupWizard
|
|||||||
|
|
||||||
// TODO(mf): This should be handled by MonitoringWizard
|
// TODO(mf): This should be handled by MonitoringWizard
|
||||||
if ($page->getName() === 'setup_command_transport') {
|
if ($page->getName() === 'setup_command_transport') {
|
||||||
|
if ($page->getSubForm('transport_form')->getSubForm('transport_form') instanceof ApiTransportForm) {
|
||||||
$page->addElement(
|
$page->addElement(
|
||||||
'submit',
|
'submit',
|
||||||
'transport_validation',
|
'transport_validation',
|
||||||
@ -396,6 +398,7 @@ class WebWizard extends Wizard implements SetupWizard
|
|||||||
$page->getDisplayGroup('buttons')->addElement($page->getElement('transport_validation'));
|
$page->getDisplayGroup('buttons')->addElement($page->getElement('transport_validation'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the session being used by this wizard
|
* Clear the session being used by this wizard
|
||||||
|
Loading…
x
Reference in New Issue
Block a user