mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
parent
b6375b477d
commit
c709c00fbd
@ -20,6 +20,7 @@ next (will be 1.9.0)
|
||||
### User Interface
|
||||
* FIX: allow switching DB config while connection is failing (#2300)
|
||||
* FIX: show Override button when all Fields belong to Field Categories (#2303)
|
||||
* FIX: show Services applied with Rules involving applied Hostgroups (#2313)
|
||||
* FEATURE: show "deprecated" flag on object attribute inspection (#2312)
|
||||
|
||||
next patch release (will be 1.8.1)
|
||||
|
@ -213,10 +213,26 @@ abstract class ObjectApplyMatches
|
||||
protected function __construct(IcingaObject $object)
|
||||
{
|
||||
$this->object = $object;
|
||||
$this->flatObject = $object->toPlainObject(true, false);
|
||||
$flat = $object->toPlainObject(true, false);
|
||||
// Sure, we are flat - but we might still want to match templates.
|
||||
unset($this->flatObject->imports);
|
||||
$this->flatObject->templates = $object->listFlatResolvedImportNames();
|
||||
static::flattenVars($this->flatObject);
|
||||
unset($flat->imports);
|
||||
$flat->templates = $object->listFlatResolvedImportNames();
|
||||
$this->addAppliedGroupsToFlatObject($flat, $object);
|
||||
static::flattenVars($flat);
|
||||
$this->flatObject = $flat;
|
||||
}
|
||||
|
||||
protected function addAppliedGroupsToFlatObject($flat, IcingaObject $object)
|
||||
{
|
||||
if ($object instanceof IcingaHost) {
|
||||
$appliedGroups = $object->getAppliedGroups();
|
||||
if (! empty($appliedGroups)) {
|
||||
if (isset($flat->groups)) {
|
||||
$flat->groups = array_merge($flat->groups, $appliedGroups);
|
||||
} else {
|
||||
$flat->groups = $appliedGroups;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user