icingaweb2-module-director icon indicating copy to clipboard operation
icingaweb2-module-director copied to clipboard

[dev.icinga.com #12013] Datafield doesn't allow floating point values

Open icinga-migration opened this issue 8 years ago • 7 comments

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.

icinga-migration avatar Jun 22 '16 08:06 icinga-migration

Updated by tgelf on 2016-10-24 04:38:49 +00:00

  • Target Version set to 1.2.0

icinga-migration avatar Oct 24 '16 04:10 icinga-migration

Updated by tgelf on 2016-11-03 12:46:28 +00:00

  • Target Version changed from 1.2.0 to 1.3.0

icinga-migration avatar Nov 03 '16 12:11 icinga-migration

Updated by tgelf on 2016-11-30 09:01:15 +00:00

  • Target Version deleted ~~1.3.0~~

icinga-migration avatar Nov 30 '16 09:11 icinga-migration

Still valid on latest git master (16729a98ecdfd1a11a3f8da54182047b756c22a5)

friesoft avatar Dec 06 '17 08:12 friesoft

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

lazyfrosch avatar Dec 06 '17 08:12 lazyfrosch

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?

nbuchwitz avatar Jan 08 '20 13:01 nbuchwitz

Note: dedicated data type is IMHO the way to go

Thomas-Gelf avatar Dec 13 '21 07:12 Thomas-Gelf