summaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
authorBrinda Santh Muthuramalingam <brindasanth@in.ibm.com>2019-11-19 14:34:55 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-19 14:34:55 +0000
commit1337eccc2be949d860f3c5b1f0148c061c3c669b (patch)
treeee788435bdbb5234711982d85b8e354105b48636 /cds-ui
parentc38f351751334addb0bdb74f90344aa54cc23695 (diff)
parent6ae5484164a944e9ad3211c1cbdc89cfc520688d (diff)
Merge "add service for searching in meta data pageable"
Diffstat (limited to 'cds-ui')
-rw-r--r--cds-ui/server/src/controllers/blueprint-rest.controller.ts16
-rw-r--r--cds-ui/server/src/datasources/blueprint.datasource-template.ts15
-rw-r--r--cds-ui/server/src/services/blueprint.service.ts3
3 files changed, 34 insertions, 0 deletions
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
index 49ecb9df1..1a8de6b47 100644
--- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts
+++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
@@ -84,6 +84,22 @@ export class BlueprintRestController {
return await this.bpservice.getPagedBueprints(limit, offset, sort);
}
+ @get('/controllerblueprint/metadata/paged/{keyword}', {
+ responses: {
+ '200': {
+ description: 'Blueprint model instance with pagination',
+ content: { 'application/json': { schema: { 'x-ts-type': Blueprint } } },
+ },
+ },
+ })
+ async getMetaDataPagedBlueprints(
+ @param.path.string('keyword') keyword: string,
+ @param.query.number('limit') limit: number,
+ @param.query.number('offset') offset: number,
+ @param.query.string('sort') sort: string) {
+ return await this.bpservice.getMetaDataPagedBlueprints(limit, offset, sort,keyword);
+ }
+
@get('/controllerblueprint/meta-data/{keyword}', {
responses: {
'200': {
diff --git a/cds-ui/server/src/datasources/blueprint.datasource-template.ts b/cds-ui/server/src/datasources/blueprint.datasource-template.ts
index 914021887..a7cea1d4a 100644
--- a/cds-ui/server/src/datasources/blueprint.datasource-template.ts
+++ b/cds-ui/server/src/datasources/blueprint.datasource-template.ts
@@ -69,5 +69,20 @@ export default {
"getPagedBueprints": ["limit","offset", "sort"],
}
},
+ {
+ "template": {
+ "method": "GET",
+ "url": processorApiConfig.http.url + "/blueprint-model/paged/meta-data/{keyword}?limit={limit}&offset={offset}&sort={sort}",
+ "headers": {
+ "accepts": "application/json",
+ "content-type": "application/json",
+ "authorization": processorApiConfig.http.authToken
+ },
+ "responsePath": "$",
+ },
+ "functions": {
+ "getMetaDataPagedBlueprints": ["limit","offset", "sort","keyword"],
+ }
+ },
]
};
diff --git a/cds-ui/server/src/services/blueprint.service.ts b/cds-ui/server/src/services/blueprint.service.ts
index bc93fa1be..b6474a3a2 100644
--- a/cds-ui/server/src/services/blueprint.service.ts
+++ b/cds-ui/server/src/services/blueprint.service.ts
@@ -7,6 +7,9 @@ export interface BlueprintService {
getBlueprintsByKeyword(keyword: string): Promise<any>;
getByTags(tags: string): Promise<JSON>;
getPagedBueprints(limit: number, offset: number , sort: string): Promise<any>;
+ getMetaDataPagedBlueprints(limit: number, offset: number, sort: string, keyword: string): Promise<any>;
+
+
}
export class BlueprintServiceProvider implements Provider<BlueprintService> {