monitoring: Fix that exporting a object's history throws an exception

fixes #6586
This commit is contained in:
Eric Lippmann 2014-12-29 17:54:09 +01:00
parent fd044017fb
commit e376bd6285
2 changed files with 2 additions and 3 deletions

View File

@ -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();
}

View File

@ -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;
}