mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Use UrlParams::addValues instead Url::setParams
Previously `Url::setParams()` was used by `ServiceController::historyAction` to set `name` and `host.name`, since the function overwrites all parameters the sort parameter was not included in the loadMoreUrl. `UrlParams::addValues` fixes this problem sicne is keeps the existing parameters. For consistency `HostController::historyAction` is also adjusted to match this implementation.
This commit is contained in:
parent
07df145091
commit
abc8aaf23e
2 changed files with 7 additions and 4 deletions
|
|
@ -141,8 +141,9 @@ class HostController extends Controller
|
|||
|
||||
$before = $this->params->shift('before', time());
|
||||
$previousTimestamp = $this->params->shift('last-entry');
|
||||
$url = Url::fromRequest()->setParams(clone $this->params);
|
||||
$url->setParam('name', $this->host->name);
|
||||
$url = Url::fromRequest()->setParams(
|
||||
(clone $this->params)->add('name', $this->host->name)
|
||||
);
|
||||
|
||||
$timestampControl = $this->createTimestampControl();
|
||||
$limitControl = $this->createLimitControl();
|
||||
|
|
|
|||
|
|
@ -291,8 +291,10 @@ class ServiceController extends Controller
|
|||
|
||||
$before = $this->params->shift('before', time());
|
||||
$previousTimestamp = $this->params->shift('last-entry');
|
||||
$url = Url::fromRequest()->setParams(clone $this->params);
|
||||
$url->setParams(['name' => $this->service->name, 'host.name' => $this->service->host->name]);
|
||||
$url = Url::fromRequest()->setParams(
|
||||
(clone $this->params)
|
||||
->addValues(['name' => $this->service->name, 'host.name' => $this->service->host->name])
|
||||
);
|
||||
|
||||
$timestampControl = $this->createTimestampControl();
|
||||
$limitControl = $this->createLimitControl();
|
||||
|
|
|
|||
Loading…
Reference in a new issue