-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure bucket duration is not less the 20 minutes #385
Conversation
@simon3z @zeari @zgalor @moolitayer @himdel please review |
There's no Or.. at least, pick one common unit, mixing seconds, minutes and hours feels like a recipe for disaster :). |
@himdel of course I am not suggesting to use different units, in fact 1.minute is treated as 60 seconds. I am saying that I don't know if there are |
@simon3z Agreed, sorry if it came out that way, I was just trying to clarify :) and noticed the current state of the code.. |
1086601
to
e58ba59
Compare
LGTM 👍 @miq-bot assign himdel |
@@ -4,6 +4,10 @@ | |||
function($http, $window, miqService) { | |||
var dash = this; | |||
dash.tenant = '_ops'; | |||
dash.minBucketDurationInSecondes = 20 * 60; | |||
|
|||
var NUMBER_OF_MILISEC_IN_HOUR = 60 * 60 * 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor typo: MILISEC
should MILLISEC
or MILLISECONDS
var bucket_duration = parseInt(diff / 1000 / 200); // bucket duration is in seconds | ||
var bucket_duration = parseInt(diff / NUMBER_OF_MILISEC_IN_SEC / numberOfBucketsInChart); // bucket duration is in seconds | ||
|
||
// make sure backet duration is not smaller then minBucketDurationInSecondes seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor typo: backet
should be bucket
@chessbyte thanks, fixed. |
Checked commits yaacov/manageiq-ui-classic@e58ba59~...97ee538 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@himdel please re review |
p.s. When testing, notice that changing the |
LGTM, would love to merge.. but please add info on where to find it in the UI to the description, no idea where to test. |
@himdel yes sorry ... , added a screenshot |
Works just fine, merged :) (It is a bit counter-intuitive that you have to click Refresh after changing the date or number of days in the toolbar, and that Refresh is above that, but.. yeah, this PR works :).) |
Description
When reviewing the ad-hoc graphs we saw gaps in the graph, this gaps happen when data is collected in a slow rate (more then 5minutes per sample).
This PR makes it impossible for the user to chose a time bucket less then N minutes (N equels 20 for this PR)
We assume that if data is not collected for more then N minutes this is something user need to know about.
Secnd stage
Out of scope for this PR, get the N minutes value automatically from the ops team.
Screenshot
Interval between points is 20 minutes ( 03:29 -> 03:49 -> 04:09 ... ).