Bug 876479 - [JON - CLI] When executing measurement_utils.js, collection interval will not be changed when using interval method
Summary: [JON - CLI] When executing measurement_utils.js, collection interval will not...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: CLI
Version: JON 3.1.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: JON 3.1.2
Assignee: Lukas Krejci
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 876481
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-14 09:19 UTC by bkramer
Modified: 2018-11-29 19:27 UTC (History)
3 users (show)

Fixed In Version:
Clone Of: 876481
: 876481 883894 (view as bug list)
Environment:
Last Closed: 2013-09-11 11:02:25 UTC
Type: Bug
Embargoed:
loleary: needinfo+


Attachments (Terms of Use)

Description bkramer 2012-11-14 09:19:52 UTC
Description of problem:
When executing measurement_utils.js, collection interval will not be changed when using interval method.

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

How reproducible:
always

Steps to Reproduce:
1. log in to the JON CLI;
2. from the JON CLI command line execute the following:

------------------------------------------------------

exec -f /home/JON_311/util.js
exec -f /home/JON_311/measurement_utils.js

mm = new MeasurementModule();

interval = mm.interval;
time = mm.time;
updates = { context: 'Resource', id: 24171, schedules: {'Free Memory': interval(30, time.minutes)}};
mm.updateSchedules(updates);
  
----------------------------------------------------
3. Navigate to JON UI -> resource 24171 -> Monitoring -> Schedules;
  
Actual results:
Collection interval for the metric 'Free Memory' has not been changed.

Expected results:
Collection interval for the metric 'Free Memory' is changed to 30 minutes.

Additional info:
Above works fine if interval method is not used and if the collection interval is set directly using milliseconds, for instance:

exec -f /home/JON_311/util.js
exec -f /home/JON_311/measurement_utils.js

mm = new MeasurementModule();

updates = { context: 'Resource', id: 24171, schedules: {'Free Memory': 1800000}};
mm.updateSchedules(updates);

Comment 3 Lukas Krejci 2012-12-05 14:39:16 UTC
release/jon3.1.x http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=4a96beeaf42ee9924e9e83484e58214143085754
Author: Lukas Krejci <lkrejci>
Date:   Wed Dec 5 15:24:34 2012 +0100

    [BZ 876479] - Hardcode the values of symbolic time constants in the measurement_utils.js rather than referencing the previous ones during the declaration. That just didn't work, giving all such props a value of NaN.
    (cherry picked from commit 019fbf2c8a5930c54b3bbe32bbb7fdc07b01835d)

Comment 4 Simeon Pinder 2012-12-10 12:40:39 UTC
Moving to ON_QA as available for test in 3.1.2.ER4 or greater: https://brewweb.devel.redhat.com//buildinfo?buildID=246861

Comment 5 Sunil Kondkar 2012-12-26 13:08:19 UTC
Verified on JON 3.1.2 ER6.
Followed the steps and verified that collection interval for metric is changed successfully using interval method.


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