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

22 lines
558 B
PHP
Raw Normal View History

<?php
use Icinga\Module\Director\ActionController;
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
2015-06-23 14:37:23 +02:00
use Icinga\Module\Director\Util;
2015-06-17 18:57:51 +02:00
class Director_ConfigController extends ActionController
{
public function showAction()
{
2015-06-23 14:37:23 +02:00
$this->view->config = IcingaConfig::fromDb(Util::hex2binary($this->params->get('checksum')), $this->db());
}
2015-06-17 18:57:51 +02:00
public function storeAction()
{
/** @var IcingaConfig $config */
$config = IcingaConfig::generate($this->db());
2015-06-17 19:04:04 +02:00
$this->view->id = $config->getHexChecksum();
2015-06-17 18:57:51 +02:00
}
}