Skip to content

Commit 223bc11

Browse files
authored
ui: fix paging in enable static NAT form (#5849)
Fixes #5715 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 2e2d328 commit 223bc11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ui/src/views/network/EnableStaticNat.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
size="small"
8888
:current="page"
8989
:pageSize="pageSize"
90-
:total="vmsList.length"
90+
:total="vmCount"
9191
:showTotal="total => `${$t('label.total')} ${total} ${$t('label.items')}`"
9292
:pageSizeOptions="['10', '20', '40', '80', '100']"
9393
@change="changePage"
@@ -162,7 +162,8 @@ export default {
162162
vpcTiers: [],
163163
selectedVpcTier: null,
164164
page: 1,
165-
pageSize: 10
165+
pageSize: 10,
166+
vmCount: 0
166167
}
167168
},
168169
created () {
@@ -186,6 +187,7 @@ export default {
186187
domainid: this.resource.domainid,
187188
keyword: this.searchQuery
188189
}).then(response => {
190+
this.vmCount = response.listvirtualmachinesresponse.count
189191
this.vmsList = response.listvirtualmachinesresponse.virtualmachine || []
190192
}).catch(error => {
191193
this.$notifyError(error)

0 commit comments

Comments
 (0)