2015-07-26 15:39:37 +02:00
|
|
|
<?php
|
|
|
|
|
2015-10-20 22:34:04 +02:00
|
|
|
namespace Icinga\Module\Director\Controllers;
|
|
|
|
|
2016-07-13 10:19:51 +02:00
|
|
|
use Icinga\Module\Director\Objects\ImportRun;
|
2015-07-26 15:39:37 +02:00
|
|
|
use Icinga\Module\Director\Web\Controller\ActionController;
|
2017-08-16 14:55:34 +02:00
|
|
|
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()
|
|
|
|
{
|
2017-08-16 14:55:34 +02:00
|
|
|
$importRun = ImportRun::load($this->params->getRequired('id'), $this->db());
|
|
|
|
$this->addTitle($this->translate('Import run'));
|
|
|
|
$this->addSingleTab($this->translate('Import run'));
|
2016-07-13 10:19:51 +02:00
|
|
|
|
2017-08-16 14:55:34 +02:00
|
|
|
$table = ImportedrowsTable::load($importRun);
|
|
|
|
if ($chosen = $this->params->get('chosenColumns')) {
|
|
|
|
$table->setColumns(preg_split('/,/', $chosen, -1, PREG_SPLIT_NO_EMPTY));
|
2016-07-13 10:19:51 +02:00
|
|
|
}
|
2016-06-26 16:30:12 +02:00
|
|
|
|
2017-08-16 14:55:34 +02:00
|
|
|
$table->renderTo($this);
|
2015-07-26 15:39:37 +02:00
|
|
|
}
|
|
|
|
}
|