Bug 770366 - The condition of the THRESHOLD category for group alert is incorrectly shown.
The condition of the THRESHOLD category for group alert is incorrectly shown.
Status: CLOSED WORKSFORME
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.1
Unspecified Unspecified
unspecified Severity low (vote)
: ---
: ---
Assigned To: John Mazzitelli
Mike Foley
:
Depends On:
Blocks: jon30-sprint10/rhq43-sprint10
  Show dependency treegraph
 
Reported: 2011-12-26 02:38 EST by ud1
Modified: 2012-02-09 05:12 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-31 15:29:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot (13.39 KB, image/png)
2011-12-26 02:38 EST, ud1
no flags Details
alert1.1 (14.66 KB, image/png)
2012-01-31 15:25 EST, John Mazzitelli
no flags Details
alert1.2 (10.33 KB, image/png)
2012-01-31 15:25 EST, John Mazzitelli
no flags Details
alert1.3 (44.04 KB, image/png)
2012-01-31 15:26 EST, John Mazzitelli
no flags Details
alert2.1 (14.53 KB, image/png)
2012-01-31 15:26 EST, John Mazzitelli
no flags Details
alert2.2 (10.12 KB, image/png)
2012-01-31 15:26 EST, John Mazzitelli
no flags Details
alert2.3 (44.09 KB, image/png)
2012-01-31 15:27 EST, John Mazzitelli
no flags Details

  None (edit)
Description ud1 2011-12-26 02:38:36 EST
Created attachment 549554 [details]
screenshot

Description of problem:
The condition of the THRESHOLD category rounds threshold value ignoring MeasurementUnits in the interface.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Select resource group containing one or more platforms.
2. Go to Alerts->Definitions. Create new alert definition. Add condition:
Type - Measurement absolute value threshold,
Metric - System load,
Comparator - > (Greater than)
Metric value - 0.75
3. Press "Back to List", select created definition, go to Conditions tab.
  
Actual results:
The condition will be displayed as "Metric Value Threshold [System Load > 0.8]"

Expected results:
"Metric Value Threshold [System Load > 75%]"

Additional info:
Comment 1 Jay Shaughnessy 2012-01-16 16:31:50 EST
This is working as expected, I think.  System Load is a percentage metric.
If you enter 0.75 it is literally taken as 0.75 percent, and it gets rounded
in the display to 0.8%.

For 75% the user can just type 75.

I believe this was fixed after 4.1 was released, which is the version
noted on this BZ.


No code changes, setting to ON_QA for optional verification.  Asking for
additional info from reporter in case I've misinterpreted the issue.
Comment 2 ud1 2012-01-25 07:56:33 EST
If I enter 75, it will be 7500%

Right after how I have entered a condition, it is shows correctly: "Metric Value Threshold [System Load > 75%]", but then I press "Back to list button" and open conditions form again it will be "Metric Value Threshold [System Load > 0.8]".

I think it's some kind of uninitialized variable, so the correct Measurement Units cannot be determined, and used the default one.
Comment 3 John Mazzitelli 2012-01-31 13:41:04 EST
this is probably just a poor way to show the values, but they are correct.

"Right after I have entered a condition, it is shows correctly: "Metric
Value Threshold [System Load > 75%]"

Right, so in this way of showing the value, its a percentage (as denoted with the % sign).

"but then I press Back to list button and open conditions form again it will be "Metric Value Threshold [System Load > 0.8]".

In this case, it appears it uses a different way of formatting the value. Its still the same thing - notice it doesn't show a percentage sign - its just 0.8. This is your 75% rounded up to the tenths place as a decimal (75% = 0.75 rounded up to a single decimal place thus 0.8).

Poor way of mixing the different formats of the value, but in the end, the values are still the same. One is 75% and one is a rounded decimal value of 0.8.

So, while this issue is still valid - its really to fix the UI. The value itself is the same under the covers (that is, if you look in the revelant DB row/column, it will be 0.75).
Comment 4 John Mazzitelli 2012-01-31 15:04:30 EST
I'm currently not seeing this behavior at all. Wondering what version this issue was written against. I'm running a build off of master, and I can enter either "75%" as the value or "0.75" and I'm seeing the same display showing in the UI.

I'm gonna keep playing around to see if I can replicate something.
Comment 5 John Mazzitelli 2012-01-31 15:25:01 EST
I think this is fixed in the latest release - or at least in master branch.

See the attached images.

I created my first alert definiton with a system load value of 75%:

alert1.1.png - creating first alert definition with value of "75%"
alert1.2.png - shows the "75%" string in the UI before saving the alert definition
alert1.3.png - the condition string after going back to the list and re-entering the newly created alert definition. Also shows the value as stored in the database - 0.75.

I then created a second alert definition with a system load value of 0.75:

alert2.1.png - creating second alert definition with value of "0.75"
alert2.2.png - shows the "0.8%" string in the UI before saving the alert definition
alert2.3.png - the condition string after going back to the list and re-entering the newly created alert definition. Also shows the value as stored in the database - 0.0075.

I think, therefore, this has been fixed in a more recent version (and will at least be fixed in the next release of RHQ if this fix hasn't yet made it out to a GA release) I think this actually might have been fixed with bug #698600
Comment 6 John Mazzitelli 2012-01-31 15:25:23 EST
Created attachment 558697 [details]
alert1.1
Comment 7 John Mazzitelli 2012-01-31 15:25:47 EST
Created attachment 558698 [details]
alert1.2
Comment 8 John Mazzitelli 2012-01-31 15:26:04 EST
Created attachment 558699 [details]
alert1.3
Comment 9 John Mazzitelli 2012-01-31 15:26:25 EST
Created attachment 558700 [details]
alert2.1
Comment 10 John Mazzitelli 2012-01-31 15:26:46 EST
Created attachment 558701 [details]
alert2.2
Comment 11 John Mazzitelli 2012-01-31 15:27:10 EST
Created attachment 558702 [details]
alert2.3
Comment 12 ud1 2012-02-09 05:12:18 EST
I have installed RHQ 4.2 and it seems to be working. Thank you.

Note You need to log in before you can comment on or make changes to this bug.