-
Notifications
You must be signed in to change notification settings - Fork 215
issue #2189 #2211
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
issue #2189 #2211
Conversation
Add pagination changes for IncomingPhoneNumbers API Add pagination changes on number-incoming.html
Change pagination footer like 1 to 10 of 1000 RestComm#2189
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.
Hi @muhammadbilal19, thanks for your contribution, great job.
Here are my comments:
- You need to provide a Mybatis mapper for MySQL along with the one you provided for HSQLDB. The MySQL mapper have to be at
restcomm.application/src/main/webapp/WEB-INF/scripts/mariadb/sql
- You have to make test with a live MySQL DB to make sure the mapper and the DAO are working fine with MySQL
- You have to provide test cases in the testsuite for the IncomingPhoneNumber pagination feature. Check how it is done for the Calls API
org.restcomm.connect.testsuite.http.CallsEndpointTest
Thanks
George
Thanks @gvagenas i will complete requested changes. |
@@ -68,7 +68,21 @@ | |||
<if test="phoneNumber != null"> | |||
AND "n"."phone_number" like #{phoneNumber} | |||
</if> | |||
LIMIT #{limit} OFFSET #{offset} |
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.
pagination filtering done at DB level should provide better performance, good!!
|
||
int limit = Integer.parseInt(pageSize); | ||
int offset = (page == "0") ? 0 | ||
: (((Integer.parseInt(page) - 1) * Integer.parseInt(pageSize)) + Integer.parseInt(pageSize)); |
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.
can we reduce the number of times we convert incoming queryString params into proper type for validation?? For performance and error handling point of view good be much better...
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.
Thanks @jaimecasero very nice point, changes are now available 7957dff
Feel free to comment if you have any other point :)
- null is returned and the error is treated as a weak-password case since AccountsEndpoint:469 mutes all errors Fixes RestComm#2175
…validation_error_logging Issue2175 js password validation error logging
Add pagination changes for IncomingPhoneNumbers API Add pagination changes on number-incoming.html
Change pagination footer like 1 to 10 of 1000 RestComm#2189
…nbound call before MS has send respond to CRCX This close RestComm#2180
Add RestComm tools class to remove some repeating code. Replace System.out to logger.info IncomingPhoneNumbersEndpointTest RestComm#2189
…ne Add RestComm tools class to remove some repeating code. Replace System.out to logger.info IncomingPhoneNumbersEndpointTest RestComm#2189" This reverts commit ccf03b6.
Add RestCommIncomingPhone tools class to remove some repeating code. Replace System.out to logger.info IncomingPhoneNumbersEndpointTest RestComm#2189
Add pagination changes for IncomingPhoneNumbers API Add pagination changes on number-incoming.html
Change pagination footer like 1 to 10 of 1000 RestComm#2189
Add RestComm tools class to remove some repeating code. Replace System.out to logger.info IncomingPhoneNumbersEndpointTest RestComm#2189
…ne Add RestComm tools class to remove some repeating code. Replace System.out to logger.info IncomingPhoneNumbersEndpointTest RestComm#2189" This reverts commit ccf03b6.
Add RestCommIncomingPhone tools class to remove some repeating code. Replace System.out to logger.info IncomingPhoneNumbersEndpointTest RestComm#2189
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.
@muhammadbilal19 I ahve found a couple of issues with the UI:
@ammendonca i will try to fix these issues today |
@ammendonca items per page button and sorting issue is fixed for this PR. Please have a look and let me know your comments |
Thanks @muhammadbilal19, the mentioned issues are now fixed. A (new?) minor issue seems to be present tho, having 12 numbers, with the list with 10 per page, on the page 2 it shows "3 to 4 of 12 Numbers". Not sure this was present before and I haven't noticed. |
@*ammendonca @gvagenas *can we get this deployed on cloud asap?
…On Wed, Jun 14, 2017 at 1:16 PM, Alexandre Mendonça < ***@***.***> wrote:
***@***.**** approved this pull request.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2211 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAtjo-i2kyjec4NGcaM916b45h7oXD2Fks5sEBWIgaJpZM4N03TK>
.
--
scottbarstow.com
@scottbarstow
+1-919-349-9473 (m)
|
@ammendonca Thanks for the update. I just tried to reproduce that minor issue which you mentioned but i am unable to reproduced it. Not sure why it is happening on your side. |
@muhammadbilal19 I just checked and you need to sort by numbers ascending for it to show. Actually looking at the sorted list, it doesn't seem to be properly sorted: @scottbarstow for me it's fine, I've approved the PR already. The issue I've found about record numbering is minor and not blocking.. the fact that the list isn't correctly sorted might be more relevant in cases where we have long list of numbers. |
@ammendonca yes i am able to see that issue now. I am not a really good UI developer and tester so bear with me :) I guess it would be good if we create another issue for sorting issue and once @gvagenas completed the review and approved that PR merge pagination changes only. |
I'd rather not do two releases so if we can fix it while @gvagenas reviews
then just merge to the existing PR prior to merge to master that's ideal.
Right now I'd roll it in with this issue if @ammendonca is ok with it. If
it's a stopper, then we fix now. His call
…On Wed, Jun 14, 2017 at 8:19 PM, Muhammad Bilal ***@***.***> wrote:
@ammendonca <https://github.com/ammendonca> yes i am able to see that
issue now. I am not a really good UI developer and tester so bear with me
:) I guess it would be good if we create another issue for sorting issue
and once @gvagenas <https://github.com/gvagenas> completed the review and
approved that PR merge pagination changes only.
If we need to fix sorting issue with this PR i am working on it and will
commit it once it is fixed.
@scottbarstow <https://github.com/scottbarstow> @deruelle
<https://github.com/deruelle> thoughts??
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2211 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAtjow4SY_4ox9P3xEe967gaXL8HfldMks5sEHiOgaJpZM4N03TK>
.
--
scottbarstow.com
@scottbarstow
+1-919-349-9473 (m)
|
@muhammadbilal19 Just tested and you can fix the sort issue by replacing As per the "3 to 4 of 12 Numbers", the issue is with Hope it helps! @scottbarstow I'm OK to go with current status, but just provided the solution to the most critical UI issue, so that should likely make it in. |
<th class="width-10pc"> </th> | ||
</thead> | ||
<tbody> | ||
<tr class="number-row" ng-repeat="pn in filtered = (numbersList | filter:query)"> | ||
<tr class="number-row" ng-repeat="pn in filtered = (numbersList | filter:query| orderBy:sort:reverse)"> |
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.
Replace sort
by predicate
which is where the field to sort is stored at (from https://github.com/RestComm/Restcomm-Connect/pull/2211/files#diff-b0cba56bc32531ce8ec4f5174dcd4fe6R97)
Thanks @ammendonca for writing the solution I committed my latest changes i made some other changes as well so please have and look and let me know if looks good to you now.Sorting issue and other minor issue both are now fixed |
Great work @muhammadbilal19, thanks! |
@muhammadbilal19 can you please create a new pull request for the same issue since there was a problem during the merge and I had to revert ? |
@gvagenas sure i am creating new PR give me few minutes |
Great, thanks @muhammadbilal19 . Make sure you merge |
Add Pagination code for IncomingPhoneNumber API and UI. Please review and let me know with your feedback.