diff --git a/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/card-cf-recent-apps.component.ts b/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/card-cf-recent-apps.component.ts index bd5bfa11db..69179fc0f4 100644 --- a/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/card-cf-recent-apps.component.ts +++ b/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/card-cf-recent-apps.component.ts @@ -61,7 +61,7 @@ export class CardCfRecentAppsComponent implements OnInit { if (!this.allApps$) { this.allApps$ = this.appsPagObs.entities$; this.loading$ = this.appsPagObs.fetchingEntities$; - this.hasEntities$ = this.appsPagObs.hasEntities$ + this.hasEntities$ = this.appsPagObs.hasEntities$; } else { this.hasEntities$ = of(true); } @@ -84,7 +84,7 @@ export class CardCfRecentAppsComponent implements OnInit { } private fetchAppStats(recentApps: APIResource[]) { - if(!this.noStats) { + if (!this.noStats) { recentApps.forEach(app => { if (app.entity.state === 'STARTED') { cfEntityCatalog.appStats.api.getMultiple(app.metadata.guid, this.endpoint); diff --git a/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/compact-app-card/compact-app-card.component.ts b/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/compact-app-card/compact-app-card.component.ts index 6e3aef7245..c78c819bd1 100644 --- a/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/compact-app-card/compact-app-card.component.ts +++ b/src/frontend/packages/cloud-foundry/src/features/home/card-cf-recent-apps/compact-app-card/compact-app-card.component.ts @@ -39,7 +39,7 @@ export class CompactAppCardComponent implements OnInit { ) { } ngOnInit() { - if(this.activeRouteCfOrgSpace) { + if (this.activeRouteCfOrgSpace) { this.bcType = this.setBreadcrumbType(this.activeRouteCfOrgSpace); if (!this.endpoint) { this.endpoint = this.activeRouteCfOrgSpace.cfGuid; @@ -47,7 +47,7 @@ export class CompactAppCardComponent implements OnInit { } if (!this.app) { - return + return; } const initState = this.appStateService.get(this.app.entity, null); diff --git a/src/frontend/packages/cloud-foundry/src/features/home/cfhome-card/cfhome-card.component.ts b/src/frontend/packages/cloud-foundry/src/features/home/cfhome-card/cfhome-card.component.ts index 4c522f6129..1220e852b9 100644 --- a/src/frontend/packages/cloud-foundry/src/features/home/cfhome-card/cfhome-card.component.ts +++ b/src/frontend/packages/cloud-foundry/src/features/home/cfhome-card/cfhome-card.component.ts @@ -42,18 +42,18 @@ import { ITileConfig } from './../../../../../core/src/shared/components/tile/ti }) export class CFHomeCardComponent implements HomePageEndpointCard { - _layout: HomePageCardLayout; + pLayout: HomePageCardLayout; get layout(): HomePageCardLayout { - return this._layout; + return this.pLayout; } @Input() set layout(value: HomePageCardLayout) { if (value) { - this._layout = value; + this.pLayout = value; } this.updateLayout(); - }; + } @Input() set endpoint(value: EndpointModel) { this.guid = value.guid; @@ -89,7 +89,7 @@ export class CFHomeCardComponent implements HomePageEndpointCard { appDeploySourceTypes: ApplicationDeploySourceTypes, ) { // Set a default layout - this._layout = new HomePageCardLayout(1, 1); + this.pLayout = new HomePageCardLayout(1, 1); // Get source types for if we are showing tiles to deploy an application this.sourceTypes = appDeploySourceTypes.getTypes(); @@ -110,7 +110,7 @@ export class CFHomeCardComponent implements HomePageEndpointCard { if (tile) { const query = { [BASE_REDIRECT_QUERY]: `applications/new/${this.guid}`, - [AUTO_SELECT_CF_URL_PARAM]:this.guid + [AUTO_SELECT_CF_URL_PARAM]: this.guid }; if (tile.data.subType) { query[AUTO_SELECT_DEPLOY_TYPE_URL_PARAM] = tile.data.subType; @@ -126,7 +126,7 @@ export class CFHomeCardComponent implements HomePageEndpointCard { this.appCount$ = CloudFoundryEndpointService.fetchAppCount(this.store, this.pmf, this.guid); this.orgCount$ = CloudFoundryEndpointService.fetchOrgCount(this.store, this.pmf, this.guid); - this.appLink = () => goToAppWall(this.store, this.guid);; + this.appLink = () => goToAppWall(this.store, this.guid); const appsPagObs = cfEntityCatalog.application.store.getPaginationService(this.guid); @@ -192,8 +192,6 @@ export class CFHomeCardComponent implements HomePageEndpointCard { } private restrictApps(apps: APIResource[]): APIResource[] { - return !apps ? [] :[...apps.sort(appDataSort).slice(0, this.recentAppsRows)]; + return !apps ? [] : [...apps.sort(appDataSort).slice(0, this.recentAppsRows)]; } - } - diff --git a/src/frontend/packages/core/src/features/home/home.types.ts b/src/frontend/packages/core/src/features/home/home.types.ts index 2e60d1afc8..aeae4b9892 100644 --- a/src/frontend/packages/core/src/features/home/home.types.ts +++ b/src/frontend/packages/core/src/features/home/home.types.ts @@ -23,7 +23,6 @@ export abstract class HomePageEndpointCard { } export interface LinkMetadata { - favs: IHydrationResults[], - shortcuts: HomeCardShortcut[] + favs: IHydrationResults[]; + shortcuts: HomeCardShortcut[]; } - diff --git a/src/frontend/packages/core/src/features/home/home/favorites-side-panel/favorites-side-panel.component.ts b/src/frontend/packages/core/src/features/home/home/favorites-side-panel/favorites-side-panel.component.ts index cc886ef1dd..76dde68721 100644 --- a/src/frontend/packages/core/src/features/home/home/favorites-side-panel/favorites-side-panel.component.ts +++ b/src/frontend/packages/core/src/features/home/home/favorites-side-panel/favorites-side-panel.component.ts @@ -14,7 +14,7 @@ export class FavoritesSidePanelComponent implements PreviewableComponent { name: string; setProps(props: { [key: string]: any; }): void { - this.favorites$ = props.favorites$ + this.favorites$ = props.favorites$; this.name = props.endpoint.name; } diff --git a/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.spec.ts b/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.spec.ts index eb75b1541c..3a027f1a0a 100644 --- a/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.spec.ts +++ b/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.spec.ts @@ -42,7 +42,7 @@ describe('HomePageEndpointCardComponent', () => { afterEach(() => { component.ngOnDestroy(); - }) + }); it('should create', () => { expect(component).toBeTruthy(); diff --git a/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.ts b/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.ts index 7e2134242e..3d7bd6b162 100644 --- a/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.ts +++ b/src/frontend/packages/core/src/features/home/home/home-page-endpoint-card/home-page-endpoint-card.component.ts @@ -40,22 +40,22 @@ const MAX_LINKS = 5; }) export class HomePageEndpointCardComponent implements OnInit, OnDestroy, AfterViewInit { - @ViewChild('customCard', {read:ViewContainerRef}) customCard: ViewContainerRef; + @ViewChild('customCard', {read: ViewContainerRef}) customCard: ViewContainerRef; @Input() endpoint: EndpointModel; - _layout: HomePageCardLayout; + pLayout: HomePageCardLayout; get layout(): HomePageCardLayout { - return this._layout; + return this.pLayout; } @Input() set layout(value: HomePageCardLayout) { if (value) { - this._layout = value; + this.pLayout = value; } this.updateLayout(); - }; + } @Output() loaded = new EventEmitter(); @@ -102,7 +102,7 @@ export class HomePageEndpointCardComponent implements OnInit, OnDestroy, AfterVi ngAfterViewInit() { // Dynamically load the component for the Home Card for this endopoint - const endpointEntity = entityCatalog.getEndpoint(this.endpoint.cnsi_type, this.endpoint.sub_type) + const endpointEntity = entityCatalog.getEndpoint(this.endpoint.cnsi_type, this.endpoint.sub_type); if (endpointEntity && endpointEntity.definition.homeCard && endpointEntity.definition.homeCard.component) { this.createCard(endpointEntity); } else { @@ -116,7 +116,7 @@ export class HomePageEndpointCardComponent implements OnInit, OnDestroy, AfterVi map(f => f.map(item => this.userFavoriteManager.mapToHydrated(item))) ); - this.entity = entityCatalog.getEndpoint(this.endpoint.cnsi_type, this.endpoint.sub_type) + this.entity = entityCatalog.getEndpoint(this.endpoint.cnsi_type, this.endpoint.sub_type); if (this.entity) { this.definition = this.entity.definition; this.favorite = this.favoritesConfigMapper.getFavoriteEndpointFromEntity(this.endpoint); @@ -187,7 +187,7 @@ export class HomePageEndpointCardComponent implements OnInit, OnDestroy, AfterVi public updateLayout() { this.layout$.next(this.layout); if (this.ref && this.ref.instance) { - this.ref.instance.layout = this._layout; + this.ref.instance.layout = this.pLayout; } } @@ -196,7 +196,7 @@ export class HomePageEndpointCardComponent implements OnInit, OnDestroy, AfterVi const component = await endpointEntity.definition.homeCard.component(this.compiler, this.injector); this.ref = this.customCard.createComponent(component); this.ref.instance.endpoint = this.endpoint; - this.ref.instance.layout = this._layout; + this.ref.instance.layout = this.pLayout; this.loadCardIfReady(); } diff --git a/src/frontend/packages/core/src/features/home/home/home-page.component.ts b/src/frontend/packages/core/src/features/home/home/home-page.component.ts index 8b44305217..8c9bf1a21e 100644 --- a/src/frontend/packages/core/src/features/home/home/home-page.component.ts +++ b/src/frontend/packages/core/src/features/home/home/home-page.component.ts @@ -123,7 +123,7 @@ export class HomePageComponent implements AfterViewInit, OnInit, OnDestroy { ).subscribe(id => { const selected = this.layouts.find(hpcl => hpcl && hpcl.id === id) || this.layouts[0]; this.onChangeLayout(selected); - }) + }); } ngOnInit() { @@ -152,10 +152,10 @@ export class HomePageComponent implements AfterViewInit, OnInit, OnDestroy { } else { remaining.push(index); } - }; + } this.processCardsToLoad(); this.notLoadedCardIndices = remaining; - }) + }); } processCardsToLoad() { @@ -184,7 +184,7 @@ export class HomePageComponent implements AfterViewInit, OnInit, OnDestroy { setCardsToLoad(cards: any[]) { this.notLoadedCardIndices = []; - for(let i=0;i< cards.length; i++) { + for (let i = 0; i < cards.length; i++) { this.notLoadedCardIndices.push(i); } setTimeout(() => this.checkCardsInView(), 1); @@ -263,7 +263,7 @@ export class HomePageComponent implements AfterViewInit, OnInit, OnDestroy { processed[ep.guid] = true; result.push(ep); } - }) + }); // Filter out the disconnected ones return result.filter(ep => ep.connectionStatus === 'connected'); @@ -277,7 +277,7 @@ export class HomePageComponent implements AfterViewInit, OnInit, OnDestroy { return !!defn.definition.homeCard; })), map(eps => { - switch(eps.length) { + switch (eps.length) { case 1: return this.getLayout(1, 1); case 2: diff --git a/src/frontend/packages/kubernetes/src/kubernetes/home/kubernetes-home-card.component.ts b/src/frontend/packages/kubernetes/src/kubernetes/home/kubernetes-home-card.component.ts index 1d4926219c..2279a142cb 100644 --- a/src/frontend/packages/kubernetes/src/kubernetes/home/kubernetes-home-card.component.ts +++ b/src/frontend/packages/kubernetes/src/kubernetes/home/kubernetes-home-card.component.ts @@ -17,17 +17,17 @@ export class KubernetesHomeCardComponent implements OnInit { @Input() endpoint: EndpointModel; - _layout: HomePageCardLayout; + pLayout: HomePageCardLayout; get layout(): HomePageCardLayout { - return this._layout; + return this.pLayout; } @Input() set layout(value: HomePageCardLayout) { if (value) { - this._layout = value; + this.pLayout = value; } - }; + } public shortcuts: HomeCardShortcut[]; diff --git a/src/frontend/packages/store/src/user-favorite-manager.ts b/src/frontend/packages/store/src/user-favorite-manager.ts index 030ff5dc5b..201937a283 100644 --- a/src/frontend/packages/store/src/user-favorite-manager.ts +++ b/src/frontend/packages/store/src/user-favorite-manager.ts @@ -142,10 +142,10 @@ export class UserFavoriteManager { if (f.endpointId === endpointID && f.entityId) { result.push(f); } - }) + }); return result; }) - ) + ); } public getEndpointIDFromFavoriteID(id: string): string {