parent
28d16a8961
commit
288ae6885b
|
@ -2,6 +2,7 @@
|
|||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
use Icinga\Application\WebSetup;
|
||||
use Icinga\Web\Controller\ActionController;
|
||||
|
||||
class SetupController extends ActionController
|
||||
|
@ -16,10 +17,28 @@ class SetupController extends ActionController
|
|||
protected $requiresAuthentication = false;
|
||||
|
||||
/**
|
||||
* Show the web wizard
|
||||
* Show the web wizard and run the installation once finished
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
|
||||
$wizard = new WebSetup();
|
||||
|
||||
if ($wizard->isFinished()) {
|
||||
$installer = $wizard->getInstaller();
|
||||
$success = $installer->run();
|
||||
if ($success) {
|
||||
$wizard->getSession()->clear();
|
||||
} else {
|
||||
$wizard->setIsFinished(false);
|
||||
}
|
||||
|
||||
$this->view->success = $success;
|
||||
$this->view->report = $installer->getReport();
|
||||
$this->render('install');
|
||||
} else {
|
||||
$wizard->handleRequest();
|
||||
$this->view->wizard = $wizard;
|
||||
$this->render('wizard');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?= $wizard->getForm()->render(); ?>
|
Loading…
Reference in New Issue