mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
ConfigController: fix search in id-range filtered
...activities fixes #1381
This commit is contained in:
parent
42ea7a5a05
commit
6d781e09e3
@ -142,8 +142,11 @@ class ConfigController extends ActionController
|
||||
$lastDeployedId = $this->db()->getLastDeploymentActivityLogId();
|
||||
$table = new ActivityLogTable($this->db());
|
||||
$table->setLastDeployedId($lastDeployedId);
|
||||
if ($idRangeEx = $this->url()->getParam('idRangeEx')) {
|
||||
$table->applyFilter(Filter::fromQueryString($idRangeEx));
|
||||
}
|
||||
$filter = Filter::fromQueryString(
|
||||
$this->url()->without(['page', 'limit', 'q'])->getQueryString()
|
||||
$this->url()->without(['page', 'limit', 'q', 'idRangeEx'])->getQueryString()
|
||||
);
|
||||
$table->applyFilter($filter);
|
||||
if ($this->url()->hasParam('author')) {
|
||||
|
@ -58,11 +58,12 @@ class SyncRunDetails extends NameValueTable
|
||||
$formerId = $db->fetchActivityLogIdByChecksum($run->last_former_activity);
|
||||
$lastId = $db->fetchActivityLogIdByChecksum($run->last_related_activity);
|
||||
|
||||
$activityUrl = sprintf(
|
||||
'director/config/activities?id>%d&id<=%d',
|
||||
$idRangeEx = sprintf(
|
||||
'id>%d&id<=%d',
|
||||
$formerId,
|
||||
$lastId
|
||||
);
|
||||
$activityUrl = 'director/config/activities';
|
||||
|
||||
$links = new HtmlDocument();
|
||||
$links->setSeparator(', ');
|
||||
@ -70,28 +71,29 @@ class SyncRunDetails extends NameValueTable
|
||||
$links->add(new Link(
|
||||
sprintf('%d created', $run->objects_created),
|
||||
$activityUrl,
|
||||
['action' => 'create']
|
||||
['action' => 'create', 'idRangeEx' => $idRangeEx]
|
||||
));
|
||||
}
|
||||
if ($run->objects_modified > 0) {
|
||||
$links->add(new Link(
|
||||
sprintf('%d modified', $run->objects_modified),
|
||||
$activityUrl,
|
||||
['action' => 'modify']
|
||||
['action' => 'modify', 'idRangeEx' => $idRangeEx]
|
||||
));
|
||||
}
|
||||
if ($run->objects_deleted > 0) {
|
||||
$links->add(new Link(
|
||||
sprintf('%d deleted', $run->objects_deleted),
|
||||
$activityUrl,
|
||||
['action' => 'delete']
|
||||
['action' => 'delete', 'idRangeEx' => $idRangeEx]
|
||||
));
|
||||
}
|
||||
|
||||
if (count($links) > 1) {
|
||||
$links->add(new Link(
|
||||
'Show all actions',
|
||||
$activityUrl
|
||||
$activityUrl,
|
||||
['idRangeEx' => $idRangeEx]
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user