mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 18:59:05 +02:00
parent
b6375b477d
commit
c709c00fbd
@ -20,6 +20,7 @@ next (will be 1.9.0)
|
|||||||
### User Interface
|
### User Interface
|
||||||
* FIX: allow switching DB config while connection is failing (#2300)
|
* FIX: allow switching DB config while connection is failing (#2300)
|
||||||
* FIX: show Override button when all Fields belong to Field Categories (#2303)
|
* 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)
|
* FEATURE: show "deprecated" flag on object attribute inspection (#2312)
|
||||||
|
|
||||||
next patch release (will be 1.8.1)
|
next patch release (will be 1.8.1)
|
||||||
|
@ -213,10 +213,26 @@ abstract class ObjectApplyMatches
|
|||||||
protected function __construct(IcingaObject $object)
|
protected function __construct(IcingaObject $object)
|
||||||
{
|
{
|
||||||
$this->object = $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.
|
// Sure, we are flat - but we might still want to match templates.
|
||||||
unset($this->flatObject->imports);
|
unset($flat->imports);
|
||||||
$this->flatObject->templates = $object->listFlatResolvedImportNames();
|
$flat->templates = $object->listFlatResolvedImportNames();
|
||||||
static::flattenVars($this->flatObject);
|
$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