summaryrefslogtreecommitdiffstats
path: root/library/Director/Web/Table/ActivityLogTable.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:48 +0000
commite6d4dfc040bbe3cb80a2ce65b82493b557f751fc (patch)
tree40bd6366b01b06f4d96fc8638f23a772263cb5e9 /library/Director/Web/Table/ActivityLogTable.php
parentReleasing progress-linux version 1.10.2-2~progress7.99u1. (diff)
downloadicingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.tar.xz
icingaweb2-module-director-e6d4dfc040bbe3cb80a2ce65b82493b557f751fc.zip
Merging upstream version 1.11.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Director/Web/Table/ActivityLogTable.php')
-rw-r--r--library/Director/Web/Table/ActivityLogTable.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/library/Director/Web/Table/ActivityLogTable.php b/library/Director/Web/Table/ActivityLogTable.php
index 5460bc2..a57b86e 100644
--- a/library/Director/Web/Table/ActivityLogTable.php
+++ b/library/Director/Web/Table/ActivityLogTable.php
@@ -2,14 +2,15 @@
namespace Icinga\Module\Director\Web\Table;
-use gipfl\Format\LocalTimeFormat;
+use DateTime;
use gipfl\IcingaWeb2\Link;
-use gipfl\IcingaWeb2\Table\ZfQueryBasedTable;
+use Icinga\Module\Director\Auth\Permission;
use Icinga\Module\Director\Util;
+use IntlDateFormatter;
use ipl\Html\Html;
use ipl\Html\HtmlElement;
-class ActivityLogTable extends ZfQueryBasedTable
+class ActivityLogTable extends IntlZfQueryBasedTable
{
protected $filters = [];
@@ -27,9 +28,6 @@ class ActivityLogTable extends ZfQueryBasedTable
'object_type',
];
- /** @var LocalTimeFormat */
- protected $timeFormat;
-
protected $ranges = [];
/** @var ?object */
@@ -44,7 +42,6 @@ class ActivityLogTable extends ZfQueryBasedTable
public function __construct($db)
{
parent::__construct($db);
- $this->timeFormat = new LocalTimeFormat();
}
public function assemble()
@@ -96,7 +93,9 @@ class ActivityLogTable extends ZfQueryBasedTable
if (! $this->hasObjectFilter) {
$columns[] = $this->makeRangeInfo($row->id);
}
- $columns[] = $this::td($this->timeFormat->getTime($row->ts_change_time));
+
+
+ $columns[] = $this::td($this->getTime($row->ts_change_time));
return $this::tr($columns)->addAttributes(['class' => $action]);
}
@@ -107,7 +106,7 @@ class ActivityLogTable extends ZfQueryBasedTable
*/
protected function renderDayIfNew($timestamp)
{
- $day = $this->getDateFormatter()->getFullDay($timestamp);
+ $day = $this->getDateFormatter()->format((new DateTime())->setTimestamp($timestamp));
if ($this->lastDay !== $day) {
$this->nextHeader()->add(
@@ -206,7 +205,7 @@ class ActivityLogTable extends ZfQueryBasedTable
$type = substr($type, 7);
}
- if (Util::hasPermission('director/showconfig')) {
+ if (Util::hasPermission(Permission::SHOW_CONFIG)) {
// Later on replacing, service_set -> serviceset
// multi column key :(