Show the web wizard, finally

refs #7163
This commit is contained in:
Johannes Meyer 2014-09-29 14:31:43 +02:00
parent 28d16a8961
commit 288ae6885b
3 changed files with 22 additions and 2 deletions

View File

@ -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');
}
}
}

View File

@ -0,0 +1 @@
<?= $wizard->getForm()->render(); ?>