mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +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();
|
$lastDeployedId = $this->db()->getLastDeploymentActivityLogId();
|
||||||
$table = new ActivityLogTable($this->db());
|
$table = new ActivityLogTable($this->db());
|
||||||
$table->setLastDeployedId($lastDeployedId);
|
$table->setLastDeployedId($lastDeployedId);
|
||||||
|
if ($idRangeEx = $this->url()->getParam('idRangeEx')) {
|
||||||
|
$table->applyFilter(Filter::fromQueryString($idRangeEx));
|
||||||
|
}
|
||||||
$filter = Filter::fromQueryString(
|
$filter = Filter::fromQueryString(
|
||||||
$this->url()->without(['page', 'limit', 'q'])->getQueryString()
|
$this->url()->without(['page', 'limit', 'q', 'idRangeEx'])->getQueryString()
|
||||||
);
|
);
|
||||||
$table->applyFilter($filter);
|
$table->applyFilter($filter);
|
||||||
if ($this->url()->hasParam('author')) {
|
if ($this->url()->hasParam('author')) {
|
||||||
|
@ -58,11 +58,12 @@ class SyncRunDetails extends NameValueTable
|
|||||||
$formerId = $db->fetchActivityLogIdByChecksum($run->last_former_activity);
|
$formerId = $db->fetchActivityLogIdByChecksum($run->last_former_activity);
|
||||||
$lastId = $db->fetchActivityLogIdByChecksum($run->last_related_activity);
|
$lastId = $db->fetchActivityLogIdByChecksum($run->last_related_activity);
|
||||||
|
|
||||||
$activityUrl = sprintf(
|
$idRangeEx = sprintf(
|
||||||
'director/config/activities?id>%d&id<=%d',
|
'id>%d&id<=%d',
|
||||||
$formerId,
|
$formerId,
|
||||||
$lastId
|
$lastId
|
||||||
);
|
);
|
||||||
|
$activityUrl = 'director/config/activities';
|
||||||
|
|
||||||
$links = new HtmlDocument();
|
$links = new HtmlDocument();
|
||||||
$links->setSeparator(', ');
|
$links->setSeparator(', ');
|
||||||
@ -70,28 +71,29 @@ class SyncRunDetails extends NameValueTable
|
|||||||
$links->add(new Link(
|
$links->add(new Link(
|
||||||
sprintf('%d created', $run->objects_created),
|
sprintf('%d created', $run->objects_created),
|
||||||
$activityUrl,
|
$activityUrl,
|
||||||
['action' => 'create']
|
['action' => 'create', 'idRangeEx' => $idRangeEx]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if ($run->objects_modified > 0) {
|
if ($run->objects_modified > 0) {
|
||||||
$links->add(new Link(
|
$links->add(new Link(
|
||||||
sprintf('%d modified', $run->objects_modified),
|
sprintf('%d modified', $run->objects_modified),
|
||||||
$activityUrl,
|
$activityUrl,
|
||||||
['action' => 'modify']
|
['action' => 'modify', 'idRangeEx' => $idRangeEx]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if ($run->objects_deleted > 0) {
|
if ($run->objects_deleted > 0) {
|
||||||
$links->add(new Link(
|
$links->add(new Link(
|
||||||
sprintf('%d deleted', $run->objects_deleted),
|
sprintf('%d deleted', $run->objects_deleted),
|
||||||
$activityUrl,
|
$activityUrl,
|
||||||
['action' => 'delete']
|
['action' => 'delete', 'idRangeEx' => $idRangeEx]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($links) > 1) {
|
if (count($links) > 1) {
|
||||||
$links->add(new Link(
|
$links->add(new Link(
|
||||||
'Show all actions',
|
'Show all actions',
|
||||||
$activityUrl
|
$activityUrl,
|
||||||
|
['idRangeEx' => $idRangeEx]
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user