summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/services/component-instance-services
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2020-09-04 15:27:00 +0100
committerSébastien Determe <sebastien.determe@intl.att.com>2020-09-07 13:28:22 +0000
commit3e9a9769dd21f0b16b3f238e42349cba3b1a78de (patch)
tree1517e5266d5b9ae8e5c386d06937eb503d59d431 /catalog-ui/src/app/ng2/services/component-instance-services
parent84a51513bca9c41c8757db017eb45b2d801da195 (diff)
Enable selection of requirements
Instead of all requirements of the component instances in a component being exposed outside the component, this change will enable the component designer to specifiy which should be exposed outside the component and which are to be internal to the component Change-Id: Ib063f7b8b0aca94896e78a46f069725bae3d494d Issue-ID: SDC-2771 Signed-off-by: MichaelMorris <michael.morris@est.tech> Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/services/component-instance-services')
-rw-r--r--catalog-ui/src/app/ng2/services/component-instance-services/component-instance.service.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/services/component-instance-services/component-instance.service.ts b/catalog-ui/src/app/ng2/services/component-instance-services/component-instance.service.ts
index af6ed9d4b0..74ced7d4bf 100644
--- a/catalog-ui/src/app/ng2/services/component-instance-services/component-instance.service.ts
+++ b/catalog-ui/src/app/ng2/services/component-instance-services/component-instance.service.ts
@@ -20,7 +20,7 @@
import {Injectable, Inject} from '@angular/core';
import { Observable } from 'rxjs/Observable';
-import {PropertyFEModel, PropertyBEModel} from "app/models";
+import {PropertyFEModel, PropertyBEModel, Requirement} from "app/models";
import {CommonUtils, ComponentType, ServerTypeUrl, ComponentInstanceFactory} from "app/utils";
import {Component, ComponentInstance, Capability, PropertyModel, ArtifactGroupModel, ArtifactModel, AttributeModel, IFileDownload} from "app/models";
import {SdcConfigToken, ISdcConfig} from "../../config/sdc-config.config";
@@ -125,6 +125,11 @@ export class ComponentInstanceServiceNg2 {
})
}
+ updateInstanceRequirement(componentType: string, componentId: string, componentInstanceId: string, requirement: Requirement): Observable<Requirement> {
+ return this.http.put<Requirement>(this.baseUrl + componentType + componentId + '/componentInstances/' + componentInstanceId + '/requirement/' + requirement.capability +
+ '/requirementName/' + requirement.name, requirement);
+ }
+
updateInstanceInputs(component: Component, componentInstanceId: string, inputs: PropertyBEModel[]): Observable<PropertyBEModel[]> {
return this.http.post<Array<PropertyModel>>(this.baseUrl + component.getTypeUrl() + component.uniqueId + '/resourceInstance/' + componentInstanceId + '/inputs', inputs)