aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2022-10-17 16:40:21 +0100
committerMichael Morris <michael.morris@est.tech>2022-12-01 09:59:00 +0000
commit1336da0b9a713b9d6cf1e3f6ea709c50be43d4ab (patch)
tree8ceeb58c0456f0b7894d798c3ea129c90cf38b42
parent7eefea2dec674b66f07aaaf21901e183067868b3 (diff)
Open Data type from Catalog
Issue-ID: SDC-4221 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Change-Id: I3ad6a1f26abbcffe13044b8fc12828f255bc4f48
-rw-r--r--catalog-ui/src/app/ng2/pages/catalog/catalog.component.ts10
1 files changed, 7 insertions, 3 deletions
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()});
+ }
}