mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
parent
0349a1042a
commit
c119c47864
@ -2945,6 +2945,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
}
|
||||
}
|
||||
|
||||
public function listFlatResolvedImportNames()
|
||||
{
|
||||
return $this->templateTree()->getAncestorsFor($this);
|
||||
}
|
||||
|
||||
public function listImportIds()
|
||||
{
|
||||
return $this->templateTree()->listParentIdsFor($this);
|
||||
|
@ -212,9 +212,8 @@ abstract class ObjectApplyMatches
|
||||
$this->object = $object;
|
||||
$this->flatObject = $object->toPlainObject(true, false);
|
||||
// Sure, we are flat - but we might still want to match templates.
|
||||
// TODO: Flatten the whole tree
|
||||
unset($this->flatObject->imports);
|
||||
$this->flatObject->templates = $object->imports()->listImportNames();
|
||||
$this->flatObject->templates = $object->listFlatResolvedImportNames();
|
||||
static::flattenVars($this->flatObject);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user