cloudfoundry/stratos

View on GitHub
src/frontend/packages/core/src/shared/components/list/list-types/endpoint/base-endpoints-data-source.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function constructor has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor(
    store: Store<AppState>,
    listConfig: IListConfig<EndpointModel>,
    action: GetAllEndpoints,
    dsEndpointType: string = null,

    Function getEndpointConfig has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

      static getEndpointConfig(
        store: Store<AppState>,
        action: GetAllEndpoints,
        listConfig: IListConfig<EndpointModel>,
        rowsState: Observable<RowsState>,

      Consider simplifying this complex logical expression.
      Wontfix

          if (dsEndpointType || onlyConnected) {
            transformEntities.push((entities: EndpointModel[]) => {
              return dsEndpointType || onlyConnected ? entities.filter(endpoint => {
                return (!onlyConnected || endpoint.connectionStatus === 'connected') &&
                  (!dsEndpointType || endpoint.cnsi_type === dsEndpointType);

        There are no issues that match your filters.

        Category
        Status