Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


minimum value < 0 not accepted

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions
Author Message
jbgood



Joined: 26 Jul 2002
Posts: 5
Location: Netherlands, near Amsterdam

PostPosted: Thu Apr 24, 2003 3:07 am    Post subject: minimum value < 0 not accepted Reply with quote

i'm graphing ntp stats, values are between -100 and +100. Data Source Item minimal value is not accepting values < 0. I traced this back to the form_input_validate in data_sources.php and data_templates.php "[0-9]+$". I believe this has to be fixed to allow the "-" sign as the first character of the input "[0-9\-]{1}[0-9]+$" did the job for me.

Willem.
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Thu Apr 24, 2003 2:37 pm    Post subject: Reply with quote

Fixed in CVS. I found this regexp to be shorter though:

Code:
^-?[0-9]+$


-Ian
Back to top
jbgood



Joined: 26 Jul 2002
Posts: 5
Location: Netherlands, near Amsterdam

PostPosted: Fri Apr 25, 2003 2:10 am    Post subject: Reply with quote

You're the expert Thanks!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Unstable Development Versions All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group