aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services/component-services
diff options
context:
space:
mode:
authorsiddharth0905 <siddharth.singh4@amdocs.com>2018-11-22 13:37:31 +0530
committersiddharth0905 <siddharth.singh4@amdocs.com>2018-11-23 12:48:21 +0530
commitb734ea21ac7be393c59cf9976f0e5ddeaf27d568 (patch)
treedde5d205c378ac748bcecdf7f17f5a41567156fe /catalog-ui/src/app/ng2/services/component-services
parentabbd5cf62a0bdd6a22b9bea0cf589e42da0be229 (diff)
Service Workflow changes
Service workflow change with few bug fixes Change-Id: Ice2376565bf46fb8d86fb6062654ec54bb2daa43 Issue-ID: SDC-1937 Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
Diffstat (limited to 'catalog-ui/src/app/ng2/services/component-services')
-rw-r--r--catalog-ui/src/app/ng2/services/component-services/component.service.ts18
1 files changed, 4 insertions, 14 deletions
diff --git a/catalog-ui/src/app/ng2/services/component-services/component.service.ts b/catalog-ui/src/app/ng2/services/component-services/component.service.ts
index 3546ebd374..26b0291156 100644
--- a/catalog-ui/src/app/ng2/services/component-services/component.service.ts
+++ b/catalog-ui/src/app/ng2/services/component-services/component.service.ts
@@ -128,9 +128,7 @@ export class ComponentServiceNg2 {
getInterfaceOperation(component:Component, operation:OperationModel):Observable<OperationModel> {
return this.http.get(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/interfaceOperations/' + operation.uniqueId)
- .map((res:Response) => {
- return res.json();
- });
+ .map((res:Response) => res.json());
}
createInterfaceOperation(component:Component, operation:OperationModel):Observable<CreateOperationResponse> {
@@ -140,9 +138,7 @@ export class ComponentServiceNg2 {
}
};
return this.http.post(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/interfaceOperations', operationList)
- .map((res:Response) => {
- return res.json();
- });
+ .map((res:Response) => res.json());
}
updateInterfaceOperation(component:Component, operation:OperationModel):Observable<CreateOperationResponse> {
@@ -152,16 +148,12 @@ export class ComponentServiceNg2 {
}
};
return this.http.put(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/interfaceOperations', operationList)
- .map((res:Response) => {
- return res.json();
- });
+ .map((res:Response) => res.json());
}
deleteInterfaceOperation(component:Component, operation:OperationModel):Observable<OperationModel> {
return this.http.delete(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/interfaceOperations/' + operation.uniqueId)
- .map((res:Response) => {
- return res.json();
- });
+ .map((res:Response) => res.json());
}
getCapabilitiesAndRequirements(componentType: string, componentId:string):Observable<ComponentGenericResponse> {
@@ -189,7 +181,6 @@ export class ComponentServiceNg2 {
deleteInput(component:Component, input:InputBEModel):Observable<InputBEModel> {
-
return this.http.delete(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/delete/' + input.uniqueId + '/input')
.map((res:Response) => {
return new InputBEModel(res.json());
@@ -197,7 +188,6 @@ export class ComponentServiceNg2 {
}
updateComponentInputs(component:Component, inputs:InputBEModel[]):Observable<InputBEModel[]> {
-
return this.http.post(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/update/inputs', inputs)
.map((res:Response) => {
return res.json().map((input) => new InputBEModel(input));