mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-04-29 18:11:02 -04:00
db: Add dependency relations to Host model
This commit is contained in:
parent
09fc7da265
commit
d282272fed
1 changed files with 4 additions and 0 deletions
|
|
@ -181,6 +181,8 @@ class Host extends Model
|
|||
]));
|
||||
|
||||
$behaviors->add(new ReRoute([
|
||||
'child' => 'dependency_node.child',
|
||||
'parent' => 'dependency_node.parent',
|
||||
'servicegroup' => 'service.servicegroup',
|
||||
'user' => 'notification.user',
|
||||
'usergroup' => 'notification.usergroup'
|
||||
|
|
@ -235,6 +237,8 @@ class Host extends Model
|
|||
|
||||
public function createRelations(Relations $relations)
|
||||
{
|
||||
$relations->belongsTo('dependency_node', DependencyNode::class)
|
||||
->setJoinType('LEFT');
|
||||
$relations->belongsTo('environment', Environment::class);
|
||||
$relations->belongsTo('eventcommand', Eventcommand::class);
|
||||
$relations->belongsTo('checkcommand', Checkcommand::class);
|
||||
|
|
|
|||
Loading…
Reference in a new issue