monitoring: Fix that exporting a object's history throws an exception
fixes #6586
This commit is contained in:
parent
fd044017fb
commit
e376bd6285
|
@ -73,9 +73,8 @@ class Monitoring_ShowController extends Controller
|
|||
public function historyAction()
|
||||
{
|
||||
$this->getTabs()->activate('history');
|
||||
//$this->view->object->populate();
|
||||
$this->view->object->fetchEventHistory();
|
||||
$this->view->history = $this->view->object->eventhistory->paginate($this->params->get('limit', 50));
|
||||
$this->view->history = $this->view->object->eventhistory->getQuery()->paginate($this->params->get('limit', 50));
|
||||
$this->handleFormatRequest($this->view->object->eventhistory);
|
||||
$this->fetchHostStats();
|
||||
}
|
||||
|
|
|
@ -421,7 +421,7 @@ abstract class MonitoredObject
|
|||
if ($this->type === self::TYPE_SERVICE) {
|
||||
$eventHistory->where('service_description', $this->service_description);
|
||||
}
|
||||
$this->eventhistory = $eventHistory->getQuery();
|
||||
$this->eventhistory = $eventHistory;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue