Bug 1212186

Summary: [GSS](6.4.z) EAP UI console does not permit to set a high Lifespan expiration time - web console doesn't let me put a value higher than Integer
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Spolti <fspolti>
Component: Web ConsoleAssignee: Harald Pehl <hpehl>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Jelinek <pjelinek>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3.3CC: acavalca, bmaxwell, brian.stansberry, hpehl, jkudrnac, jtruhlar, mcada, msochure, pjelinek, ppalaga
Target Milestone: CR1   
Target Release: EAP 6.4.12   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 13:10:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1323582, 1375585    

Description Spolti 2015-04-15 18:38:41 UTC
Description of problem:
 lifespan field (infinispan -> local cache -> expiration tab), the doc says it is a long field, but web console doesn't let me put a value higher than Integer (see web_console2.png). JBoss CLI is fine. This is bad because, we want to fix the lifespan to 30 days, and it is not possible.

Version-Release number of selected component (if applicable):
EAP 6.3.X also WildFly HAL upstream.

How reproducible:
Just try to set a Long number in the lifespan expiration field

Steps to Reproduce:
1. Start the EAP
2. Go to Web-Console > infinispan > local cache > expiration tab
3. Try to set a high number.

Actual results:
Is printed the message: "Invalid numeric value".

Expected results:
Long Values should be accepted.

Additional info:
Workaround: Configure the lifespan expiration Through CLI or xml file.

===================
I was going through source code and I found this:


This LocalCache (used as example for the tests) class have the correct declaration :
https://github.com/hal/core/blob/9a5f0edbaca71b54aea2df56dc659b420d6f752c/gui/src/main/java/org/jboss/as/console/client/shared/subsys/infinispan/model/LocalCache.java#L268



This class have a switch case where the case LONG calls the NumberBoxItem:
https://github.com/hal/core/blob/8949ed6dc259feb366d17ec2078c7799f32d7763/gui/src/main/java/org/jboss/as/console/mbui/widgets/ModelNodeFormBuilder.java#L244


The NumberBoxItem have the max value to Integer: private int max = Integer.MAX_VALUE;
and then all parses are to Integer:
https://github.com/hal/ballroom/blob/master/widgets/src/main/java/org/jboss/ballroom/client/widgets/forms/NumberBoxItem.java#L113
https://github.com/hal/ballroom/blob/master/widgets/src/main/java/org/jboss/ballroom/client/widgets/forms/NumberBoxItem.java#L167


I have some tests by made some changes in the NumberBox.java.
I am attached the modified class for your review and the print screen with the result.


Thanks.

Comment 4 JBoss JIRA Server 2015-06-30 13:40:27 UTC
Harald Pehl <hpehl> updated the status of jira HAL-638 to Coding In Progress

Comment 5 JBoss JIRA Server 2015-06-30 22:36:12 UTC
Harald Pehl <hpehl> updated the status of jira HAL-638 to Resolved

Comment 6 Harald Pehl 2015-06-30 22:38:13 UTC
Fixed in Ballroom 2.3.1

Comment 7 Mike McCune 2016-03-28 22:41:35 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 9 Peter Palaga 2016-10-19 13:04:24 UTC
Fixed in ballroom 2.1.12.Final https://github.com/hal/ballroom/commit/831442fb7db48c999c1cfbcc82ec9c54c0206188

Comment 10 Michael Cada 2016-11-05 11:49:01 UTC
Verified with EAP 6.4.12.CP.CR1

Comment 12 Petr Penicka 2017-01-17 13:10:18 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.