Skip to content

Commit

Permalink
Reverted the app wall and removed console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
KlapTrap committed Oct 9, 2019
1 parent 799cff7 commit 2ede57e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,6 @@ function generateCfApplicationEntity(endpointDefinition: StratosEndpointExtensio
getLink: metadata => `/applications/${metadata.cfGuid}/${metadata.guid}/summary`,
getGuid: metadata => metadata.guid,
getLines: () => ([
['Name', (meta) => meta.name],
['Creation Date', (meta) => meta.createdAt]
])
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- <app-page-header [endpointIds$]="cfIds$">
<app-page-header [endpointIds$]="cfIds$">
<h1>Applications</h1>
<div *ngIf="haveConnectedCf$ | async" class="page-header-right">
<ng-container *appUserPermission="canCreateApplication">
Expand Down Expand Up @@ -26,9 +26,8 @@ <h1>Applications</h1>
<app-no-content-message [icon]="'apps'" [firstLine]="'There are too many applications to show'" [secondLine]="{
text: 'Please use the the Cloud Foundry, Organization or Space filters'
}"></app-no-content-message>
</ng-template> -->
<app-simple-list [catalogueEntity]="applicationCatalogueEntity"></app-simple-list>
<!-- <app-list class="app-wall" [noEntries]="noEntries" [noEntriesForCurrentFilter]="noEntriesForCurrentFilter"
</ng-template>
<app-list class="app-wall" [noEntries]="noEntries" [noEntriesForCurrentFilter]="noEntriesForCurrentFilter"
[noEntriesMaxedResults]="noEntriesMaxedResults"
*ngIf="!!(cloudFoundryService.hasRegisteredCFEndpoints$ | async) && !!(cloudFoundryService.hasConnectedCFEndpoints$ | async)">
</app-list> -->
</app-list>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { CfAppConfigService } from '../../../shared/components/list/list-types/a
import { CfAppsDataSource } from '../../../shared/components/list/list-types/app/cf-apps-data-source';
import { CfOrgSpaceDataService, initCfOrgSpaceService } from '../../../shared/data-services/cf-org-space-service.service';
import { CloudFoundryService } from '../../../shared/data-services/cloud-foundry.service';
import { entityCatalogue } from '../../../../../core/src/core/entity-catalogue/entity-catalogue.service';
import { CF_ENDPOINT_TYPE } from '../../../../cf-types';

@Component({
selector: 'app-application-wall',
Expand All @@ -31,43 +29,42 @@ import { CF_ENDPOINT_TYPE } from '../../../../cf-types';
]
)
],
// providers: [{
// provide: ListConfig,
// useClass: CfAppConfigService
// },
// CfOrgSpaceDataService
// ]
providers: [{
provide: ListConfig,
useClass: CfAppConfigService
},
CfOrgSpaceDataService
]
})
export class ApplicationWallComponent {
public applicationCatalogueEntity = entityCatalogue.getEntity(CF_ENDPOINT_TYPE, applicationEntityType);
// public cfIds$: Observable<string[]>;
// private initCfOrgSpaceService: Subscription;
export class ApplicationWallComponent implements OnDestroy {
public cfIds$: Observable<string[]>;
private initCfOrgSpaceService: Subscription;

// public canCreateApplication: string;
public canCreateApplication: string;

// public haveConnectedCf$: Observable<boolean>;
public haveConnectedCf$: Observable<boolean>;

// constructor(
// public cloudFoundryService: CloudFoundryService,
// private store: Store<CFAppState>,
// private cfOrgSpaceService: CfOrgSpaceDataService,
// ) {
// this.cfIds$ = cloudFoundryService.cFEndpoints$.pipe(
// map(endpoints => endpoints.map(endpoint => endpoint.guid)),
// );
// this.canCreateApplication = CurrentUserPermissions.APPLICATION_CREATE;
constructor(
public cloudFoundryService: CloudFoundryService,
private store: Store<CFAppState>,
private cfOrgSpaceService: CfOrgSpaceDataService,
) {
this.cfIds$ = cloudFoundryService.cFEndpoints$.pipe(
map(endpoints => endpoints.map(endpoint => endpoint.guid)),
);
this.canCreateApplication = CurrentUserPermissions.APPLICATION_CREATE;

// this.haveConnectedCf$ = cloudFoundryService.connectedCFEndpoints$.pipe(
// map(endpoints => !!endpoints && endpoints.length > 0)
// );
this.haveConnectedCf$ = cloudFoundryService.connectedCFEndpoints$.pipe(
map(endpoints => !!endpoints && endpoints.length > 0)
);

// this.initCfOrgSpaceService = initCfOrgSpaceService(this.store,
// this.cfOrgSpaceService,
// applicationEntityType,
// CfAppsDataSource.paginationKey).subscribe();
// }
this.initCfOrgSpaceService = initCfOrgSpaceService(this.store,
this.cfOrgSpaceService,
applicationEntityType,
CfAppsDataSource.paginationKey).subscribe();
}

// ngOnDestroy(): void {
// this.initCfOrgSpaceService.unsubscribe();
// }
ngOnDestroy(): void {
this.initCfOrgSpaceService.unsubscribe();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ export class LocalListController<T = any> {
pageSize,
currentPage
);
console.log(data.entities);
this.pageSplitCache = data.entities;
return (data.entities[data.index] || []) as T[];
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ export class SimpleListComponent implements OnInit {
@Input()
private catalogueEntity: StratosCatalogueEntity;

@ViewChild(
ListHostDirective,
// TODO: Angular 8
// { static: true }
)
@ViewChild(ListHostDirective)
public listHost: ListHostDirective;

private listConfig: ListConfig<any>;
Expand Down

0 comments on commit 2ede57e

Please sign in to comment.