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

25 lines
766 B
PHP
Raw Normal View History

2015-07-26 15:39:37 +02:00
<?php
2015-10-20 22:34:04 +02:00
namespace Icinga\Module\Director\Controllers;
use Icinga\Module\Director\Objects\ImportRun;
2015-07-26 15:39:37 +02:00
use Icinga\Module\Director\Web\Controller\ActionController;
use Icinga\Module\Director\Web\Table\ImportedrowsTable;
2015-07-26 15:39:37 +02:00
2015-10-20 22:34:04 +02:00
class ImportrunController extends ActionController
2015-07-26 15:39:37 +02: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 16:30:12 +02:00
$table->renderTo($this);
2015-07-26 15:39:37 +02:00
}
}