From cef866edcf8a14ede6762297dd9ab04b1f3d0375 Mon Sep 17 00:00:00 2001 From: aribeiro Date: Fri, 15 Oct 2021 13:41:39 +0100 Subject: Support get_input for complex data types Issue-ID: SDC-3760 Signed-off-by: aribeiro Change-Id: I68ceaa47012186533a90f06c2688454f5dde799b --- catalog-ui/src/app/ng2/services/data-type.service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'catalog-ui/src/app/ng2/services/data-type.service.ts') diff --git a/catalog-ui/src/app/ng2/services/data-type.service.ts b/catalog-ui/src/app/ng2/services/data-type.service.ts index 85c8b898aa..5b08e9323f 100644 --- a/catalog-ui/src/app/ng2/services/data-type.service.ts +++ b/catalog-ui/src/app/ng2/services/data-type.service.ts @@ -39,6 +39,15 @@ export class DataTypeService { this.dataTypes = dataTypeService.getAllDataTypes(); //This should eventually be replaced by an NG2 call to the backend instead of utilizing Angular1 downgraded component. } + public getDataTypeByModelAndTypeName(modelName: string, typeName: string): DataTypeModel { + this.dataTypes = this.dataTypeService.getAllDataTypesFromModel(modelName); + let dataTypeFound = this.dataTypes[typeName]; + if (!dataTypeFound) { + console.log("MISSING Datatype for model " + modelName + " and type: " + typeName); + } + return dataTypeFound; + } + public getDataTypeByTypeName(typeName: string): DataTypeModel { if(!this.dataTypes){ this.dataTypes = this.dataTypeService.getAllDataTypes(); -- cgit 1.2.3-korg