aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-05-06 15:10:18 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-06 15:10:18 +0000
commit1e6f878cc92f42ca25f44319b70797bdcc8a4e1f (patch)
treeba70509807b00e402c89275a0d28d2a997f5aba1 /cds-ui/designer-client/src/app
parent158603523a43d4480b519f4ef27649cd98783410 (diff)
parentf486ab15c64375a2c97df979a718929420124cd6 (diff)
Merge "fix sort at package list"
Diffstat (limited to 'cds-ui/designer-client/src/app')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts
index 2332d8e53..8275f8c6c 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts
@@ -37,10 +37,12 @@ export class PackagesApiService {
}
getPagedPackages(pageNumber: number, pageSize: number, sortBy: string): Observable<BluePrintPage[]> {
+ const sortType = sortBy.includes('DATE') ? 'DESC' : 'ASC';
return this.api.get(BlueprintURLs.getPagedBlueprints, {
offset: pageNumber,
limit: pageSize,
- sort: sortBy
+ sort: sortBy,
+ sortType
});
}
@@ -56,11 +58,12 @@ export class PackagesApiService {
}
getPagedPackagesByKeyWord(keyWord: string, pageNumber: number, pageSize: number, sortBy: string) {
-
+ const sortType = sortBy.includes('DATE') ? 'DESC' : 'ASC';
return this.api.get(BlueprintURLs.getMetaDatePageable + '/' + keyWord, {
offset: pageNumber,
limit: pageSize,
- sort: sortBy
+ sort: sortBy,
+ sortType
});
}
}