IcingaCommand: improve timeout rendering
This commit is contained in:
parent
7ca64e18a7
commit
06736e1508
|
@ -50,4 +50,13 @@ class IcingaCommand extends IcingaObject
|
|||
|
||||
return c::renderKeyValue('command', c::renderArray($parts));
|
||||
}
|
||||
|
||||
protected function renderTimeout()
|
||||
{
|
||||
$value = $this->timeout;
|
||||
if ($value % 60 === 0) {
|
||||
$value = ((int) $value / 60) . 'm';
|
||||
}
|
||||
return c::renderKeyValue('timeout', $value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue