monitoring/show/services: do not limit result

Still a little bit hackish, we will replace this once we have a request
object fully aware of our new UrlParams parser.

fixes #6511
This commit is contained in:
Thomas Gelf 2014-06-20 14:16:36 +02:00
parent 4821c6e3e5
commit a8bde7cc14
2 changed files with 5 additions and 5 deletions

View File

@ -162,7 +162,8 @@ class Monitoring_ListController extends Controller
'host_address' => 'Host Address', 'host_address' => 'Host Address',
'host_last_check' => 'Last Host Check' 'host_last_check' => 'Last Host Check'
)); ));
$this->view->services = $query->paginate(); // TODO: Workaround, paginate should be able to fetch limit from new params
$this->view->services = $query->paginate($this->params->get('limit'));
} }
/** /**

View File

@ -100,7 +100,8 @@ class Monitoring_ShowController extends Controller
//$this->view->object->populate(); //$this->view->object->populate();
$this->view->object->fetchEventHistory(); $this->view->object->fetchEventHistory();
$this->handleFormatRequest($this->view->object->eventhistory); $this->handleFormatRequest($this->view->object->eventhistory);
$this->view->history = $this->view->object->eventhistory->paginate(50); $this->view->history = $this->view->object->eventhistory
->paginate($this->params->get('limit', 50));
} }
public function servicesAction() public function servicesAction()
@ -108,12 +109,10 @@ class Monitoring_ShowController extends Controller
$this->getTabs()->activate('services'); $this->getTabs()->activate('services');
$this->_setParam('service', ''); $this->_setParam('service', '');
// TODO: This used to be a hack and still is. Modifying query string here. // TODO: This used to be a hack and still is. Modifying query string here.
$_SERVER['QUERY_STRING'] = (string) $this->params->without('service'); $_SERVER['QUERY_STRING'] = (string) $this->params->without('service')->set('limit', '');
$this->view->services = $this->view->action('services', 'list', 'monitoring', array( $this->view->services = $this->view->action('services', 'list', 'monitoring', array(
'view' => 'compact', 'view' => 'compact',
'limit' => '',
'sort' => 'service_description', 'sort' => 'service_description',
'service' => ''
)); ));
} }