diff --git a/src/frontend/packages/cf-autoscaler/src/shared/list-types/app-autoscaler-metric-chart/app-autoscaler-metric-chart-card/app-autoscaler-metric-chart-card.component.ts b/src/frontend/packages/cf-autoscaler/src/shared/list-types/app-autoscaler-metric-chart/app-autoscaler-metric-chart-card/app-autoscaler-metric-chart-card.component.ts index 975c4b8828..a4523f0b39 100644 --- a/src/frontend/packages/cf-autoscaler/src/shared/list-types/app-autoscaler-metric-chart/app-autoscaler-metric-chart-card/app-autoscaler-metric-chart-card.component.ts +++ b/src/frontend/packages/cf-autoscaler/src/shared/list-types/app-autoscaler-metric-chart/app-autoscaler-metric-chart-card/app-autoscaler-metric-chart-card.component.ts @@ -62,6 +62,7 @@ export class AppAutoscalerMetricChartCardComponent extends CardCell) { + super.row = row; if (row) { if (row.entity.query && row.entity.query.params) { this.paramsMetricsStart = row.entity.query.params.start * 1000; diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-instance/table-cell-cf-cell/table-cell-cf-cell.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-instance/table-cell-cf-cell/table-cell-cf-cell.component.ts index c24a64267a..bea4bf0411 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-instance/table-cell-cf-cell/table-cell-cf-cell.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app-instance/table-cell-cf-cell/table-cell-cf-cell.component.ts @@ -24,6 +24,7 @@ export class TableCellCfCellComponent extends TableCellCustom i metricEntityService: EntityService>>; cfGuid: string; }) { + super.config = config; if (!config) { return; } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-cforgspace/table-cell-app-cforgspace.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-cforgspace/table-cell-app-cforgspace.component.ts index f5c2fdb4c9..f8a2013f6e 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-cforgspace/table-cell-app-cforgspace.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-cforgspace/table-cell-app-cforgspace.component.ts @@ -15,6 +15,7 @@ export class TableCellAppCfOrgSpaceComponent extends TableCellAppCfOrgSpaceBase @Input('row') set row(row: APIResource) { + super.row = row; if (row) { this.init(row.entity.cfGuid, (row.entity.space as APIResource).entity.organization_guid, row.entity.space_guid); } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-status/table-cell-app-status.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-status/table-cell-app-status.component.ts index f4f0757bdb..b38d0a6198 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-status/table-cell-app-status.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/table-cell-app-status/table-cell-app-status.component.ts @@ -18,6 +18,7 @@ export class TableCellAppStatusComponent extends TableCellCustom[]; @Input('row') set row(row: CfRoleChangeWithNames) { + super.row = row; const chipConfig = new AppChip(); chipConfig.key = row; chipConfig.value = row.spaceGuid ? `Space: ${row.spaceName}` : `Org: ${row.orgName}`; diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-feature-flags/table-cell-feature-flag-description/table-cell-feature-flag-description.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-feature-flags/table-cell-feature-flag-description/table-cell-feature-flag-description.component.ts index 324c695ac2..ff19cef07d 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-feature-flags/table-cell-feature-flag-description/table-cell-feature-flag-description.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-feature-flags/table-cell-feature-flag-description/table-cell-feature-flag-description.component.ts @@ -15,6 +15,7 @@ export class TableCellFeatureFlagDescriptionComponent extends TableCellCustom im @Input('config') set config(config: any) { + super.config = config; this.config$.next(config); } @Input('row') set row(route: APIResource) { + super.row = route; this.row$.next(route); } - constructor() { - super(); - } - ngOnInit(): void { this.boundApps$ = combineLatest([ this.config$.asObservable().pipe(first()), diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/cf-service-card/cf-service-card.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/cf-service-card/cf-service-card.component.ts index 13cda212f0..b8489e9fe1 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/cf-service-card/cf-service-card.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/cf-service-card/cf-service-card.component.ts @@ -41,6 +41,7 @@ export class CfServiceCardComponent extends CardCell> { @Input('row') set row(row: APIResource) { + super.row = row; if (row) { this.serviceEntity = row; this.extraInfo = null; diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-broker/table-cell-service-broker.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-broker/table-cell-service-broker.component.ts index 50758c9aec..dd4c33b7d3 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-broker/table-cell-service-broker.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-broker/table-cell-service-broker.component.ts @@ -29,7 +29,7 @@ export class TableCellServiceBrokerComponent extends @Input() set row(row: APIResource) { - this.pRow = row; + super.row = row; if (row && !this.spaceLink$) { this.broker$ = cfEntityCatalog.serviceBroker.store.getEntityService( this.row.entity.service_broker_guid, @@ -62,7 +62,7 @@ export class TableCellServiceBrokerComponent extends } } get row(): APIResource { - return this.pRow; + return super.row; } public spaceLink$: Observable<{ diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-cf-breadcrumbs/table-cell-service-cf-breadcrumbs.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-cf-breadcrumbs/table-cell-service-cf-breadcrumbs.component.ts index ec34e51905..382adf2209 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-cf-breadcrumbs/table-cell-service-cf-breadcrumbs.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-cf-breadcrumbs/table-cell-service-cf-breadcrumbs.component.ts @@ -18,6 +18,7 @@ export class TableCellServiceCfBreadcrumbsComponent extends TableCellCustom) { + super.row = pService; if (!pService || !!this.cfOrgSpace) { return; } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-provider/table-cell-service-provider.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-provider/table-cell-service-provider.component.ts index 2e7687d1d5..1bac38c746 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-provider/table-cell-service-provider.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-services/table-cell-service-provider/table-cell-service-provider.component.ts @@ -15,6 +15,7 @@ export class TableCellServiceProviderComponent extends TableCellCustom) { + super.row = pService; if (!!pService && !!pService.entity.extra && !this.extraInfo) { try { this.extraInfo = JSON.parse(pService.entity.extra); @@ -22,8 +23,4 @@ export class TableCellServiceProviderComponent extends TableCellCustom) { + super.row = pService; if (!!pService && !!pService.entity.extra && !this.extraInfo) { try { this.extraInfo = JSON.parse(pService.entity.extra); @@ -23,10 +24,6 @@ export class TableCellServiceReferencesComponent extends TableCellCustom[] = []; - private service; @Input() set row(pService: APIResource) { - this.service = pService; + super.row = pService; if (!pService) { return; } @@ -29,10 +28,7 @@ export class TableCellServiceTagsComponent extends TableCellCustom { - return this.service; + return super.row; } - constructor() { - super(); - } } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-apps-attached/table-cell-service-instance-apps-attached.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-apps-attached/table-cell-service-instance-apps-attached.component.ts index 15f4858caf..537c4df65e 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-apps-attached/table-cell-service-instance-apps-attached.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-apps-attached/table-cell-service-instance-apps-attached.component.ts @@ -29,11 +29,13 @@ export class TableCellServiceInstanceAppsAttachedComponent @Input('config') set config(config: any) { + super.config = config; this.config$.next(config); } @Input('row') set row(row: APIResource) { + super.row = row; this.row$.next(row); } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-tags/table-cell-service-instance-tags.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-tags/table-cell-service-instance-tags.component.ts index fe237bc1a9..0d2b945471 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-tags/table-cell-service-instance-tags.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-spaces-service-instances/table-cell-service-instance-tags/table-cell-service-instance-tags.component.ts @@ -21,6 +21,7 @@ export class TableCellServiceInstanceTagsComponent tags: AppChip[] = []; @Input('row') set row(row) { + super.row = row; if (row) { this.tags.length = 0; if (row.entity && row.entity.service_instance && row.entity.service_instance.entity.tags) { @@ -42,9 +43,4 @@ export class TableCellServiceInstanceTagsComponent } } } - - constructor() { - super(); - } - } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-permission-cell.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-permission-cell.ts index 4f79ca2521..5e58087316 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-permission-cell.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-users/cf-permission-cell.ts @@ -33,6 +33,7 @@ export abstract class CfPermissionCellDirective extends TableCellCustom) { + super.row = row; this.rowSubject.next(row); this.guid = row.metadata.guid; this.userEntity.next(row.entity); @@ -40,6 +41,7 @@ export abstract class CfPermissionCellDirective extends TableCellCustom) { - this.pServicePlan = servicePlan; + super.row = servicePlan; if (!servicePlan) { return; } @@ -25,6 +24,6 @@ export class TableCellAServicePlanPriceComponent extends TableCellCustom { - return this.pServicePlan; + return super.row; } } diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/service-instance-card/service-instance-card.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/service-instance-card/service-instance-card.component.ts index 595d744fe8..e2962a50c6 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/service-instance-card/service-instance-card.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/service-instance-card/service-instance-card.component.ts @@ -39,7 +39,7 @@ export class ServiceInstanceCardComponent extends CardCell) { - + super.row = row; if (row) { this.serviceInstanceEntity = row; const schema = cfEntityFactory(serviceInstancesEntityType); diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/user-provided-service-instance-card/user-provided-service-instance-card.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/user-provided-service-instance-card/user-provided-service-instance-card.component.ts index 0103bc36be..c4ce6577a2 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/user-provided-service-instance-card/user-provided-service-instance-card.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/services-wall/user-provided-service-instance-card/user-provided-service-instance-card.component.ts @@ -38,6 +38,7 @@ export class UserProvidedServiceInstanceCardComponent extends CardCell) { + super.row = row; if (row) { this.setup(row); } @@ -107,14 +108,14 @@ export class UserProvidedServiceInstanceCardComponent extends CardCell this.serviceActionHelperService.deleteServiceInstance( this.serviceInstanceEntity.metadata.guid, this.serviceInstanceEntity.entity.name, this.serviceInstanceEntity.entity.cfGuid, true - ) + ); private edit = () => this.serviceActionHelperService.startEditServiceBindingStepper( this.serviceInstanceEntity.metadata.guid, @@ -123,7 +124,7 @@ export class UserProvidedServiceInstanceCardComponent extends CardCell ({ breadcrumbs: 'services-wall' }); diff --git a/src/frontend/packages/cloud-foundry/src/shared/components/schema-form/schema-form.component.ts b/src/frontend/packages/cloud-foundry/src/shared/components/schema-form/schema-form.component.ts index ab7ea7ac55..947468106e 100644 --- a/src/frontend/packages/cloud-foundry/src/shared/components/schema-form/schema-form.component.ts +++ b/src/frontend/packages/cloud-foundry/src/shared/components/schema-form/schema-form.component.ts @@ -1,9 +1,9 @@ import { AfterContentInit, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; import { ErrorStateMatcher, ShowOnDirtyErrorStateMatcher } from '@angular/material/core'; +import { JsonPointer } from '@cfstratos/ajsf-core'; import { BehaviorSubject, Subscription } from 'rxjs'; import { delay } from 'rxjs/operators'; -import { JsonPointer } from '@cfstratos/ajsf-core'; import { safeStringToObj } from '../../../../../core/src/core/utils.service'; import { isValidJsonValidator } from '../../../../../core/src/shared/form-validators'; @@ -125,7 +125,7 @@ export class SchemaFormComponent implements OnInit, OnDestroy, AfterContentInit return obj; }, {}); return Object.keys(filterSchema).length > 0 ? filterSchema : null; - } + }; onFormChange(formData) { this.formData = formData; @@ -149,6 +149,6 @@ export class SchemaFormComponent implements OnInit, OnDestroy, AfterContentInit }, ''); return `${a} ${arrMessage} ${c.message}
`; }, ''); - } + }; } diff --git a/src/frontend/packages/core/src/features/metrics/metrics-endpoint-details/metrics-endpoint-details.component.ts b/src/frontend/packages/core/src/features/metrics/metrics-endpoint-details/metrics-endpoint-details.component.ts index 32afc58d33..ff0d463ace 100644 --- a/src/frontend/packages/core/src/features/metrics/metrics-endpoint-details/metrics-endpoint-details.component.ts +++ b/src/frontend/packages/core/src/features/metrics/metrics-endpoint-details/metrics-endpoint-details.component.ts @@ -84,6 +84,7 @@ export class MetricsEndpointDetailsComponent extends EndpointListDetailsComponen @Input() set row(data: EndpointModel) { + super.row = data; this.guid$.next(data.guid); } } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.ts index 8c7664c495..3ab0925f22 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/app-table-cell-default/app-table-cell-default.component.ts @@ -16,9 +16,9 @@ export class TableCellDefaultComponent extends TableCellCustom implements public cellDefinition: ICellDefinition; @Input('row') - get row() { return this.pRow; } + get row() { return super.row; } set row(row: T) { - this.pRow = row; + super.row = row; if (row) { this.setValue(row, this.schemaKey); this.setSyncLink(); diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-actions/table-cell-actions.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-actions/table-cell-actions.component.ts index b0251e700d..4bd44e875a 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-actions/table-cell-actions.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-actions/table-cell-actions.component.ts @@ -20,9 +20,9 @@ export class TableCellActionsComponent extends TableCellCustom implements rowState: Observable; @Input('row') - get row() { return this.pRow; } + get row() { return super.row; } set row(row: T) { - this.pRow = row; + super.row = row; if (row) { this.initialise(row); } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-boolean-indicator/table-cell-boolean-indicator.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-boolean-indicator/table-cell-boolean-indicator.component.ts index a03c8fe7a2..273004b6b0 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-boolean-indicator/table-cell-boolean-indicator.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-boolean-indicator/table-cell-boolean-indicator.component.ts @@ -17,18 +17,18 @@ export interface TableCellBooleanIndicatorComponentConfig { export class TableCellBooleanIndicatorComponent extends TableCellCustom> { @Input('row') - get row() { return this.pRow; } + get row() { return super.row; } set row(row: T) { - this.pRow = row; + super.row = row; if (this.config) { this.enabled = this.config.isEnabled(row); } } @Input('config') - get config() { return this.pConfig; } + get config() { return super.config; } set config(config: TableCellBooleanIndicatorComponentConfig) { - this.pConfig = config; + super.config = config; if (!config) { return; } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-edit/table-cell-edit.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-edit/table-cell-edit.component.ts index 728c033ca0..1c027a3f29 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-edit/table-cell-edit.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-edit/table-cell-edit.component.ts @@ -12,21 +12,20 @@ export class TableCellEditComponent extends TableCellCustom { @Input() get row(): T { - return this.pRow; + return super.row; } set row(row: T) { - this.pRow = row; + super.row = row; } @Input() set dataSource(dataSource: IListDataSource) { - this.pDataSource = dataSource; + super.dataSource = dataSource; } get dataSource(): IListDataSource { - return this.pDataSource; + return super.dataSource; } - @Input() subtle: boolean; diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-expander/table-cell-expander.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-expander/table-cell-expander.component.ts index 6902037096..ec313fae96 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-expander/table-cell-expander.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-expander/table-cell-expander.component.ts @@ -31,19 +31,25 @@ export class TableCellExpanderComponent extends TableCellCustom) { - this.pConfig = config; + super.config = config; this.updateRowId(); } + get config(): CellConfigFunction { + return super.config; + } @Input() set row(row: T) { - this.pRow = row; + super.row = row; this.updateRowId(); - } + get row(): T { + return super.row; + } + public rowId = TableRowExpandedService.allExpanderState; private updateRowId() { - if (this.pConfig) { - const config: TableCellExpanderConfig = this.pConfig(this.pRow); + if (this.config) { + const config: TableCellExpanderConfig = this.config(this.row); this.rowId = config.rowId; this.expanded = this.expandedService.expanded[this.rowId]; } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-favorite/table-cell-favorite.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-favorite/table-cell-favorite.component.ts index c4b5bdfbec..d82c0e3b76 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-favorite/table-cell-favorite.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-favorite/table-cell-favorite.component.ts @@ -25,13 +25,13 @@ export class TableCellFavoriteComponent extends @Input('config') set config(config: TableCellFavoriteComponentConfig) { - this.pConfig = config; + super.config = config; this.createUserFavorite(); } @Input('row') set row(row: T) { - this.pRow = row; + super.row = row; this.createUserFavorite(); } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-icon/table-cell-icon.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-icon/table-cell-icon.component.ts index 31792f009a..c2e4406c83 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-icon/table-cell-icon.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-icon/table-cell-icon.component.ts @@ -16,18 +16,18 @@ export class TableCellIconComponent extends TableCellCustom) { - this.pConfig = config; + super.config = config; if (!config) { return; } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-radio/table-cell-radio.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-radio/table-cell-radio.component.ts index 96bcc53cde..724ecae95f 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-radio/table-cell-radio.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-radio/table-cell-radio.component.ts @@ -10,11 +10,10 @@ import { TableCellCustom } from '../../list.types'; export class TableCellRadioComponent extends TableCellCustom implements OnInit { disable: boolean; - private r: T; @Input('row') - get row() { return this.r; } + get row() { return super.row; } set row(row: T) { - this.r = row; + super.row = row; if (row) { this.updateDisabled(); } diff --git a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-side-panel/table-cell-side-panel.component.ts b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-side-panel/table-cell-side-panel.component.ts index 9df2fc43b3..dcf6d6ea2a 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-side-panel/table-cell-side-panel.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-table/table-cell-side-panel/table-cell-side-panel.component.ts @@ -20,16 +20,16 @@ export class TableCellSidePanelComponent extends TableCellCust public actualConfig: TableCellSidePanelConfig; @Input('row') - get row(): T { return this.pRow; } + get row(): T { return super.row; } set row(row: T) { - this.pRow = row; + super.row = row; this.updateConfig(); } @Input('config') - get config() { return this.pConfig; } + get config() { return super.config; } set config(config: object | CellConfigFunction) { - this.pConfig = config; + super.config = config; this.updateConfig(); } diff --git a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts index 0ddf1499ca..c9df05430d 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/endpoint-card/endpoint-card.component.ts @@ -68,10 +68,10 @@ export class EndpointCardComponent extends CardCell implements On @Input('row') set row(row: EndpointModel) { + super.row = row; if (!row) { return; } - this.pRow = row; this.endpointCatalogEntity = entityCatalog.getEndpoint(row.cnsi_type, row.sub_type); this.address = getFullEndpointApiUrl(row); @@ -85,12 +85,12 @@ export class EndpointCardComponent extends CardCell implements On } get row(): EndpointModel { - return this.pRow; + return super.row; } @Input('dataSource') set dataSource(ds: BaseEndpointsDataSource) { - this.pDataSource = ds; + super.dataSource = ds; // Don't show card menu if the ds only provides a single endpoint type (for instance the cf endpoint page) if (ds && !ds.dsEndpointType && !this.cardMenu) { @@ -98,7 +98,7 @@ export class EndpointCardComponent extends CardCell implements On const separator = endpointAction.label === '-'; return { label: endpointAction.label, - action: () => endpointAction.action(this.pRow), + action: () => endpointAction.action(this.row), can: endpointAction.createVisible ? endpointAction.createVisible(this.rowObs) : null, separator }; @@ -142,7 +142,7 @@ export class EndpointCardComponent extends CardCell implements On } updateInnerComponent() { - if (!this.endpointDetails || !this.pRow) { + if (!this.endpointDetails || !this.row) { return; } const e = this.endpointCatalogEntity.definition; @@ -158,10 +158,10 @@ export class EndpointCardComponent extends CardCell implements On } if (this.component) { - this.component.row = this.pRow; + this.component.row = this.row; this.component.isTable = false; } - this.component.row = this.pRow; + this.component.row = this.row; this.componentRef.changeDetectorRef.detectChanges(); diff --git a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-address/table-cell-endpoint-address.component.ts b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-address/table-cell-endpoint-address.component.ts index 0eb0e7d08b..e7274cc597 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-address/table-cell-endpoint-address.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-address/table-cell-endpoint-address.component.ts @@ -18,6 +18,7 @@ export class TableCellEndpointAddressComponent extends TableCellCustom; - constructor() { - super(); - } - @Input() set config(element) { + super.config = element; if (!this.state) { this.state = element(this.row); } diff --git a/src/frontend/packages/kubernetes/src/kubernetes/kube-config-registration/kube-config-selection/kube-config-table-cert/kube-config-table-cert.component.ts b/src/frontend/packages/kubernetes/src/kubernetes/kube-config-registration/kube-config-selection/kube-config-table-cert/kube-config-table-cert.component.ts index 4546593e93..cdec913c1f 100644 --- a/src/frontend/packages/kubernetes/src/kubernetes/kube-config-registration/kube-config-selection/kube-config-table-cert/kube-config-table-cert.component.ts +++ b/src/frontend/packages/kubernetes/src/kubernetes/kube-config-registration/kube-config-selection/kube-config-table-cert/kube-config-table-cert.component.ts @@ -25,11 +25,13 @@ export class KubeConfigTableCertComponent extends TableCellCustom(null); initialValue$ = this.initialValue.asObservable(); + initialized = false; @Input() set row(row: KubeConfigFileCluster) { - if (!this.pRow) { - this.pRow = row; + super.row = row; + if (!this.initialized) { + this.initialized = true; if (row.cluster['insecure-skip-tls-verify']) { // User has manually specified default skip option this.initialValue.next({ @@ -49,7 +51,7 @@ export class KubeConfigTableCertComponent extends TableCellCustom { } }; - public readyBoolConfig: TableCellBooleanIndicatorComponentConfig = { - isEnabled: (row: ContainerForTable) => row.containerStatus.ready, - type: BooleanIndicatorType.yesNo, - subtle: false, - showText: false - }; - @Input() set row(row: KubernetesPod) { + super.row = row; if (!row || !!this.containers$) { return; } @@ -63,6 +51,9 @@ export class KubernetesPodContainersComponent extends CardCell { map(pod => this.map(pod)), ); } + get row(): KubernetesPod { + return super.row; + } constructor( private titleCase: TitleCasePipe, diff --git a/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.ts b/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.ts index cf28e15895..dc67ac2d6a 100644 --- a/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.ts +++ b/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-pods/kubernetes-pod-status/kubernetes-pod-status.component.ts @@ -14,13 +14,13 @@ export class KubernetesPodStatusComponent extends TableCellCustom public style = 'border-success'; @Input('row') - get row(): KubernetesPod { return this.pRow; } set row(row: KubernetesPod) { - this.pRow = row; + super.row = row; if (row) { this.updateStatus(); } } + get row(): KubernetesPod { return super.row; } private updateStatus() { const status = this.convertStatus(this.row.expandedStatus.status); diff --git a/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-service-ports/kubernetes-service-ports.component.ts b/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-service-ports/kubernetes-service-ports.component.ts index 28fb423a28..2ac19fc0e5 100644 --- a/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-service-ports/kubernetes-service-ports.component.ts +++ b/src/frontend/packages/kubernetes/src/kubernetes/list-types/kubernetes-service-ports/kubernetes-service-ports.component.ts @@ -9,12 +9,11 @@ import { KubeService } from '../../store/kube.types'; styleUrls: ['./kubernetes-service-ports.component.scss'] }) export class KubernetesServicePortsComponent extends CardCell { - @Input() get row(): KubeService { - return this.pRow; + return super.row; } set row(row: KubeService) { - this.pRow = row; + super.row = row; } } diff --git a/src/frontend/packages/kubernetes/src/kubernetes/workloads/list-types/helm-release-card/helm-release-card.component.ts b/src/frontend/packages/kubernetes/src/kubernetes/workloads/list-types/helm-release-card/helm-release-card.component.ts index aee8bd7f60..319621b7d6 100644 --- a/src/frontend/packages/kubernetes/src/kubernetes/workloads/list-types/helm-release-card/helm-release-card.component.ts +++ b/src/frontend/packages/kubernetes/src/kubernetes/workloads/list-types/helm-release-card/helm-release-card.component.ts @@ -17,7 +17,7 @@ export class HelmReleaseCardComponent extends CardCell { @Input('row') set row(row: HelmRelease) { - this.pRow = row; + super.row = row; if (row) { this.status = row.status.charAt(0).toUpperCase() + row.status.substring(1); this.lastDeployed = this.datePipe.transform(row.info.last_deployed, 'medium'); @@ -31,7 +31,7 @@ export class HelmReleaseCardComponent extends CardCell { } } get row(): HelmRelease { - return this.pRow; + return super.row; }