mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
fixes pagination of template/isos does not match on deploy VM
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
86daf79a77
commit
d4ebf4c7be
@ -1492,17 +1492,17 @@ export default {
|
||||
})
|
||||
},
|
||||
fetchTemplates (templateFilter, params) {
|
||||
params = params || {}
|
||||
if (params.keyword || params.category !== templateFilter) {
|
||||
params.page = 1
|
||||
params.pageSize = params.pageSize || 10
|
||||
const args = Object.assign({}, params)
|
||||
if (args.keyword || args.category !== templateFilter) {
|
||||
args.page = 1
|
||||
args.pageSize = args.pageSize || 10
|
||||
}
|
||||
params.zoneid = _.get(this.zone, 'id')
|
||||
params.templatefilter = templateFilter
|
||||
params.details = 'min'
|
||||
args.zoneid = _.get(this.zone, 'id')
|
||||
args.templatefilter = templateFilter
|
||||
args.details = 'min'
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
api('listTemplates', params).then((response) => {
|
||||
api('listTemplates', args).then((response) => {
|
||||
resolve(response)
|
||||
}).catch((reason) => {
|
||||
// ToDo: Handle errors
|
||||
|
||||
@ -104,7 +104,6 @@ export default {
|
||||
const key = this.inputDecorator.slice(0, -2)
|
||||
for (const filter of this.filterOpts) {
|
||||
if (items[filter.id] && items[filter.id][key] && items[filter.id][key].length > 0) {
|
||||
this.filterType = filter.id
|
||||
this.checkedValue = items[filter.id][key][0].id
|
||||
break
|
||||
}
|
||||
@ -113,6 +112,7 @@ export default {
|
||||
inputDecorator (newValue, oldValue) {
|
||||
if (newValue !== oldValue) {
|
||||
this.filter = ''
|
||||
this.filterType = 'featured'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user