src/frontend/packages/cloud-foundry/src/entity-relations/entity-relations.ts
File entity-relations.ts
has 448 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Action, Store } from '@ngrx/store';
import { denormalize } from 'normalizr';
import { Observable, of as observableOf } from 'rxjs';
import { filter, first, map, mergeMap, pairwise, skipWhile, switchMap, withLatestFrom } from 'rxjs/operators';
Function populatePaginationFromParent
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function populatePaginationFromParent(store: Store<GeneralEntityAppState>, action: PaginatedAction): Observable<Action> {
const eicAction = isEntityInlineChildAction(action);
if (!eicAction || !action.flattenPagination) {
return observableOf(action);
}
Function validationLoop
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validationLoop(config: ValidateLoopConfig): ValidateEntityResult[] {
const { cfGuid, entities, parentRelation, allEntities, allPagination, newEntities, action } = config;
if (!entities) {
return [];
Function associateChildWithParent
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function associateChildWithParent(
store: Store<GeneralEntityAppState>,
action: EntityInlineChildAction,
apiResponse: APIResponse): Observable<boolean> {
let childValue;
Function handleValidationLoopResults
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleValidationLoopResults(
store: Store<GeneralEntityAppState>,
results: ValidateEntityResult[],
apiResponse: APIResponse,
action: EntityRequestAction
Function validateEntityRelations
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function validateEntityRelations(config: ValidateEntityRelationsConfig): ValidationResult {
const pAction = isPaginatedAction(config.action);
if (!!pAction && pAction.__forcedPageEntityConfig__) {
const entityConfig = pAction.__forcedPageEntityConfig__;