show/actitivitylog: move to config/activity
This commit is contained in:
parent
b21ba5dc54
commit
ad6dceae99
|
@ -16,6 +16,7 @@ use Icinga\Module\Director\Web\Table\GeneratedConfigFileTable;
|
|||
use Icinga\Module\Director\Util;
|
||||
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||
use Icinga\Module\Director\Web\Tabs\InfraTabs;
|
||||
use Icinga\Module\Director\Web\Widget\ActivityLogInfo;
|
||||
use Icinga\Module\Director\Web\Widget\DeployedConfigInfoHeader;
|
||||
use Icinga\Module\Director\Web\Widget\ShowConfigFile;
|
||||
use Icinga\Web\Notification;
|
||||
|
@ -139,6 +140,27 @@ class ConfigController extends ActionController
|
|||
$table->renderTo($this);
|
||||
}
|
||||
|
||||
public function activityAction()
|
||||
{
|
||||
$this->assertPermission('director/showconfig');
|
||||
$p = $this->params;
|
||||
$info = new ActivityLogInfo(
|
||||
$this->db(),
|
||||
$p->get('type'),
|
||||
$p->get('name')
|
||||
);
|
||||
|
||||
$info->setChecksum($p->get('checksum'))
|
||||
->setId($p->get('id'));
|
||||
|
||||
$this->tabs($info->getTabs($this->url()));
|
||||
$info->showTab($this->params->get('show'));
|
||||
|
||||
$this->addTitle($info->getTitle());
|
||||
$this->controls()->prepend($info->getPagination($this->url()));
|
||||
$this->content()->add($info);
|
||||
}
|
||||
|
||||
public function settingsAction()
|
||||
{
|
||||
$this->assertPermission('director/admin');
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Director\Controllers;
|
||||
|
||||
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||
use Icinga\Module\Director\Web\Widget\ActivityLogInfo;
|
||||
|
||||
class ShowController extends ActionController
|
||||
{
|
||||
protected function checkDirectorPermissions()
|
||||
{
|
||||
$this->assertPermission('director/showconfig');
|
||||
}
|
||||
|
||||
public function activitylogAction()
|
||||
{
|
||||
$p = $this->params;
|
||||
$info = new ActivityLogInfo(
|
||||
$this->db(),
|
||||
$p->get('type'),
|
||||
$p->get('name')
|
||||
);
|
||||
|
||||
$info->setChecksum($p->get('checksum'))
|
||||
->setId($p->get('id'));
|
||||
|
||||
$this->tabs($info->getTabs($this->url()));
|
||||
$info->showTab($this->params->get('show'));
|
||||
|
||||
$this->addTitle($info->getTitle());
|
||||
$this->controls()->prepend($info->getPagination($this->url()));
|
||||
$this->content()->add($info);
|
||||
}
|
||||
}
|
|
@ -86,7 +86,7 @@ class ActivityLogTable extends ZfQueryBasedTable
|
|||
'[' . $row->author . ']',
|
||||
Link::create(
|
||||
$row->action,
|
||||
'director/show/activitylog',
|
||||
'director/config/activity',
|
||||
array_merge(['id' => $row->id], $this->extraParams),
|
||||
['title' => $this->translate('Show details related to this change')]
|
||||
),
|
||||
|
|
|
@ -62,7 +62,7 @@ class DeployedConfigInfoHeader extends Html
|
|||
Html::br(),
|
||||
Link::create(
|
||||
$this->translate('Last related activity'),
|
||||
'director/show/activitylog',
|
||||
'director/config/activity',
|
||||
['checksum' => $config->getLastActivityHexChecksum()],
|
||||
['class' => 'icon-clock', 'data-base-target' => '_next']
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue