Provision to sort ISOs from UI, and Updated Templates/ISOs API response to return in the order of sortkey (#5800)

This commit is contained in:
sureshanaparti 2021-12-24 12:44:50 +05:30 committed by GitHub
parent f03ed8c721
commit 9b0a1418ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -561,9 +561,12 @@ public class TemplateJoinDaoImpl extends GenericDaoBaseWithTagInformation<Templa
if (ids == null || ids.length == 0) {
return new ArrayList<TemplateJoinVO>();
}
Filter searchFilter = new Filter(TemplateJoinVO.class, "sortKey", QueryService.SortKeyAscending.value(), null, null);
searchFilter.addOrderBy(TemplateJoinVO.class, "tempZonePair", true);
SearchCriteria<TemplateJoinVO> sc = tmpltIdsSearch.create();
sc.setParameters("idsIN", ids);
return searchIncludingRemoved(sc, null, null, false);
return searchIncludingRemoved(sc, searchFilter, null, false);
}
}

View File

@ -194,6 +194,9 @@ export default {
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
fields.push('account')
}
if (['Admin'].includes(store.getters.userInfo.roletype)) {
fields.push('order')
}
return fields
},
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created'],