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 $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
protected function renderLegacyMultiRelations()
|
||||||
|
{
|
||||||
|
$out = '';
|
||||||
|
foreach ($this->loadAllMultiRelations() as $rel) {
|
||||||
|
$out .= $rel->toLegacyConfigString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -2393,11 +2406,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||||
$this->renderLegacyObjectHeader(),
|
$this->renderLegacyObjectHeader(),
|
||||||
$this->renderLegacyImports(),
|
$this->renderLegacyImports(),
|
||||||
$this->renderLegacyProperties(),
|
$this->renderLegacyProperties(),
|
||||||
$this->renderLegacyRanges(),
|
|
||||||
//$this->renderArguments(),
|
//$this->renderArguments(),
|
||||||
//$this->renderRelatedSets(),
|
//$this->renderRelatedSets(),
|
||||||
$this->renderLegacyGroups(),
|
$this->renderLegacyGroups(),
|
||||||
//$this->renderMultiRelations(),
|
$this->renderLegacyMultiRelations(),
|
||||||
|
$this->renderLegacyRanges(),
|
||||||
$this->renderLegacyCustomExtensions(),
|
$this->renderLegacyCustomExtensions(),
|
||||||
$this->renderLegacyCustomVars(),
|
$this->renderLegacyCustomVars(),
|
||||||
$this->renderLegacySuffix()
|
$this->renderLegacySuffix()
|
||||||
|
@ -2442,11 +2455,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||||
$this->renderPrioritizedProperties(),
|
$this->renderPrioritizedProperties(),
|
||||||
$this->renderImports(),
|
$this->renderImports(),
|
||||||
$this->renderProperties(),
|
$this->renderProperties(),
|
||||||
$this->renderRanges(),
|
|
||||||
$this->renderArguments(),
|
$this->renderArguments(),
|
||||||
$this->renderRelatedSets(),
|
$this->renderRelatedSets(),
|
||||||
$this->renderGroups(),
|
$this->renderGroups(),
|
||||||
$this->renderMultiRelations(),
|
$this->renderMultiRelations(),
|
||||||
|
$this->renderRanges(),
|
||||||
$this->renderCustomExtensions(),
|
$this->renderCustomExtensions(),
|
||||||
$this->renderCustomVars(),
|
$this->renderCustomVars(),
|
||||||
$this->renderSuffix()
|
$this->renderSuffix()
|
||||||
|
|
|
@ -30,6 +30,8 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
||||||
|
|
||||||
protected $relatedShortName;
|
protected $relatedShortName;
|
||||||
|
|
||||||
|
protected $legacyPropertyName;
|
||||||
|
|
||||||
private $position = 0;
|
private $position = 0;
|
||||||
|
|
||||||
private $db;
|
private $db;
|
||||||
|
@ -439,6 +441,11 @@ class IcingaObjectMultiRelations implements Iterator, Countable, IcingaConfigRen
|
||||||
return '';
|
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