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

25 lines
766 B
PHP
Raw Permalink Normal View History

2015-07-26 09:39:37 -04:00
<?php
2015-10-20 16:34:04 -04:00
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Objects\ImportRun;
2015-07-26 09:39:37 -04:00
use Icinga\Module\Director\Web\Controller\ActionController;
use Icinga\Module\Director\Web\Table\ImportedrowsTable;
2015-07-26 09:39:37 -04:00
2015-10-20 16:34:04 -04:00
class ImportrunController extends ActionController
2015-07-26 09:39:37 -04:00
{
public function indexAction()
{
$importRun = ImportRun::load($this->params->getRequired('id'), $this->db());
$this->addTitle($this->translate('Import run'));
$this->addSingleTab($this->translate('Import run'));
$table = ImportedrowsTable::load($importRun);
if ($chosen = $this->params->get('chosenColumns')) {
$table->setColumns(preg_split('/,/', $chosen, -1, PREG_SPLIT_NO_EMPTY));
}
2016-06-26 10:30:12 -04:00
$table->renderTo($this);
2015-07-26 09:39:37 -04:00
}
}