summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pages')
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts3
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts26
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts2
3 files changed, 19 insertions, 12 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts
index b8de7b8559..ba19e266b7 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/interface-operations.component.ts
@@ -243,7 +243,8 @@ export class InterfaceOperationsComponent {
selectedInterface: interfaceModel ? interfaceModel : new UIInterfaceModel(),
selectedInterfaceOperation: operation ? operation : new InterfaceOperationModel(),
validityChangedCallback: this.enableOrDisableSaveButton,
- isViewOnly: this.isViewOnly
+ isViewOnly: this.isViewOnly,
+ modelName: this.componentMetaData.model
}
);
this.modalInstance.instance.open();
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
index 5cc7f691aa..fd745ff311 100644
--- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/interface-operation-handler.component.ts
@@ -42,7 +42,6 @@ import {DataTypeModel} from "../../../../../models/data-types";
})
export class InterfaceOperationHandlerComponent {
- @Input() private modelName: string;
@Output('propertyChanged') emitter: EventEmitter<PropertyFEModel> = new EventEmitter<PropertyFEModel>();
@ViewChild('interfaceOperationDropDown') interfaceOperationDropDown: DropDownComponent;
@@ -53,6 +52,7 @@ export class InterfaceOperationHandlerComponent {
validityChangedCallback: Function;
isViewOnly: boolean;
isEdit: boolean;
+ modelName: string;
};
dataTypeMap$: Observable<Map<string, DataTypeModel>>;
@@ -74,6 +74,7 @@ export class InterfaceOperationHandlerComponent {
interfaceOperationMap: Map<string, Array<string>> = new Map<string, Array<string>>();
interfaceOperationOptions: Array<DropDownOption> = [];
selectedInterfaceOperation: DropDownOption = undefined;
+ modelName: string;
toscaArtifactTypeSelected: string;
toscaArtifactTypeProperties: Array<PropertyBEModel> = [];
@@ -87,15 +88,7 @@ export class InterfaceOperationHandlerComponent {
inputTypeOptions: any[];
constructor(private dataTypeService: DataTypeService, private componentServiceNg2: ComponentServiceNg2) {
- this.dataTypeMap$ = new Observable<Map<string, DataTypeModel>>(subscriber => {
- this.dataTypeService.findAllDataTypesByModel(this.modelName)
- .then((dataTypesMap: Map<string, DataTypeModel>) => {
- subscriber.next(dataTypesMap);
- });
- });
- this.dataTypeMap$.subscribe(value => {
- this.dataTypeMap = value;
- });
+
}
@@ -106,10 +99,21 @@ export class InterfaceOperationHandlerComponent {
this.operationToUpdate = this.input.selectedInterfaceOperation;
this.operationToUpdate.interfaceId = this.input.selectedInterface.uniqueId;
this.operationToUpdate.interfaceType = this.input.selectedInterface.type;
+ this.modelName = this.input.modelName;
this.initInputs();
this.removeImplementationQuote();
this.validityChanged();
this.loadInterfaceOperationImplementation();
+
+ this.dataTypeMap$ = new Observable<Map<string, DataTypeModel>>(subscriber => {
+ this.dataTypeService.findAllDataTypesByModel(this.modelName)
+ .then((dataTypesMap: Map<string, DataTypeModel>) => {
+ subscriber.next(dataTypesMap);
+ });
+ });
+ this.dataTypeMap$.subscribe(value => {
+ this.dataTypeMap = value;
+ });
}
private initInputs() {
@@ -127,7 +131,7 @@ export class InterfaceOperationHandlerComponent {
}
private loadInterfaceType() {
- this.componentServiceNg2.getInterfaceTypesByModel(undefined)
+ this.componentServiceNg2.getInterfaceTypesByModel(this.modelName)
.subscribe(response => {
if (response) {
this.interfaceOperationMap = new Map<string, Array<string>>();
diff --git a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts
index c9a6d07057..35490b183c 100644
--- a/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts
+++ b/catalog-ui/src/app/ng2/pages/interface-definition/interface-definition.page.component.ts
@@ -212,6 +212,7 @@ export class InterfaceDefinitionComponent {
callback([]);
}
});
+ this.loadToscaArtifacts();
}
initInterfaces(interfaces: InterfaceModel[]): void {
@@ -255,6 +256,7 @@ export class InterfaceDefinitionComponent {
isViewOnly: this.isViewOnly,
isEdit: isEdit,
interfaceTypesMap: this.interfaceTypesMap,
+ modelName: this.component.model
}
);
this.modalInstance.instance.open();