-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ui: speed up compute instance listing #7911
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,9 +32,9 @@ export default { | |
| permission: ['listVirtualMachinesMetrics'], | ||
| resourceType: 'UserVm', | ||
| params: () => { | ||
| var params = {} | ||
| var params = { details: 'servoff,tmpl,nics' } | ||
| if (store.getters.metrics) { | ||
| params = { state: 'running' } | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've removed running as otherwise metrics doesn't return all VMs in the list. One can select VM
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just realised I can remove state from the params |
||
| params = { details: 'servoff,tmpl,nics,stats' } | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. VM stats in the API response can cause 5-10x delay compared to normal list API response
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my concern is opposite to @DaanHoogland :-D
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, these are enough just for list view (table view); the stats are only needed when the metrics button is clicked. For the resource view, we delete the params.details, so by default details=all is used when listing a single VM.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weizhouapache @DaanHoogland
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great, thanks @rohityadavcloud |
||
| } | ||
| return params | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ export const DOMAIN_STORE = 'DOMAIN_STORE' | |
| export const DARK_MODE = 'DARK_MODE' | ||
| export const VUE_VERSION = 'VUE_VERSION' | ||
| export const CUSTOM_COLUMNS = 'CUSTOM_COLUMNS' | ||
| export const RELOAD_ALL_PROJECTS = 'RELOAD_ALL_PROJECTS' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes a warning |
||
|
|
||
| export const CONTENT_WIDTH_TYPE = { | ||
| Fluid: 'Fluid', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -858,6 +858,10 @@ export default { | |
| delete params.showunique | ||
| } | ||
|
|
||
| if (['listVirtualMachinesMetrics'].includes(this.apiName) && this.dataView) { | ||
| delete params.details | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we remove the details as it may not be |
||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rohityadavcloud all others look good
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are added by the router config, I'll ping you on that code; so we must remove if the keys exists for dataView (or resource view, when only one item is being listed such as the VM) |
||
|
|
||
| this.loading = true | ||
| if (this.$route.params && this.$route.params.id) { | ||
| params.id = this.$route.params.id | ||
|
|
||
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.
@weizhouapache because of these params, details and state...