icingaweb2-module-director/application/controllers/KickstartController.php

25 lines
630 B
PHP
Raw Normal View History

<?php
namespace Icinga\Module\Director\Controllers;
use Exception;
use Icinga\Module\Director\Forms\KickstartForm;
class KickstartController extends DashboardController
{
public function indexAction()
{
2017-07-13 15:22:14 +02:00
$this->addSingleTab($this->translate('Kickstart'))
->addTitle($this->translate('Director Kickstart Wizard'));
$form = KickstartForm::load();
try {
$form->setEndpoint($this->db()->getDeploymentEndpoint());
} catch (Exception $e) {
// Silently ignore DB errors
}
$form->handleRequest();
$this->content()->add($form);
}
}