Skip to content

Commit 716ebce

Browse files
committed
Move problem toggle above shifting params
If the problem toggle is created after the params are shifted, it redirects to the page without them. To solve this I simply moved the problem toggle before shifting the params.
1 parent fa23e86 commit 716ebce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

application/controllers/ServicesController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,14 @@ public function gridAction()
242242

243243
$this->handleSearchRequest($query);
244244

245+
// Create problem toggle before shifting params. Otherwise, the toggle
246+
// will redirect to the grid without the shifted params.
247+
$problemToggle = $this->createProblemToggle();
248+
245249
$this->params->shift('page'); // Handled by PivotTable internally
246250
$this->params->shift('limit'); // Handled by PivotTable internally
247251
$flipped = $this->params->shift('flipped', false);
248252

249-
$problemToggle = $this->createProblemToggle();
250253
$sortControl = $this->createSortControl($query, [
251254
'service.display_name' => t('Service Name'),
252255
'host.display_name' => t('Host Name'),

0 commit comments

Comments
 (0)