`MonitoredObjectController`: Access `MonitoredObject::fetchEventhistory()` with correct name case

This commit is contained in:
raviks789 2023-08-14 11:05:01 +02:00
parent 72d155c57d
commit 00f367c7d6
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\RemoveAcknowledgementCommandFo
use Icinga\Module\Monitoring\Forms\Command\Object\ToggleObjectFeaturesCommandForm; use Icinga\Module\Monitoring\Forms\Command\Object\ToggleObjectFeaturesCommandForm;
use Icinga\Module\Monitoring\Hook\DetailviewExtensionHook; use Icinga\Module\Monitoring\Hook\DetailviewExtensionHook;
use Icinga\Module\Monitoring\Hook\ObjectDetailsTabHook; use Icinga\Module\Monitoring\Hook\ObjectDetailsTabHook;
use Icinga\Module\Monitoring\Object\Service;
use Icinga\Web\Hook; use Icinga\Web\Hook;
use Icinga\Web\Url; use Icinga\Web\Url;
use Icinga\Web\Widget\Tabextension\DashboardAction; use Icinga\Web\Widget\Tabextension\DashboardAction;
@ -116,7 +117,7 @@ abstract class MonitoredObjectController extends Controller
public function historyAction() public function historyAction()
{ {
$this->getTabs()->activate('history'); $this->getTabs()->activate('history');
$this->view->history = $this->object->fetchEventHistory()->eventhistory; $this->view->history = $this->object->fetchEventhistory()->eventhistory;
$this->applyRestriction('monitoring/filter/objects', $this->view->history); $this->applyRestriction('monitoring/filter/objects', $this->view->history);
$this->setupLimitControl(50); $this->setupLimitControl(50);
@ -229,6 +230,7 @@ abstract class MonitoredObjectController extends Controller
} }
} else { } else {
$isService = true; $isService = true;
/** @var Service $object */
$params = array( $params = array(
'host' => $object->getHost()->getName(), 'host' => $object->getHost()->getName(),
'service' => $object->getName() 'service' => $object->getName()