Add quota sorting to the project quotas list (#19576)

1. For #16517

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
Shijun Sun 2023-11-15 15:25:55 +08:00 committed by GitHub
parent 6a6e29570c
commit 7718134301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -67,7 +67,9 @@
</clr-dg-action-bar>
<clr-dg-column>{{ 'QUOTA.PROJECT' | translate }}</clr-dg-column>
<clr-dg-column>{{ 'QUOTA.OWNER' | translate }}</clr-dg-column>
<clr-dg-column>{{ 'QUOTA.STORAGE' | translate }}</clr-dg-column>
<clr-dg-column [clrDgSortBy]="'used.storage'">{{
'QUOTA.STORAGE' | translate
}}</clr-dg-column>
<clr-dg-placeholder>{{
'QUOTA.PLACEHOLDER' | translate
}}</clr-dg-placeholder>

View File

@ -20,6 +20,7 @@ import {
getPageSizeFromLocalStorage,
PageSizeMapKeys,
setPageSizeToLocalStorage,
getSortingString,
} from '../../../../shared/units/utils';
import { ErrorHandler } from '../../../../shared/units/error-handler';
import {
@ -242,6 +243,7 @@ export class ProjectQuotasComponent implements OnChanges {
reference: QuotaType,
page: pageNumber,
pageSize: this.pageSize,
sort: getSortingString(state),
})
.pipe(
finalize(() => {