aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/home
diff options
context:
space:
mode:
authorKrupaNagabhushan <krupa.nagabhushan@est.tech>2022-09-23 10:17:29 +0100
committerMichael Morris <michael.morris@est.tech>2022-11-30 16:40:22 +0000
commit4a754a8c898fb397e19876de2d19141d047a9e58 (patch)
tree164634a57dc675cd45d84fbc40dc843cac57ca77 /catalog-ui/src/app/ng2/pages/home
parent1ed328d96144bc626f664e2a5c45894393e8308e (diff)
View data types in UI catalog
Issue-ID: SDC-4220 Signed-off-by: KrupaNagabhushan <krupa.nagabhushan@est.tech> Change-Id: I880c7fedb58eafc7524fc6833b9b5d02f3b7d523
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/home')
-rw-r--r--catalog-ui/src/app/ng2/pages/home/home.component.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/catalog-ui/src/app/ng2/pages/home/home.component.ts b/catalog-ui/src/app/ng2/pages/home/home.component.ts
index f0e8815d93..784823eacd 100644
--- a/catalog-ui/src/app/ng2/pages/home/home.component.ts
+++ b/catalog-ui/src/app/ng2/pages/home/home.component.ts
@@ -19,7 +19,7 @@
*/
'use strict';
import {Component as NgComponent, Inject, OnInit} from '@angular/core';
-import {Component, ComponentMetadata, IConfigRoles, IUserProperties, Resource} from 'app/models';
+import {Component, ComponentMetadata, IConfigRoles, IUserProperties, Resource, Service} from 'app/models';
import {HomeFilter} from 'app/models/home-filter';
import {AuthenticationService, CacheService, HomeService, ResourceServiceNg2} from 'app/services-ng2';
import {ComponentState, ModalsHandler} from 'app/utils';
@@ -32,6 +32,7 @@ import {EntityFilterPipe} from '../../pipes/entity-filter.pipe';
import {TranslateService} from '../../shared/translator/translate.service';
import {FoldersItemsMenu, FoldersItemsMenuGroup, FoldersMenu} from './folders';
import {ImportVSPdata} from "../../components/modals/onboarding-modal/onboarding-modal.component";
+import {DataTypeCatalogComponent} from "../../../models/data-type-catalog-component";
@NgComponent({
selector: 'home-page',
@@ -41,8 +42,8 @@ import {ImportVSPdata} from "../../components/modals/onboarding-modal/onboarding
export class HomeComponent implements OnInit {
public numberOfItemToDisplay: number;
public homeItems: Component[];
- public homeFilteredItems: Component[];
- public homeFilteredSlicedItems: Component[];
+ public homeFilteredItems: Array<Component | DataTypeCatalogComponent>;
+ public homeFilteredSlicedItems: Array<Component | DataTypeCatalogComponent>;
public folders: FoldersMenu;
public roles: IConfigRoles;
public user: IUserProperties;
@@ -358,12 +359,12 @@ export class HomeComponent implements OnInit {
this.homeFilteredSlicedItems = this.homeFilteredItems.slice(0, this.numberOfItemToDisplay);
}
- private makeFilteredItems(homeItems: Component[], filter: HomeFilter) {
- let filteredComponents: Component[] = homeItems;
+ private makeFilteredItems(homeItems: Array<Component>, filter: HomeFilter) {
+ let filteredComponents: Array<Component | DataTypeCatalogComponent> = homeItems;
// filter: exclude all resources of type 'vfcmtType':
- filteredComponents = filteredComponents.filter((c) =>
- !c.isResource() || (c as Resource).resourceType.indexOf(this.vfcmtType) === -1);
+ filteredComponents = filteredComponents.filter((c) =>
+ !c.isResource() || (c as Resource).resourceType.indexOf(this.vfcmtType) === -1);
// common entity filter
// --------------------------------------------------------------------------