IcingaNotificationForm: explain time units

fixes #1897
This commit is contained in:
Thomas Gelf 2020-11-28 17:54:19 +01:00
parent 9d6e23a845
commit 81f853e5dc
2 changed files with 11 additions and 2 deletions

View File

@ -197,7 +197,7 @@ class IcingaNotificationForm extends DirectorObjectForm
'label' => $this->translate('First notification delay'), 'label' => $this->translate('First notification delay'),
'description' => $this->translate( 'description' => $this->translate(
'Delay unless the first notification should be sent' 'Delay unless the first notification should be sent'
) ) . '. ' . $this->getTimeValueInfo()
) )
); );
@ -208,13 +208,21 @@ class IcingaNotificationForm extends DirectorObjectForm
'label' => $this->translate('Last notification'), 'label' => $this->translate('Last notification'),
'description' => $this->translate( 'description' => $this->translate(
'When the last notification should be sent' 'When the last notification should be sent'
) ) . '. ' . $this->getTimeValueInfo()
) )
); );
return $this; return $this;
} }
protected function getTimeValueInfo()
{
return $this->translate(
'Unit is seconds unless a suffix is given. Supported suffixes include'
. ' ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days).'
);
}
/** /**
* @return self * @return self
*/ */

View File

@ -29,6 +29,7 @@ next (will be 1.8.0)
* FEATURE: Notification Apply Rules as a DirectorObject DataField (#2199) * FEATURE: Notification Apply Rules as a DirectorObject DataField (#2199)
* FEATURE: Hint and Error styling has been unified and improved * FEATURE: Hint and Error styling has been unified and improved
* FEATURE: Form field rendering for sets now deals with invalid values * FEATURE: Form field rendering for sets now deals with invalid values
* FEATURE: Better description for time-based form fields (#1897)
### CLI ### CLI
* FEATURE: Deployment Status and related utilities (#2189) * FEATURE: Deployment Status and related utilities (#2189)