mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
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\Util;
|
||||||
use Icinga\Module\Director\Web\Controller\ActionController;
|
use Icinga\Module\Director\Web\Controller\ActionController;
|
||||||
use Icinga\Module\Director\Web\Tabs\InfraTabs;
|
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\DeployedConfigInfoHeader;
|
||||||
use Icinga\Module\Director\Web\Widget\ShowConfigFile;
|
use Icinga\Module\Director\Web\Widget\ShowConfigFile;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
@ -139,6 +140,27 @@ class ConfigController extends ActionController
|
|||||||
$table->renderTo($this);
|
$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()
|
public function settingsAction()
|
||||||
{
|
{
|
||||||
$this->assertPermission('director/admin');
|
$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 . ']',
|
'[' . $row->author . ']',
|
||||||
Link::create(
|
Link::create(
|
||||||
$row->action,
|
$row->action,
|
||||||
'director/show/activitylog',
|
'director/config/activity',
|
||||||
array_merge(['id' => $row->id], $this->extraParams),
|
array_merge(['id' => $row->id], $this->extraParams),
|
||||||
['title' => $this->translate('Show details related to this change')]
|
['title' => $this->translate('Show details related to this change')]
|
||||||
),
|
),
|
||||||
|
@ -62,7 +62,7 @@ class DeployedConfigInfoHeader extends Html
|
|||||||
Html::br(),
|
Html::br(),
|
||||||
Link::create(
|
Link::create(
|
||||||
$this->translate('Last related activity'),
|
$this->translate('Last related activity'),
|
||||||
'director/show/activitylog',
|
'director/config/activity',
|
||||||
['checksum' => $config->getLastActivityHexChecksum()],
|
['checksum' => $config->getLastActivityHexChecksum()],
|
||||||
['class' => 'icon-clock', 'data-base-target' => '_next']
|
['class' => 'icon-clock', 'data-base-target' => '_next']
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user