From 1336da0b9a713b9d6cf1e3f6ea709c50be43d4ab Mon Sep 17 00:00:00 2001 From: KrupaNagabhushan Date: Mon, 17 Oct 2022 16:40:21 +0100 Subject: Open Data type from Catalog Issue-ID: SDC-4221 Signed-off-by: KrupaNagabhushan Change-Id: I3ad6a1f26abbcffe13044b8fc12828f255bc4f48 --- catalog-ui/src/app/ng2/pages/catalog/catalog.component.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'catalog-ui') diff --git a/catalog-ui/src/app/ng2/pages/catalog/catalog.component.ts b/catalog-ui/src/app/ng2/pages/catalog/catalog.component.ts index 1a43ecf049..cc86b34dfc 100644 --- a/catalog-ui/src/app/ng2/pages/catalog/catalog.component.ts +++ b/catalog-ui/src/app/ng2/pages/catalog/catalog.component.ts @@ -35,7 +35,7 @@ import { } from "app/models"; import { ResourceNamePipe } from "../../pipes/resource-name.pipe"; import { EntityFilterPipe, IEntityFilterObject, ISearchFilter} from "../../pipes/entity-filter.pipe"; -import {DEFAULT_MODEL_NAME} from "app/utils/constants"; +import {DEFAULT_MODEL_NAME, States} from "app/utils/constants"; import {DataTypeCatalogComponent} from "../../../models/data-type-catalog-component"; interface Gui { @@ -361,8 +361,12 @@ export class CatalogComponent { } - public goToComponent(component: Component): void { - this.$state.go('workspace.general', {id: component.uniqueId, type: component.componentType.toLowerCase()}); + public goToComponent(component: Component | DataTypeCatalogComponent): void { + if (component instanceof DataTypeCatalogComponent) { + this.$state.go(States.TYPE_WORKSPACE, {type: component.getComponentSubType().toLowerCase(), id: component.uniqueId}); + } else { + this.$state.go(States.WORKSPACE_GENERAL, {id: component.uniqueId, type: component.componentType.toLowerCase()}); + } } -- cgit 1.2.3-korg