parent
c273a20ce4
commit
12a818216c
|
@ -74,6 +74,7 @@ next (will be 1.8.0)
|
||||||
|
|
||||||
### Icinga Configuration
|
### Icinga Configuration
|
||||||
* FIX: Correctly render Service Dependencies with Array-style parent hosts (#2088)
|
* FIX: Correctly render Service Dependencies with Array-style parent hosts (#2088)
|
||||||
|
* FIX: times.begin and times.end are now rendered separately (#2193)
|
||||||
* REMOVED: magic-apply-for (a hidden deprecated feature) has been removed (#1851)
|
* REMOVED: magic-apply-for (a hidden deprecated feature) has been removed (#1851)
|
||||||
|
|
||||||
### Icinga Agent handling
|
### Icinga Agent handling
|
||||||
|
|
|
@ -69,52 +69,23 @@ class IcingaNotification extends IcingaObject implements ExportInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We have distinct properties in the db
|
|
||||||
*
|
|
||||||
* ...but render times only once
|
|
||||||
*
|
|
||||||
* And we skip warnings about underscores in method names:
|
|
||||||
* @codingStandardsIgnoreStart
|
* @codingStandardsIgnoreStart
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function renderTimes_begin()
|
protected function renderTimes_begin()
|
||||||
{
|
{
|
||||||
// @codingStandardsIgnoreEnd
|
// @codingStandardsIgnoreEnd
|
||||||
$times = (object) [
|
return c::renderKeyValue('times.begin', c::renderInterval($this->get('times_begin')));
|
||||||
'begin' => c::renderInterval($this->times_begin)
|
|
||||||
];
|
|
||||||
|
|
||||||
if ($this->get('times_end') !== null) {
|
|
||||||
$times->end = c::renderInterval($this->get('times_end'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return c::renderKeyValue('times', c::renderDictionary($times));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We have distinct properties in the db
|
|
||||||
*
|
|
||||||
* ...but render times only once
|
|
||||||
*
|
|
||||||
* And we skip warnings about underscores in method names:
|
|
||||||
* @codingStandardsIgnoreStart
|
* @codingStandardsIgnoreStart
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function renderTimes_end()
|
protected function renderTimes_end()
|
||||||
{
|
{
|
||||||
// @codingStandardsIgnoreEnd
|
// @codingStandardsIgnoreEnd
|
||||||
|
return c::renderKeyValue('times.end', c::renderInterval($this->get('times_end')));
|
||||||
if ($this->get('times_begin') !== null) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$times = (object) [
|
|
||||||
'end' => c::renderInterval($this->get('times_end'))
|
|
||||||
];
|
|
||||||
|
|
||||||
return c::renderKeyValue('times', c::renderDictionary($times));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUniqueIdentifier()
|
public function getUniqueIdentifier()
|
||||||
|
|
Loading…
Reference in New Issue