mirror of https://github.com/apache/cloudstack.git
ui: speed up compute instance listing (#7911)
* ui: speed up compute instance listing The default listVirtualMachinesMetrics APIs assumings details=all which isn't really used in the list view. By changing this to a subset of details, we can see gains upto 10x in listing speed in the UI. When moving to the resource/detail view of the UI, don't pass state or details so `all` the details of the instance are returned. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> * Update AutogenView.vue --------- Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
6f7725ab35
commit
93bd5b7a69
|
|
@ -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' }
|
||||
params = { details: 'servoff,tmpl,nics,stats' }
|
||||
}
|
||||
return params
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
||||
export const CONTENT_WIDTH_TYPE = {
|
||||
Fluid: 'Fluid',
|
||||
|
|
|
|||
|
|
@ -862,6 +862,10 @@ export default {
|
|||
delete params.showunique
|
||||
}
|
||||
|
||||
if (['listVirtualMachinesMetrics'].includes(this.apiName) && this.dataView) {
|
||||
delete params.details
|
||||
}
|
||||
|
||||
this.loading = true
|
||||
if (this.$route.params && this.$route.params.id) {
|
||||
params.id = this.$route.params.id
|
||||
|
|
|
|||
Loading…
Reference in New Issue