cloudfoundry/stratos

View on GitHub
src/frontend/packages/kubernetes/src/kubernetes/services/kubernetes-endpoint.service.ts

Summary

Maintainability
B
5 hrs
Test Coverage

File kubernetes-endpoint.service.ts has 253 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { combineLatest, Observable, of } from 'rxjs';
import { filter, first, map, shareReplay, startWith, switchMap } from 'rxjs/operators';

    Function getCaaspNodesData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      getCaaspNodesData(nodes$: Observable<KubernetesNode[]> = this.nodes$): Observable<CaaspNodesData> {
        return nodes$.pipe(
          map(nodes => {
            const info: CaaspNodesData = {
              version: 'Unknown',

      Function constructCoreObservables has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        private constructCoreObservables() {
          this.endpoint$ = this.kubeEndpointEntityService.waitForEntity$;
      
          this.connected$ = this.endpoint$.pipe(
            map(p => p.entity.connectionStatus === 'connected')

        Function getNodeStatusCount has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          getNodeStatusCount(
            nodes$: Observable<KubernetesNode[]>,
            conditionType: string,
            valueLabels: object = {},
            countStatus = 'True'

          There are no issues that match your filters.

          Category
          Status