ui: Fetch all records in list* API and allow searching in dropdowns#5276
ui: Fetch all records in list* API and allow searching in dropdowns#5276davidjumani wants to merge 5 commits intoapache:mainfrom
Conversation
|
Please ignore the console.log and the pagesize set to 10. Was done deliberately so that anyone reviewing can see it in action rather than creating 1000 records for any item. Will be removed once approved |
f9d6a5a to
1fc61a4
Compare
1fc61a4 to
8af4b5e
Compare
|
@davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
@davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
Wouldn't it make the UI slow? |
|
@rhtyd Hardly, will set the pagesize to 500 (default) so that most calls won't need to be repeated |
ui/src/api/index.js
Outdated
| const pagesize = 10 | ||
| let page = 1 | ||
| let items = [] | ||
| let done = false | ||
| let response = null | ||
|
|
||
| while (!done) { | ||
| args.page = page | ||
| args.pagesize = pagesize |
There was a problem hiding this comment.
@davidjumani do we use default.ui.page.size global setting in the UI?
And just want to know if I have 1000 VMs in my env and I open AttachVolume form will this call listVirtualMachines API 100 times?
There was a problem hiding this comment.
10 is a placeholder now since default.page.size is generally 500 and it would be difficult to see it in the test env. Will change it to default.page.size after people test and get back
utchoang
left a comment
There was a problem hiding this comment.
It seems ok as long as the number of API calls is not too many times it will slow down the system
|
@davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
@davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
|
Closing to separate into distinct PRs |
Description
Fixes #3121, also #5338
Ensures that all records are fetched for any list* API when page is not part of the parameters passed
Types of changes
Bug Severity
How Has This Been Tested?
TODO