From 223bc11d2a41ae6e14bfb17bc1a112a61d56defc Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 11 Jan 2022 22:31:02 +0530 Subject: [PATCH] ui: fix paging in enable static NAT form (#5849) Fixes #5715 Signed-off-by: Abhishek Kumar --- ui/src/views/network/EnableStaticNat.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/views/network/EnableStaticNat.vue b/ui/src/views/network/EnableStaticNat.vue index 736d87affd8..a4e851fca6a 100644 --- a/ui/src/views/network/EnableStaticNat.vue +++ b/ui/src/views/network/EnableStaticNat.vue @@ -87,7 +87,7 @@ size="small" :current="page" :pageSize="pageSize" - :total="vmsList.length" + :total="vmCount" :showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`" :pageSizeOptions="['10', '20', '40', '80', '100']" @change="changePage" @@ -162,7 +162,8 @@ export default { vpcTiers: [], selectedVpcTier: null, page: 1, - pageSize: 10 + pageSize: 10, + vmCount: 0 } }, created () { @@ -186,6 +187,7 @@ export default { domainid: this.resource.domainid, keyword: this.searchQuery }).then(response => { + this.vmCount = response.listvirtualmachinesresponse.count this.vmsList = response.listvirtualmachinesresponse.virtualmachine || [] }).catch(error => { this.$notifyError(error)