cloudfoundry/stratos

View on GitHub
src/frontend/packages/kubernetes/src/kubernetes/kube-config-registration/kube-config-import/kube-config-import.component.ts

Summary

Maintainability
B
4 hrs
Test Coverage

File kube-config-import.component.ts has 276 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Component, ComponentFactoryResolver, Injector, OnDestroy } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { Store } from '@ngrx/store';
import { BehaviorSubject, Observable, of as observableOf, Subscription } from 'rxjs';
import { distinctUntilChanged, filter, first, map, pairwise, startWith, withLatestFrom } from 'rxjs/operators';

    Function doRegister has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      private doRegister(reg: KubeConfigImportAction, next: KubeConfigImportAction[]) {
        const obs$ = this.registerEndpoint(
          reg.cluster.name,
          reg.cluster.cluster.server,
          reg.cluster.cluster['insecure-skip-tls-verify'],

      Function connectEndpoint has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        private connectEndpoint(action: KubeConfigImportAction, pData: ConnectEndpointData): Observable<IActionMonitorComponentState> {
          const config: ConnectEndpointConfig = {
            name: action.cluster.name,
            guid: action.depends.cluster._guid || action.cluster._guid,
            type: KUBERNETES_ENDPOINT_TYPE,

        There are no issues that match your filters.

        Category
        Status