legacy/IcingaTimeperiod: Support rendering of excludes
This commit is contained in:
parent
0d879c60d3
commit
e8c64a422b
|
@ -2176,6 +2176,19 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function renderLegacyMultiRelations()
|
||||
{
|
||||
$out = '';
|
||||
foreach ($this->loadAllMultiRelations() as $rel) {
|
||||
$out .= $rel->toLegacyConfigString();
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@ -2393,11 +2406,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
$this->renderLegacyObjectHeader(),
|
||||
$this->renderLegacyImports(),
|
||||
$this->renderLegacyProperties(),
|
||||
$this->renderLegacyRanges(),
|
||||
//$this->renderArguments(),
|
||||
//$this->renderRelatedSets(),
|
||||
$this->renderLegacyGroups(),
|
||||
//$this->renderMultiRelations(),
|
||||
$this->renderLegacyMultiRelations(),
|
||||
$this->renderLegacyRanges(),
|
||||
$this->renderLegacyCustomExtensions(),
|
||||
$this->renderLegacyCustomVars(),
|
||||
$this->renderLegacySuffix()
|
||||
|
@ -2442,11 +2455,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
$this->renderPrioritizedProperties(),
|
||||
$this->renderImports(),
|
||||
$this->renderProperties(),
|
||||
$this->renderRanges(),
|
||||
$this->renderArguments(),
|
||||
$this->renderRelatedSets(),
|
||||
$this->renderGroups(),
|
||||
$this->renderMultiRelations(),
|
||||
$this->renderRanges(),
|
||||
$this->renderCustomExtensions(),
|
||||
$this->renderCustomVars(),
|
||||
$this->renderSuffix()
|
||||
|
|
|
@ -30,6 +30,8 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
|||
|
||||
protected $relatedShortName;
|
||||
|
||||
protected $legacyPropertyName;
|
||||
|
||||
private $position = 0;
|
||||
|
||||
private $db;
|
||||
|
@ -439,6 +441,11 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
|||
return '';
|
||||
}
|
||||
|
||||
return c1::renderKeyValue($this->propertyName, c1::renderArray($relations));
|
||||
if ($this->legacyPropertyName === null) {
|
||||
return ' # not supported in legacy: ' .
|
||||
c1::renderKeyValue($this->propertyName, c1::renderArray($relations), '');
|
||||
}
|
||||
|
||||
return c1::renderKeyValue($this->legacyPropertyName, c1::renderArray($relations));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue