icingaweb2-module-director
icingaweb2-module-director copied to clipboard
[dev.icinga.com #12013] Datafield doesn't allow floating point values
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12013
Created by friesoft on 2016-06-22 08:52:32 +00:00
Assignee: (none) Status: New Target Version: (none) Last Update: 2016-11-30 09:01:15 +00:00 (in Redmine)
We would like to configure check_http with warning and critical thresholds. As warning threshold we wanted to configure 0,5s.
It is possible to use the type "Number" for the datafield and enter "0,5" but it gets rendered as 05. It is not possible to enter 0.5 because it is prevented by the ui as it is not an integer.
Updated by tgelf on 2016-10-24 04:38:49 +00:00
- Target Version set to 1.2.0
Updated by tgelf on 2016-11-03 12:46:28 +00:00
- Target Version changed from 1.2.0 to 1.3.0
Updated by tgelf on 2016-11-30 09:01:15 +00:00
- Target Version deleted ~~1.3.0~~
Still valid on latest git master (16729a98ecdfd1a11a3f8da54182047b756c22a5)
We should update the validator here, Icinga 2 states "Numeric Literals" as floating point numbers
https://www.icinga.com/docs/icinga2/latest/doc/17-language-reference/#numeric-literals
Ran into this issue today and would love to propose a PR for this.
Would it be better to introduce a new DataType Float (and use is_numeric
instead of ctype_digit
) or should the existing Numeric datatype changed to is_numeric
(or something similar)?
Is there any special reason for ctype_digit
?
Note: dedicated data type is IMHO the way to go