ui: fix initial pagination for images in deploy forms (#11349)

Regression from #10773

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2025-08-01 17:44:01 +05:30 committed by GitHub
parent 44f80648a9
commit b2ce1fb9c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 10 deletions

View File

@ -2981,10 +2981,10 @@ export default {
if (this.isModernImageSelection && this.form.guestoscategoryid && !['-1', '0'].includes(this.form.guestoscategoryid)) {
args.oscategoryid = this.form.guestoscategoryid
}
if (args.keyword || (args.category && args.category !== templateFilter)) {
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
args.page = 1
args.pageSize = args.pageSize || 10
}
args.pageSize = args.pageSize || 10
args.zoneid = _.get(this.zone, 'id')
if (this.isZoneSelectedMultiArch) {
args.arch = this.selectedArchitecture

View File

@ -2759,10 +2759,10 @@ export default {
if (this.isModernImageSelection && this.form.guestoscategoryid && !['-1', '0'].includes(this.form.guestoscategoryid)) {
args.oscategoryid = this.form.guestoscategoryid
}
if (args.keyword || (args.category && args.category !== templateFilter)) {
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
args.page = 1
args.pageSize = args.pageSize || 10
}
args.pageSize = args.pageSize || 10
args.zoneid = _.get(this.zone, 'id')
if (this.isZoneSelectedMultiArch) {
args.arch = this.selectedArchitecture
@ -2798,10 +2798,10 @@ export default {
if (this.isModernImageSelection && this.form.guestoscategoryid) {
args.oscategoryid = this.form.guestoscategoryid
}
if (args.keyword || args.category !== isoFilter) {
if (!args.page || args.keyword || (args.category && args.category !== isoFilter)) {
args.page = 1
args.pageSize = args.pageSize || 10
}
args.pageSize = args.pageSize || 10
args.zoneid = _.get(this.zone, 'id')
if (this.isZoneSelectedMultiArch) {
args.arch = this.selectedArchitecture

View File

@ -2546,10 +2546,10 @@ export default {
if (this.isModernImageSelection && this.form.guestoscategoryid && !['-1', '0'].includes(this.form.guestoscategoryid)) {
args.oscategoryid = this.form.guestoscategoryid
}
if (args.keyword || (args.category && args.category !== templateFilter)) {
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
args.page = 1
args.pageSize = args.pageSize || 10
}
args.pageSize = args.pageSize || 10
args.zoneid = _.get(this.zone, 'id')
if (this.isZoneSelectedMultiArch) {
args.arch = this.selectedArchitecture

View File

@ -361,10 +361,10 @@ export default {
if (this.isModernImageSelection && this.selectedGuestOsCategoryId && !['-1', '0'].includes(this.selectedGuestOsCategoryId)) {
args.oscategoryid = this.selectedGuestOsCategoryId
}
if (args.keyword || (args.category && args.category !== templateFilter)) {
if (!args.page || args.keyword || (args.category && args.category !== templateFilter)) {
args.page = 1
args.pageSize = args.pageSize || 10
}
args.pageSize = args.pageSize || 10
args.zoneid = this.resource.zoneid
args.templatefilter = templateFilter
args.isready = true