-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Support decimals in histogram interval #8566
Conversation
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.
Some minor suggestions, otherwise LGTM.
@@ -35,6 +35,6 @@ | |||
class="form-control" | |||
name="interval" | |||
min="0" | |||
input-whole-number |
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.
I think this might be the only reference to input-whole-number - can you delete the file and corresponding test file?
import angular from 'angular'; | ||
import expect from 'expect.js'; | ||
import ngMock from 'ng_mock'; | ||
import 'ui/directives/input_whole_number'; |
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.
import input_number and not input_whole_number? Interesting, I wonder how this is working.
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.
WHOOPPPSS. Thanks for catching that. Not sure how it's working either
restrict: 'A', | ||
require: 'ngModel', | ||
link: function ($scope, $elem, attrs, ngModel) { | ||
ngModel.$parsers.push(checkNumber); |
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.
Just my preference but I would first define the function, then use it. Not sure if there is an official style for this kind of thing. Up to you.
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.
Not sure regarding official style either, I was just emulating how it was done in the input_whole_number.js
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.
consistency sounds like a good reason to me :)
LGTM |
@kobelb I updated the title to reflect the change itself rather than describing the action, which is more appropriate for release notes and such. |
--------- **Commit 1:** Modifying the histograms interval to support decimals * Original sha: da04e10 * Authored by = <[email protected]> on 2016-10-05T20:46:52Z **Commit 2:** Removing the input-whole-number, no longer used. * Original sha: cccb370 * Authored by = <[email protected]> on 2016-10-06T17:29:03Z
[backport] PR #8566 to 5.x - Support decimals in histogram interval
--------- **Commit 1:** Modifying the histograms interval to support decimals * Original sha: 189c60d45010eb843dc573863aaf0fb85fbaefc6 [formerly da04e10] * Authored by = <[email protected]> on 2016-10-05T20:46:52Z **Commit 2:** Removing the input-whole-number, no longer used. * Original sha: 6217f3d8bf453f8431f90f5f5b3acc4defaf6ad6 [formerly cccb370] * Authored by = <[email protected]> on 2016-10-06T17:29:03Z Former-commit-id: 2172489
[backport] PR elastic#8566 to 5.x - Support decimals in histogram interval Former-commit-id: 05635eb
Closes #8474