aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/server
diff options
context:
space:
mode:
authorShaaban Ebrahim <shaaban.eltanany.ext@orange.com>2019-11-18 19:39:26 +0200
committerShaaban Ebrahim <shaaban.eltanany.ext@orange.com>2019-11-18 19:41:17 +0200
commit6ae5484164a944e9ad3211c1cbdc89cfc520688d (patch)
tree92134d8eddaf170647ad4e7b0f883bb3c8ce162d /cds-ui/server
parent0ff4184e485c31a3a1faa54f6172710bea86c286 (diff)
add service for searching in meta data pageable
Issue-ID: CCSDK-1770 Signed-off-by: Shaaban Ebrahim <shaaban.eltanany.ext@orange.com> Change-Id: Ibf718314f2f818108af3133641ab7be48c334dce
Diffstat (limited to 'cds-ui/server')
-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> {
at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ============LICENSE_END========================================================= --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.oparent</groupId> <artifactId>oparent</artifactId> <version>3.2.0</version> </parent> <groupId>org.onap.cps</groupId> <artifactId>cps-aggregator</artifactId> <version>0.0.2-SNAPSHOT</version> <packaging>pom</packaging> <name>cps</name> <description>ONAP Configuration Persistence Service</description> <organization> <name>ONAP - CPS</name> <url>http://www.onap.org/</url> </organization> <properties> <maven.deploy.skip>true</maven.deploy.skip> <maven.install.skip>true</maven.install.skip> </properties> <modules> <module>cps-dependencies</module> <module>cps-bom</module> <module>cps-parent</module> <module>cps-service</module> <module>cps-rest</module> <module>cps-nf-proxy-service</module> <module>cps-nf-proxy-rest</module> <module>cps-ri</module> <module>checkstyle</module> <module>spotbugs</module> <module>cps-application</module> </modules> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> <version>2.8.1</version> <configuration> <processAllModules>true</processAllModules> </configuration> </plugin> </plugins> </build> </project>