mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
Merge pull request #3247 from mdetrano/feature/improve-eventgrid-performance-12732
Improve Event Grid performance
This commit is contained in:
commit
a063cc9dcf
@ -361,13 +361,16 @@ class ListController extends Controller
|
|||||||
);
|
);
|
||||||
$orientationBox->applyRequest($this->getRequest());
|
$orientationBox->applyRequest($this->getRequest());
|
||||||
*/
|
*/
|
||||||
|
$objectType = $form->getValue('objecttype');
|
||||||
|
$from = $form->getValue('from');
|
||||||
$query = $this->backend->select()->from(
|
$query = $this->backend->select()->from(
|
||||||
'eventgrid',
|
'eventgrid' . $objectType,
|
||||||
array('day', $form->getValue('state'))
|
array('day', $form->getValue('state'))
|
||||||
);
|
);
|
||||||
$this->params->remove(array('objecttype', 'from', 'to', 'state', 'btn_submit'));
|
$this->params->remove(array('objecttype', 'from', 'to', 'state', 'btn_submit'));
|
||||||
$this->view->filter = Filter::fromQuerystring((string) $this->params);
|
$this->view->filter = Filter::fromQuerystring((string) $this->params);
|
||||||
$query->applyFilter($this->view->filter);
|
$query->applyFilter($this->view->filter);
|
||||||
|
$query->applyFilter(Filter::fromQuerystring('timestamp >= ' . $from));
|
||||||
$this->applyRestriction('monitoring/filter/objects', $query);
|
$this->applyRestriction('monitoring/filter/objects', $query);
|
||||||
$this->view->summary = $query;
|
$this->view->summary = $query;
|
||||||
$this->view->column = $form->getValue('state');
|
$this->view->column = $form->getValue('state');
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
||||||
|
|
||||||
|
class EventgridhostsQuery extends EventgridQuery
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Join history related columns and tables, hosts only
|
||||||
|
*/
|
||||||
|
protected function joinHistory()
|
||||||
|
{
|
||||||
|
$this->fetchHistoryColumns = true;
|
||||||
|
$this->requireVirtualTable('hosts');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Monitoring\Backend\Ido\Query;
|
||||||
|
|
||||||
|
class EventgridservicesQuery extends EventgridQuery
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Join history related columns and tables, services only
|
||||||
|
*/
|
||||||
|
protected function joinHistory()
|
||||||
|
{
|
||||||
|
$this->fetchHistoryColumns = true;
|
||||||
|
$this->requireVirtualTable('services');
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Monitoring\DataView;
|
||||||
|
|
||||||
|
class Eventgridhosts extends Eventgrid
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Monitoring\DataView;
|
||||||
|
|
||||||
|
class Eventgridservices extends Eventgrid
|
||||||
|
{
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user