Description of problem: Editing 'Availability Duration' alert condition type is confusing Version-Release number of selected component (if applicable): JON 3.2.Alpha How reproducible:always Steps to Reproduce: 1. Create an alert definition on resource 2. add a new condition, select 'Availability Duration' 3. you can set 'Duration' in 'minutes' or 'hours', but you can type anything (like 'foo'), set it to 3 minutes 4. save your condition 5. edit your condition again Actual results: You can see Duration as value 180 in 'seconds'. If you pop-up unit combo, you still cannot select seconds, but your value is computed in seconds. Expected results: I'd expect a value in minutes, because I've entered it in minutes before. It might make sense to add 'seconds' among possible units (probably as default). Additional info: According to things I've seen in RHQ internals, duration is saved in seconds and there's no way to specify units. Selecting 'minutes' or 'hours' is just a sugar for user. Having this sugar in place, we should compute a value for particular unit. (i.e. if $duration % 3600 == 0 show it in hours, if $duration % 60 == 0 show it in minutes, otherwise seconds)
commit: 57333dd7c4a683fe39bfcf68ea706cbfa6feded9 author: Jirka Kremser - jkremser message: [BZ 967542] - UI shows confusing units when editing Availability Duration alert condition type I improved the DurationItem component to use internally the SelectItem instead of ComboBoxItem. When using ComboBoxItem, it was possible to write to the combobox and this is something that shouldn't happen in this component because the unit types should be fixed. The DurationItem is also used from the operation tab view, but no reggression was introduced by this commit in this view. Modifying also the DurationItem.setAndFormatValue() to populate the time correctly when !isReadOnly. It's still not perfect, because when user types in 90 minutes for instance, then opens the condition again. The number is interpreted as 1.5 hours. I can improve it later.
branch: master link: http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=2eef3b4fc time: 2013-05-29 13:50:01 +0200 commit: 2eef3b4fcd05fc1b248ab3c95fbc115e3758079d author: Jirka Kremser - jkremser message: [BZ 967542] - UI shows confusing units when editing Availability Duration alert condition type Now if user iserts e.g. 90 mins and reopens the dialog, it won't display 1.5 hours anymore, but 90 mins as expected.
Created attachment 788470 [details] Screen of an opened condition form in tab Alerts of storage node page Bug is verified but there is still a little problem. Availability Duration time of the associated condition is always displayed in minutes although the original duration was set in hours (see screenshot in the attachments).
As this is MODIFIED or ON_QA, setting milestone to ER1.
Created attachment 801585 [details] alert-definition-duration Version: 3.2.0.ER1 Build Number: 54dd29c:464a643 GWT Version: 2.5.0 SmartGWT Version: 3.0 As mentioned on the command #3, still it's showing on minutes on overall conditions list. screen shot is attached.
branch: master link: http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=0d40ad930 time: 2013-09-26 22:32:11 +0200 commit: 0d40ad930ba3248614e366f28f0a98ad8c98f136 author: Jirka Kremser - jkremser message: [BZ 967542] - UI shows confusing units when editing Availability Duration alert condition type - The table with listed conditions should now display the same number-unit tuple as the popup dialog.
Moving to ON_QA for testing.
reopened. reproduction steps: 1. set condition to 1 minute 2. edit condition and set to 1 second 3. save condition Actual result: After step1. condition is saved in seconds -> 60 secs After step3. globally uncaught exception -> Input unit is less than target unit. Expected results: Afters step1. condition saves in minutes no seconds visible in drop-down menu
branch: master link: http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=63166499b time: 2013-10-21 18:15:51 +0200 commit: 63166499b7d6f21347023b8f1d3d17b20c5570c7 author: Jirka Kremser - jkremser message: [BZ 967542] - UI shows confusing units when editing Availability Duration alert condition type - with some tricky steps it was possible to get globally uncaught exception. Now the seconds should not be displayed at all. (hopefully, the last one :])
in the release branch (release/jon3.2.x) it is commit ad4e1708f89c4eae8e74d9c207db3e37f48d6d16
Moving to ON_QA for test with new brew build.
Created attachment 821137 [details] minutes
verified screen-shot attached thank you