diff --git a/custom-src/frontend/app/custom/helm/list-types/monocular-repository-list-config.service.ts b/custom-src/frontend/app/custom/helm/list-types/monocular-repository-list-config.service.ts index 36fd3297e1..b3d343ef8c 100644 --- a/custom-src/frontend/app/custom/helm/list-types/monocular-repository-list-config.service.ts +++ b/custom-src/frontend/app/custom/helm/list-types/monocular-repository-list-config.service.ts @@ -1,14 +1,27 @@ +import { HttpClient } from '@angular/common/http'; import { Injectable, NgZone } from '@angular/core'; +import { MatSnackBar } from '@angular/material'; import { ActivatedRoute } from '@angular/router'; import { Store } from '@ngrx/store'; +import { UnregisterEndpoint } from 'frontend/packages/store/src/actions/endpoint.actions'; +import { entityCatalog } from 'frontend/packages/store/src/entity-catalog/entity-catalog.service'; +import { endpointSchemaKey } from 'frontend/packages/store/src/helpers/entity-factory'; +import { selectDeletionInfo } from 'frontend/packages/store/src/selectors/api.selectors'; import { of as observableOf } from 'rxjs'; +import { pairwise } from 'rxjs/operators'; import { AppState } from '../../../../../store/src/app-state'; import { EntityMonitorFactory } from '../../../../../store/src/monitors/entity-monitor.factory.service'; import { InternalEventMonitorFactory } from '../../../../../store/src/monitors/internal-event-monitor.factory'; import { PaginationMonitorFactory } from '../../../../../store/src/monitors/pagination-monitor.factory'; import { EndpointModel } from '../../../../../store/src/types/endpoint.types'; +import { STRATOS_ENDPOINT_TYPE } from '../../../base-entity-schemas'; +import { CurrentUserPermissions } from '../../../core/current-user-permissions.config'; +import { CurrentUserPermissionsService } from '../../../core/current-user-permissions.service'; +import { environment } from '../../../environments/environment'; import { getFullEndpointApiUrl } from '../../../features/endpoints/endpoint-helpers'; +import { ConfirmationDialogConfig } from '../../../shared/components/confirmation-dialog.config'; +import { ConfirmationDialogService } from '../../../shared/components/confirmation-dialog.service'; import { ITableColumn } from '../../../shared/components/list/list-table/table.types'; import { EndpointCardComponent, @@ -16,23 +29,9 @@ import { import { TableCellEndpointStatusComponent, } from '../../../shared/components/list/list-types/endpoint/table-cell-endpoint-status/table-cell-endpoint-status.component'; -import { IListConfig, ListViewTypes, IListAction } from '../../../shared/components/list/list.component.types'; +import { IListAction, IListConfig, ListViewTypes } from '../../../shared/components/list/list.component.types'; import { defaultHelmKubeListPageSize } from '../../kubernetes/list-types/kube-helm-list-types'; import { MonocularRepositoryDataSource } from './monocular-repository-list-source'; -import { HttpClient } from '@angular/common/http'; -import { environment } from '../../../environments/environment'; -import { map, pairwise } from 'rxjs/operators'; -import { MatSnackBar } from '@angular/material'; -import { SendClearEventAction } from 'frontend/packages/store/src/actions/internal-events.actions'; -import { DisconnectEndpoint, UnregisterEndpoint } from 'frontend/packages/store/src/actions/endpoint.actions'; -import { entityCatalog } from 'frontend/packages/store/src/entity-catalog/entity-catalog.service'; -import { selectDeletionInfo } from 'frontend/packages/store/src/selectors/api.selectors'; -import { STRATOS_ENDPOINT_TYPE } from '../../../base-entity-schemas'; -import { endpointSchemaKey } from 'frontend/packages/store/src/helpers/entity-factory'; -import { ConfirmationDialogService } from '../../../shared/components/confirmation-dialog.service'; -import { ConfirmationDialogConfig } from '../../../shared/components/confirmation-dialog.config'; -import { CurrentUserPermissionsService } from '../../../core/current-user-permissions.service'; -import { CurrentUserPermissions } from '../../../core/current-user-permissions.config'; @Injectable() export class MonocularRepositoryListConfig implements IListConfig { @@ -47,7 +46,6 @@ export class MonocularRepositoryListConfig implements IListConfig }; pageSizeOptions = defaultHelmKubeListPageSize; enableTextFilter = true; - tableFixedRowHeight = true; columns: ITableColumn[] = [ { columnId: 'name', diff --git a/custom-src/frontend/app/custom/kubernetes/kubernetes.module.ts b/custom-src/frontend/app/custom/kubernetes/kubernetes.module.ts index ec6bb0c9c0..ed05e9af79 100644 --- a/custom-src/frontend/app/custom/kubernetes/kubernetes.module.ts +++ b/custom-src/frontend/app/custom/kubernetes/kubernetes.module.ts @@ -5,6 +5,9 @@ import { NgxChartsModule } from '@swimlane/ngx-charts'; import { CoreModule } from '../../core/core.module'; import { SharedModule } from '../../shared/shared.module'; +import { + KubedashConfigurationComponent, +} from './kubernetes-dashboard/kubedash-configuration/kubedash-configuration.component'; import { KubernetesDashboardTabComponent } from './kubernetes-dashboard/kubernetes-dashboard.component'; import { KubernetesNamespacePodsComponent, @@ -70,6 +73,9 @@ import { KubernetesNodeTagsCardComponent, } from './list-types/kubernetes-nodes/kubernetes-node-summary/kubernetes-node-tags-card/kubernetes-node-tags-card.component'; import { NodePodCountComponent } from './list-types/kubernetes-nodes/node-pod-count/node-pod-count.component'; +import { + KubernetesPodContainersComponent, +} from './list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component'; import { KubernetesPodStatusComponent, } from './list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component'; @@ -86,7 +92,6 @@ import { KubernetesNamespacesTabComponent } from './tabs/kubernetes-namespaces-t import { KubernetesNodesTabComponent } from './tabs/kubernetes-nodes-tab/kubernetes-nodes-tab.component'; import { KubernetesPodsTabComponent } from './tabs/kubernetes-pods-tab/kubernetes-pods-tab.component'; import { KubernetesSummaryTabComponent } from './tabs/kubernetes-summary-tab/kubernetes-summary.component'; -import { KubedashConfigurationComponent } from './kubernetes-dashboard/kubedash-configuration/kubedash-configuration.component'; /* tslint:enable */ @@ -141,6 +146,7 @@ import { KubedashConfigurationComponent } from './kubernetes-dashboard/kubedash- KubernetesResourceViewerComponent, KubeServiceCardComponent, KubedashConfigurationComponent, + KubernetesPodContainersComponent ], providers: [ KubernetesService, @@ -163,7 +169,8 @@ import { KubedashConfigurationComponent } from './kubernetes-dashboard/kubedash- KubernetesServicePortsComponent, KubernetesPodStatusComponent, KubeServiceCardComponent, - KubernetesResourceViewerComponent + KubernetesResourceViewerComponent, + KubernetesPodContainersComponent ], exports: [ KubernetesResourceViewerComponent diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-endpoints/kubernetes-endpoints-list-config.service.ts b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-endpoints/kubernetes-endpoints-list-config.service.ts index 13762f529b..39e461d5b5 100644 --- a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-endpoints/kubernetes-endpoints-list-config.service.ts +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-endpoints/kubernetes-endpoints-list-config.service.ts @@ -30,7 +30,6 @@ export class KubernetesEndpointsListConfigService implements IListConfig { let component: KubernetesNodeConditionCardComponent; let fixture: ComponentFixture; diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.html b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.html new file mode 100644 index 0000000000..3eab146d85 --- /dev/null +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.html @@ -0,0 +1,4 @@ +
+ + +
\ No newline at end of file diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.scss b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.scss new file mode 100644 index 0000000000..e6fc2cb39b --- /dev/null +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.scss @@ -0,0 +1,8 @@ +.pod-containers { + display: flex; + app-table { + flex: 1; + padding-bottom: 10px; + padding-left: 57px; + } +} diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.spec.ts b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.spec.ts new file mode 100644 index 0000000000..ff465a15c8 --- /dev/null +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.spec.ts @@ -0,0 +1,36 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { KubernetesBaseTestModules } from '../../../kubernetes.testing.module'; +import { KubernetesPod } from '../../../store/kube.types'; +import { KubernetesPodContainersComponent } from './kubernetes-pod-containers.component'; + +describe('KubernetesPodContainersComponent', () => { + let component: KubernetesPodContainersComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [KubernetesPodContainersComponent], + imports: KubernetesBaseTestModules + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(KubernetesPodContainersComponent); + component = fixture.componentInstance; + component.row = { + metadata: { + uid: '' + }, + status: { + + } + } as KubernetesPod; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.ts b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.ts new file mode 100644 index 0000000000..ecc31b5654 --- /dev/null +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-containers/kubernetes-pod-containers.component.ts @@ -0,0 +1,194 @@ +import { TitleCasePipe } from '@angular/common'; +import { Component, Input } from '@angular/core'; +import { Store } from '@ngrx/store'; +import * as moment from 'moment'; +import { of } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; + +import { AppState } from '../../../../../../../store/src/app-state'; +import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; +import { selectEntity } from '../../../../../../../store/src/selectors/api.selectors'; +import { BooleanIndicatorType } from '../../../../../shared/components/boolean-indicator/boolean-indicator.component'; +import { ITableListDataSource } from '../../../../../shared/components/list/data-sources-controllers/list-data-source-types'; +import { + TableCellBooleanIndicatorComponent, + TableCellBooleanIndicatorComponentConfig, +} from '../../../../../shared/components/list/list-table/table-cell-boolean-indicator/table-cell-boolean-indicator.component'; +import { + TableCellIconComponent, + TableCellIconComponentConfig, +} from '../../../../../shared/components/list/list-table/table-cell-icon/table-cell-icon.component'; +import { ITableColumn } from '../../../../../shared/components/list/list-table/table.types'; +import { CardCell } from '../../../../../shared/components/list/list.types'; +import { KUBERNETES_ENDPOINT_TYPE, kubernetesPodsEntityType } from '../../../kubernetes-entity-factory'; +import { Container, ContainerState, ContainerStatus, InitContainer, KubernetesPod } from '../../../store/kube.types'; + +export interface ContainerForTable { + isInit: boolean; + container: Container | InitContainer; + containerStatus: ContainerStatus; +} + +@Component({ + selector: 'app-kubernetes-pod-containers', + templateUrl: './kubernetes-pod-containers.component.html', + styleUrls: ['./kubernetes-pod-containers.component.scss'], + providers: [ + TitleCasePipe + ] +}) +export class KubernetesPodContainersComponent extends CardCell { + + private entityConfig = entityCatalog.getEntity(KUBERNETES_ENDPOINT_TYPE, kubernetesPodsEntityType); + + @Input() + set row(row: KubernetesPod) { + if (!row || !!this.containerDataSource) { + return; + } + this.containerDataSource = { + isTableLoading$: of(false), + connect: () => this.store.select(selectEntity(this.entityConfig.entityKey, row.metadata.uid)).pipe( + filter(pod => !!pod), + map(pod => this.map(pod)), + ), + disconnect: () => { }, + trackBy: (index, container: ContainerForTable) => container.container.name, + }; + } + + constructor( + private store: Store, + private titleCase: TitleCasePipe, + ) { + super(); + } + + private readyBoolConfig: TableCellBooleanIndicatorComponentConfig = { + isEnabled: (row: ContainerForTable) => row.containerStatus.ready, + type: BooleanIndicatorType.yesNo, + subtle: false, + showText: false + }; + + private iconConfig: TableCellIconComponentConfig = { + getIcon: (row: ContainerForTable) => row.isInit ? + { + icon: 'border_clear', + font: '', + tooltip: 'Init Container' + } : { + icon: 'border_outer', + font: '', + tooltip: 'Container' + }, + }; + + public containerDataSource: ITableListDataSource; + public columns: ITableColumn[] = [ + { + columnId: 'icon', + headerCell: () => '', + cellComponent: TableCellIconComponent, + cellConfig: this.iconConfig, + cellFlex: '0 0 53px', + }, + { + columnId: 'name', + headerCell: () => 'Container Name', + cellDefinition: { + valuePath: 'container.name' + }, + cellFlex: '2', + }, + { + columnId: 'image', + headerCell: () => 'Image', + cellDefinition: { + valuePath: 'container.image' + }, + cellFlex: '3', + }, + { + columnId: 'ready', + headerCell: () => 'Ready', + cellComponent: TableCellBooleanIndicatorComponent, + cellConfig: this.readyBoolConfig, + cellFlex: '1', + }, + { + columnId: 'status', + headerCell: () => 'State', + cellDefinition: { + getValue: cft => { + if (!cft.containerStatus.state) { + return 'Unknown'; + } + const entries = Object.entries(cft.containerStatus.state); + if (!entries.length) { + return 'Unknown'; + } + const sorted = entries.sort((a, b) => { + const aStarted = moment(a[1].startedAt); + const bStarted = moment(b[1].startedAt); + + return aStarted.isBefore(bStarted) ? -1 : + aStarted.isAfter(bStarted) ? 1 : 0; + + }); + return this.containerStatusToString(sorted[0][0], sorted[0][1]); + } + }, + cellFlex: '2' + }, + { + columnId: 'restarts', + headerCell: () => 'Restarts', + cellDefinition: { + getValue: cft => cft.containerStatus.restartCount.toString() + }, + cellFlex: '1', + }, + { + columnId: 'probes', + headerCell: () => 'Probes (L:R)', + cellDefinition: { + getValue: cft => { + if (cft.isInit) { + return ''; + } + const container: Container = cft.container as Container; + return cft.isInit ? '' : `${container.livenessProbe ? 'on' : 'off'}:${container.readinessProbe ? 'on' : 'off'}`; + } + }, + cellFlex: '1', + }, + ]; + + private map(row: KubernetesPod): ContainerForTable[] { + const containerStatus = row.status.containerStatuses || []; + const initContainerStatuses = row.status.initContainerStatuses || []; + const containerStatusWithContainers: ContainerForTable[] = [ + ...containerStatus.map(c => this.createContainerForTable(c, row.spec.containers)), + ...initContainerStatuses.map(c => this.createContainerForTable(c, row.spec.initContainers, true)) + ]; + return containerStatusWithContainers.sort((a, b) => a.container.name.localeCompare(b.container.name)); + } + + private createContainerForTable(containerStatus: ContainerStatus, containers: (Container | InitContainer)[], isInit = false): + ContainerForTable { + const containerForTable: ContainerForTable = { + isInit, + containerStatus, + container: containers.find(c => c.name === containerStatus.name) + }; + return containerForTable; + } + + private containerStatusToString(state: string, status: ContainerState): string { + const exitCode = status.exitCode ? `:${status.exitCode}` : ''; + const signal = status.signal ? `:${status.signal}` : ''; + const reason = status.reason ? ` (${status.reason}${exitCode || signal})` : ''; + return `${this.titleCase.transform(state)}${reason}`; + } +} diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.spec.ts b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.spec.ts index 2ef6a3cbf0..3b4aa18faa 100644 --- a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.spec.ts +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.spec.ts @@ -9,7 +9,9 @@ describe('KubernetesPodStatusComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [KubernetesPodStatusComponent] + declarations: [ + KubernetesPodStatusComponent + ] }) .compileComponents(); })); diff --git a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pods-list-config.service.ts b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pods-list-config.service.ts index fbbc455874..0ad59ce8be 100644 --- a/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pods-list-config.service.ts +++ b/custom-src/frontend/app/custom/kubernetes/list-types/kubernetes-pods/kubernetes-pods-list-config.service.ts @@ -20,6 +20,7 @@ import { import { KubernetesPod } from '../../store/kube.types'; import { defaultHelmKubeListPageSize } from '../kube-helm-list-types'; import { createKubeAgeColumn } from '../kube-list.helper'; +import { KubernetesPodContainersComponent } from './kubernetes-pod-containers/kubernetes-pod-containers.component'; import { KubernetesPodStatusComponent } from './kubernetes-pod-status/kubernetes-pod-status.component'; import { KubernetesPodsDataSource } from './kubernetes-pods-data-source'; @@ -139,6 +140,7 @@ export abstract class BaseKubernetesPodsListConfigService implements IListConfig noEntries: 'There are no pods' }; abstract getDataSource: () => IListDataSource; + expandComponent = KubernetesPodContainersComponent; getGlobalActions = () => null; getMultiActions = () => []; diff --git a/custom-src/frontend/app/custom/kubernetes/store/kube.types.ts b/custom-src/frontend/app/custom/kubernetes/store/kube.types.ts index 88d9c4a781..b6b2721e86 100644 --- a/custom-src/frontend/app/custom/kubernetes/store/kube.types.ts +++ b/custom-src/frontend/app/custom/kubernetes/store/kube.types.ts @@ -248,8 +248,8 @@ export interface KubernetesCondition { export interface ContainerStatus { name: string; - state: State; - lastState: State; + state: ContainerStateCollection; + lastState: ContainerStateCollection; ready: boolean; restartCount: number; image: string; @@ -257,13 +257,15 @@ export interface ContainerStatus { containerID: string; } -export interface State { - [key: string]: { - startedAt: Date; - reason: string; - signal: number; - exitCode: number - }; +export interface ContainerStateCollection { + [key: string]: ContainerState; +} + +export interface ContainerState { + startedAt: Date; + reason: string; + signal: number; + exitCode: number; } export interface PodSpec { diff --git a/custom-src/frontend/app/custom/kubernetes/workloads/list-types/helm-releases-list-config.service.ts b/custom-src/frontend/app/custom/kubernetes/workloads/list-types/helm-releases-list-config.service.ts index c956a9dc24..9e2b68e4b8 100644 --- a/custom-src/frontend/app/custom/kubernetes/workloads/list-types/helm-releases-list-config.service.ts +++ b/custom-src/frontend/app/custom/kubernetes/workloads/list-types/helm-releases-list-config.service.ts @@ -34,7 +34,6 @@ export class HelmReleasesListConfig implements IListConfig { }; pageSizeOptions = defaultHelmKubeListPageSize; enableTextFilter = true; - tableFixedRowHeight = true; cardComponent = HelmReleaseCardComponent; columns: ITableColumn[] = [ { diff --git a/src/frontend/packages/cloud-foundry/src/features/cloud-foundry/users/manage-users/manage-users-confirm/manage-users-confirm.component.ts b/src/frontend/packages/cloud-foundry/src/features/cloud-foundry/users/manage-users/manage-users-confirm/manage-users-confirm.component.ts index 3d5689592d..460e10539e 100644 --- a/src/frontend/packages/cloud-foundry/src/features/cloud-foundry/users/manage-users/manage-users-confirm/manage-users-confirm.component.ts +++ b/src/frontend/packages/cloud-foundry/src/features/cloud-foundry/users/manage-users/manage-users-confirm/manage-users-confirm.component.ts @@ -4,7 +4,6 @@ import { Store } from '@ngrx/store'; import { Observable, Subject } from 'rxjs'; import { distinctUntilChanged, filter, first, map, mergeMap, withLatestFrom } from 'rxjs/operators'; -import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; import { AppMonitorComponentTypes, } from '../../../../../../../core/src/shared/components/app-action-monitor-icon/app-action-monitor-icon.component'; @@ -12,17 +11,18 @@ import { ITableCellRequestMonitorIconConfig, } from '../../../../../../../core/src/shared/components/list/list-table/table-cell-request-monitor-icon/table-cell-request-monitor-icon.component'; import { ITableColumn } from '../../../../../../../core/src/shared/components/list/list-table/table.types'; +import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; import { selectUsersRoles, selectUsersRolesChangedRoles, } from '../../../../../../../store/src/selectors/users-roles.selector'; import { APIResource } from '../../../../../../../store/src/types/api.types'; -import { CF_ENDPOINT_TYPE } from '../../../../../cf-types'; import { UsersRolesClearUpdateState } from '../../../../../actions/users-roles.actions'; import { ChangeUserRole } from '../../../../../actions/users.actions'; import { CFAppState } from '../../../../../cf-app-state'; import { cfEntityFactory } from '../../../../../cf-entity-factory'; import { cfUserEntityType, organizationEntityType, spaceEntityType } from '../../../../../cf-entity-types'; +import { CF_ENDPOINT_TYPE } from '../../../../../cf-types'; import { TableCellConfirmOrgSpaceComponent, } from '../../../../../shared/components/list/list-types/cf-confirm-roles/table-cell-confirm-org-space/table-cell-confirm-org-space.component'; diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-list-config.service.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-list-config.service.ts index 1046d0b70a..03a78f107f 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-list-config.service.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-variables/cf-app-variables-list-config.service.ts @@ -3,7 +3,6 @@ import { Store } from '@ngrx/store'; import { of as observableOf, Subject } from 'rxjs'; import { filter, first, map, switchMap } from 'rxjs/operators'; -import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; import { ConfirmationDialogConfig } from '../../../../../../../core/src/shared/components/confirmation-dialog.config'; import { ConfirmationDialogService } from '../../../../../../../core/src/shared/components/confirmation-dialog.service'; import { @@ -16,10 +15,11 @@ import { IMultiListAction, ListViewTypes, } from '../../../../../../../core/src/shared/components/list/list.component.types'; -import { CF_ENDPOINT_TYPE } from '../../../../../cf-types'; +import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; import { UpdateExistingApplication } from '../../../../../actions/application.actions'; import { CFAppState } from '../../../../../cf-app-state'; import { appEnvVarsEntityType, applicationEntityType } from '../../../../../cf-entity-types'; +import { CF_ENDPOINT_TYPE } from '../../../../../cf-types'; import { ApplicationService } from '../../../../../features/applications/application.service'; import { CfAppVariablesDataSource, ListAppEnvVar } from './cf-app-variables-data-source'; import { TableCellEditVariableComponent } from './table-cell-edit-variable/table-cell-edit-variable.component'; @@ -84,6 +84,7 @@ export class CfAppVariablesListConfigService implements IListConfig noEntries: 'There are no endpoints' }; enableTextFilter = true; - tableFixedRowHeight = true; constructor( private store: Store, diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-user-list-config.service.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-user-list-config.service.ts index 8b6b70db1a..65b72b2282 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-user-list-config.service.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-user-list-config.service.ts @@ -10,7 +10,6 @@ import { CfUser } from '../../../../../../../cloud-foundry/src/store/types/user. import { IOrganization, ISpace } from '../../../../../../../core/src/core/cf-api.types'; import { CurrentUserPermissionsChecker } from '../../../../../../../core/src/core/current-user-permissions.checker'; import { CurrentUserPermissionsService } from '../../../../../../../core/src/core/current-user-permissions.service'; -import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; import { ITableColumn } from '../../../../../../../core/src/shared/components/list/list-table/table.types'; import { IListAction, @@ -20,6 +19,7 @@ import { ListViewTypes, } from '../../../../../../../core/src/shared/components/list/list.component.types'; import { SetClientFilter } from '../../../../../../../store/src/actions/pagination.actions'; +import { entityCatalog } from '../../../../../../../store/src/entity-catalog/entity-catalog.service'; import { selectPaginationState } from '../../../../../../../store/src/selectors/pagination.selectors'; import { APIResource, EntityInfo } from '../../../../../../../store/src/types/api.types'; import { PaginatedAction } from '../../../../../../../store/src/types/pagination.types'; diff --git a/src/frontend/packages/core/src/shared/components/app-action-monitor/app-action-monitor.component.ts b/src/frontend/packages/core/src/shared/components/app-action-monitor/app-action-monitor.component.ts index 06dc50a4fe..12f5a15fe0 100644 --- a/src/frontend/packages/core/src/shared/components/app-action-monitor/app-action-monitor.component.ts +++ b/src/frontend/packages/core/src/shared/components/app-action-monitor/app-action-monitor.component.ts @@ -77,7 +77,15 @@ export class AppActionMonitorComponent implements OnInit { this.dataSource = { connect: () => this.data$, disconnect: () => { }, - trackBy: this.getId ? (index, item) => this.getId(item) : this.trackBy, + trackBy: (index, item) => { + const fn = monitorColumn.cellConfig(item).getId; + if (fn) { + return fn(item); + } else if (this.getId) { + return this.getId(item); + } + return this.trackBy(index, item); + }, isTableLoading$: observableOf(false) } as ITableListDataSource; } diff --git a/src/frontend/packages/core/src/shared/components/list/data-sources-controllers/list-data-source-types.ts b/src/frontend/packages/core/src/shared/components/list/data-sources-controllers/list-data-source-types.ts index d9a9929d89..453ab5c46e 100644 --- a/src/frontend/packages/core/src/shared/components/list/data-sources-controllers/list-data-source-types.ts +++ b/src/frontend/packages/core/src/shared/components/list/data-sources-controllers/list-data-source-types.ts @@ -5,9 +5,9 @@ import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs'; import { ListFilter, ListSort } from '../../../../../../store/src/actions/list.actions'; import { MetricsAction } from '../../../../../../store/src/actions/metrics.actions'; import { IRequestEntityTypeState } from '../../../../../../store/src/app-state'; -import { PaginatedAction, PaginationEntityState, PaginationParam } from '../../../../../../store/src/types/pagination.types'; import { EntityCatalogEntityConfig } from '../../../../../../store/src/entity-catalog/entity-catalog.types'; import { EntitySchema } from '../../../../../../store/src/helpers/entity-schema'; +import { PaginatedAction, PaginationEntityState, PaginationParam } from '../../../../../../store/src/types/pagination.types'; export interface IEntitySelectItem { page: number; @@ -60,7 +60,6 @@ export class ListActionConfig { interface ICoreListDataSource extends DataSource { rowsState?: Observable; - getRowState?(row: T, schemaKey?: string): Observable; trackBy(index: number, item: T); } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.html b/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.html index 9bc259ff74..c66ecb63b2 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.html +++ b/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.html @@ -4,7 +4,7 @@