servicegrid: Properly handle `?flipped=0`

refs #2640
This commit is contained in:
Johannes Meyer 2018-05-07 14:14:34 +02:00
parent 568d473c40
commit 9b76ff5539
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ $xAxisPages = $xAxisPaginator->getPages('all');
$yAxisPages = $yAxisPaginator->getPages('all');
$flipUrl = Url::fromRequest();
if ($flipUrl->hasParam('flipped')) {
if ($flipUrl->getParam('flipped')) {
$flipUrl->remove('flipped');
} else {
$flipUrl->setParam('flipped');

View File

@ -589,7 +589,7 @@ class ListController extends Controller
$this->applyRestriction('monitoring/filter/objects', $query);
$this->filterQuery($query);
$filter = (bool) $this->params->shift('problems', false) ? Filter::where('service_problem', 1) : null;
if ($this->params->has('flipped')) {
if ($this->params->get('flipped', false)) {
$pivot = $query
->pivot(
'host_name',
@ -619,7 +619,7 @@ class ListController extends Controller
list($pivotData, $pivotHeader) = $pivot->toArray();
$this->view->pivotData = $pivotData;
$this->view->pivotHeader = $pivotHeader;
if ($this->params->get('flipped')) {
if ($this->params->get('flipped', false)) {
$this->render('servicegrid-flipped');
}
}