mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-02-03 20:40:15 -05:00
Add hostgroup filtering support for SLA history
This commit is contained in:
parent
bf431dc690
commit
54765ed17a
3 changed files with 14 additions and 0 deletions
|
|
@ -286,7 +286,9 @@ class Host extends Model
|
|||
|
||||
$relations->hasMany('comment', Comment::class)->setJoinType('LEFT');
|
||||
$relations->hasMany('downtime', Downtime::class)->setJoinType('LEFT');
|
||||
$relations->hasMany('sla_history_downtime', SlaHistoryDowntime::class)->setJoinType('LEFT');
|
||||
$relations->hasMany('history', History::class);
|
||||
$relations->hasMany('sla_history_state', SlaHistoryState::class);
|
||||
$relations->hasMany('notification', Notification::class)->setJoinType('LEFT');
|
||||
$relations->hasMany('notification_history', NotificationHistory::class);
|
||||
$relations->hasMany('service', Service::class)->setJoinType('LEFT');
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use ipl\Orm\Behavior\Binary;
|
|||
use ipl\Orm\Behavior\MillisecondTimestamp;
|
||||
use ipl\Orm\Behaviors;
|
||||
use Icinga\Module\Icingadb\Common\Model;
|
||||
use Icinga\Module\Icingadb\Model\Behavior\ReRoute;
|
||||
use ipl\Orm\Relations;
|
||||
|
||||
/**
|
||||
|
|
@ -62,6 +63,11 @@ class SlaHistoryDowntime extends Model
|
|||
'service_id',
|
||||
'downtime_id'
|
||||
]));
|
||||
|
||||
$behaviors->add(new ReRoute([
|
||||
'hostgroup' => 'host.hostgroup',
|
||||
'servicegroup' => 'service.servicegroup'
|
||||
]));
|
||||
}
|
||||
|
||||
public function createRelations(Relations $relations)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use ipl\Orm\Behavior\Binary;
|
|||
use ipl\Orm\Behavior\MillisecondTimestamp;
|
||||
use ipl\Orm\Behaviors;
|
||||
use Icinga\Module\Icingadb\Common\Model;
|
||||
use Icinga\Module\Icingadb\Model\Behavior\ReRoute;
|
||||
use ipl\Orm\Relations;
|
||||
|
||||
/**
|
||||
|
|
@ -61,6 +62,11 @@ class SlaHistoryState extends Model
|
|||
'service_id',
|
||||
'downtime_id'
|
||||
]));
|
||||
|
||||
$behaviors->add(new ReRoute([
|
||||
'hostgroup' => 'host.hostgroup',
|
||||
'servicegroup' => 'service.servicegroup'
|
||||
]));
|
||||
}
|
||||
|
||||
public function createRelations(Relations $relations)
|
||||
|
|
|
|||
Loading…
Reference in a new issue