diff options
Diffstat (limited to 'catalog-ui/src/app/utils/component-factory.ts')
-rw-r--r-- | catalog-ui/src/app/utils/component-factory.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/catalog-ui/src/app/utils/component-factory.ts b/catalog-ui/src/app/utils/component-factory.ts index 889f6fb43b..d4e282fcb0 100644 --- a/catalog-ui/src/app/utils/component-factory.ts +++ b/catalog-ui/src/app/utils/component-factory.ts @@ -142,7 +142,7 @@ export class ComponentFactory { return newResource; }; - public createEmptyComponent = (componentType:string):Component => { + public createEmptyComponent = (componentType:string, resourceType?:string):Component => { let newComponent:Component; switch (componentType) { @@ -161,6 +161,9 @@ export class ComponentFactory { case ResourceType.CVFC: case ResourceType.CONFIGURATION: newComponent = new Resource(this.ResourceService, this.$q); + if (resourceType){ + (<Resource> newComponent).resourceType = resourceType; + } break; } newComponent.componentType = componentType; |