summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts7
-rw-r--r--catalog-ui/src/app/ng2/services/element.service.ts5
-rw-r--r--catalog-ui/src/app/ng2/services/responses/component-generic-response.ts2
3 files changed, 7 insertions, 7 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
index fbbc4d8b0e..8e483ea5ef 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/properties-assignment.page.component.ts
@@ -1146,7 +1146,7 @@ export class PropertiesAssignmentComponent {
}
/*** addProperty ***/
- addProperty = (model: Model) => {
+ addProperty = (model: string) => {
this.loadDataTypesByComponentModel(model)
let modalTitle = 'Add Property';
let modal = this.ModalService.createCustomModal(new ModalModel(
@@ -1251,9 +1251,8 @@ export class PropertiesAssignmentComponent {
return instanceType === ResourceType.VF || instanceType === ResourceType.PNF || instanceType === ResourceType.CVFC || instanceType === ResourceType.CR;
}
- loadDataTypesByComponentModel(model:Model) {
- let modelName = new Model(model).name;
- this.propertyCreatorComponent.filterDataTypesByModel(modelName);
+ loadDataTypesByComponentModel(model:string) {
+ this.propertyCreatorComponent.filterDataTypesByModel(model);
}
}
diff --git a/catalog-ui/src/app/ng2/services/element.service.ts b/catalog-ui/src/app/ng2/services/element.service.ts
index 97efbccfef..b3cf8c38f4 100644
--- a/catalog-ui/src/app/ng2/services/element.service.ts
+++ b/catalog-ui/src/app/ng2/services/element.service.ts
@@ -33,8 +33,9 @@ export class ElementService {
this.baseUrl = sdcConfig.api.root;
}
- getCategoryBasetypes(categoryName:string):Observable<BaseTypeResponse[]> {
- return this.http.get<ListBaseTypesResponse>(this.baseUrl + "/v1/category/services/" + categoryName + "/baseTypes")
+ getCategoryBasetypes(categoryName:string, modelName:string):Observable<BaseTypeResponse[]> {
+ let modelQueryParam: string = modelName ? '?model=' + modelName : '';
+ return this.http.get<ListBaseTypesResponse>(this.baseUrl + "/v1/category/services/" + categoryName + "/baseTypes" + modelQueryParam)
.pipe(map(response => response.baseTypes));
}
diff --git a/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts b/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts
index fa3de88c7b..aaf105463d 100644
--- a/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts
+++ b/catalog-ui/src/app/ng2/services/responses/component-generic-response.ts
@@ -62,7 +62,7 @@ export class ComponentGenericResponse implements Serializable<ComponentGenericR
public substitutionFilters: any;
public derivedFromGenericType;
public derivedFromGenericVersion;
- public model:Model;
+ public model:string;
deserialize (response): ComponentGenericResponse {