Skip to content

Commit b2ce1fb

Browse files
authored
ui: fix initial pagination for images in deploy forms (#11349)
Regression from #10773 Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 44f8064 commit b2ce1fb

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

ui/src/views/compute/CreateAutoScaleVmGroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2981,10 +2981,10 @@ export default {
29812981
if (this.isModernImageSelection && this.form.guestoscategoryid && !['-1', '0'].includes(this.form.guestoscategoryid)) {
29822982
args.oscategoryid = this.form.guestoscategoryid
29832983
}
2984-
if (args.keyword || (args.category && args.category !== templateFilter)) {
2984+
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
29852985
args.page = 1
2986-
args.pageSize = args.pageSize || 10
29872986
}
2987+
args.pageSize = args.pageSize || 10
29882988
args.zoneid = _.get(this.zone, 'id')
29892989
if (this.isZoneSelectedMultiArch) {
29902990
args.arch = this.selectedArchitecture

ui/src/views/compute/DeployVM.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,10 +2759,10 @@ export default {
27592759
if (this.isModernImageSelection && this.form.guestoscategoryid && !['-1', '0'].includes(this.form.guestoscategoryid)) {
27602760
args.oscategoryid = this.form.guestoscategoryid
27612761
}
2762-
if (args.keyword || (args.category && args.category !== templateFilter)) {
2762+
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
27632763
args.page = 1
2764-
args.pageSize = args.pageSize || 10
27652764
}
2765+
args.pageSize = args.pageSize || 10
27662766
args.zoneid = _.get(this.zone, 'id')
27672767
if (this.isZoneSelectedMultiArch) {
27682768
args.arch = this.selectedArchitecture
@@ -2798,10 +2798,10 @@ export default {
27982798
if (this.isModernImageSelection && this.form.guestoscategoryid) {
27992799
args.oscategoryid = this.form.guestoscategoryid
28002800
}
2801-
if (args.keyword || args.category !== isoFilter) {
2801+
if (!args.page || args.keyword || (args.category && args.category !== isoFilter)) {
28022802
args.page = 1
2803-
args.pageSize = args.pageSize || 10
28042803
}
2804+
args.pageSize = args.pageSize || 10
28052805
args.zoneid = _.get(this.zone, 'id')
28062806
if (this.isZoneSelectedMultiArch) {
28072807
args.arch = this.selectedArchitecture

ui/src/views/compute/DeployVnfAppliance.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,10 +2546,10 @@ export default {
25462546
if (this.isModernImageSelection && this.form.guestoscategoryid && !['-1', '0'].includes(this.form.guestoscategoryid)) {
25472547
args.oscategoryid = this.form.guestoscategoryid
25482548
}
2549-
if (args.keyword || (args.category && args.category !== templateFilter)) {
2549+
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
25502550
args.page = 1
2551-
args.pageSize = args.pageSize || 10
25522551
}
2552+
args.pageSize = args.pageSize || 10
25532553
args.zoneid = _.get(this.zone, 'id')
25542554
if (this.isZoneSelectedMultiArch) {
25552555
args.arch = this.selectedArchitecture

ui/src/views/compute/ReinstallVm.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,10 @@ export default {
361361
if (this.isModernImageSelection && this.selectedGuestOsCategoryId && !['-1', '0'].includes(this.selectedGuestOsCategoryId)) {
362362
args.oscategoryid = this.selectedGuestOsCategoryId
363363
}
364-
if (args.keyword || (args.category && args.category !== templateFilter)) {
364+
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
365365
args.page = 1
366-
args.pageSize = args.pageSize || 10
367366
}
367+
args.pageSize = args.pageSize || 10
368368
args.zoneid = this.resource.zoneid
369369
args.templatefilter = templateFilter
370370
args.isready = true

0 commit comments

Comments
 (0)