[CONTROLLER-428] RESTConf API Explorer: Add pagination and searching Created: 29/Apr/14 Updated: 14/Nov/17 Resolved: 02/Oct/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | Helium |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Abhishek Kumar | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| Description |
|
There are a lot of yang modules (current count is 84) in controller. Rendering APIs for all those is extremely slow in API Explorer. Pagination and search support would limit the number of modules that needs to be rendered in UI. As a result, it would speed up the load time. |
| Comments |
| Comment by Jozef Gloncak [ 11/Jul/14 ] |
|
Is it possible to use pagination? Can you give me some hint? |
| Comment by Devin Avery [ 11/Jul/14 ] |
|
Here is how I would approach this. 1) Split searching into another bug To add pagination the first thing you would need to do is modify the rest APIs to take a page number as a query parameter, and possible a page size.
Once you have modified the APIs to support paging you need to modify the web page to provide the concept of paging. This will require modifying the HTML page to make the initial call with the correct page information and then showing what page you are on, providing next calls etc. You will see that we have already abstracted away the idea of loading the swagger UI to a method call, so that should hopefully be easy. So when someone loads the next page, you make the new rest call with the new page information. |
| Comment by Devin Avery [ 11/Jul/14 ] |
|
I should add though - the "slowness" that is referred to in this bug is really caused by the hundreds of possible rest calls under each module. Not the number of modules. We actually reduce the number of modules down to 18 by removing any module that didn't have a rest conf URL exposed. So paging modules actually isn't going to get us much... So what I said before is probably the wrong thing. We really want to page the URLs underneath a module...and that I am not sure how to do - it seems like it is something that would need to be added to the swagger functionality. Perhaps we should just settle with showing a loading indicator while the swagger UI is doing its thing...?? |
| Comment by Jozef Gloncak [ 01/Oct/14 ] |
|
It was reported that pagination and searching should be available to Currently after GET on Every module name in table is hyperlink Original access to REST apis kept preserved. It means that is is still |
| Comment by Abhishek Kumar [ 02/Oct/14 ] |
|
This enhancement is not needed anymore. The list of yang modules loaded in api explorer has been filtered down to about 20 and the UI rendering is not slow anymore. |