cloudfoundry-incubator/stratos

View on GitHub

Showing 650 of 1,370 total issues

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

  public apply(src: string): string {

    // Patch different page title if there is one
    const title = this.config.stratosConfig.title || 'Stratos';
    src = src.replace(/@@TITLE@@/g, title);
Severity: Minor
Found in src/frontend/packages/devkit/src/build/index.transform.ts - About 1 hr to fix

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

      constructor(
        store: Store<any>,
        repoName: string,
        chartName: string,
        version: string,

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

      export function failRequest(state, action: IFailedRequestAction) {
        if (isNullOrUndefined(action.apiAction.guid)) {
          return state;
        }
        const apiAction = action.apiAction as BaseEntityRequestAction;

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

              map(endpoint => {
        
                // check if this is being invoked from the node path
                const nodeName = getIdFromRoute(activatedRoute, 'nodeName');
                if (!!nodeName) {

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

            constructor(
              private store: Store<any>,
              private route: ActivatedRoute,
              router: Router,
              kubeId: BaseKubeGuid,

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

              private orderEndpoints(endpoints: EndpointModel[], favorites: IUserFavoritesGroups, showMode: boolean): EndpointModel[] {
                const processed = {};
                const result = [];
                const epMap = {};
                endpoints.forEach(ep => epMap[ep.guid] = ep);

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

                    tap((paginationFilter: ListFilter) => {
                      this.filterString = paginationFilter.string;
              
                      const filterKey = paginationFilter.filterKey;
                      if (filterKey) {

                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')

                  Method MetricsSpecification.createMetadata has 55 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (m *MetricsSpecification) createMetadata(metricEndpoint *url.URL, httpClient http.Client, auth *MetricsAuth) (string, error) {
                      basicMetricRequest := fmt.Sprintf("%s/api/v1/query?query=firehose_total_metrics_received", metricEndpoint)
                      req, err := http.NewRequest("GET", basicMetricRequest, nil)
                      if err != nil {
                          msg := "Failed to create request for the Metrics Endpoint: %v"
                  Severity: Minor
                  Found in src/jetstream/plugins/metrics/main.go - About 1 hr to fix

                    Function KubeDashboardLogin has 55 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func KubeDashboardLogin(c echo.Context, p interfaces.PortalProxy) error {
                        log.Debug("kubeDashboardLogin request")
                    
                        endpointGUID := c.Param("guid")
                        userGUID := c.Get("user_id").(string)
                    Severity: Minor
                    Found in src/jetstream/plugins/kubernetes/dashboard/login.go - About 1 hr to fix

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

                        module.exports.reporter = function () {
                          var total = 0;
                          var skipped = 0;
                      
                          const ansi = {
                      Severity: Minor
                      Found in src/test-e2e/skip-plugin.js - About 1 hr to fix

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

                        function generateCFServiceBindingEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                          const definition: IStratosEntityDefinition = {
                            type: serviceBindingEntityType,
                            schema: {
                              default: cfEntityFactory(serviceBindingEntityType),
                        Severity: Minor
                        Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix

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

                            public jsonFilter(jsonString: string): string {
                              let filtered = jsonString;
                              try {
                                const cfEvent: FireHoseItem = JSON.parse(jsonString);
                                switch (cfEvent.eventType) {

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

                            function newEntityState<T = StateEntity>(state: StateEntities<T>, action: ChangeCfUserRole, add: boolean): StateEntities<T> {
                              const apiResource: APIResource<T> = state[action.guid];
                              if (!apiResource) {
                                return state;
                              }

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

                                ngOnInit() {
                                  this.route.params.forEach((params: Params) => {
                                    const repo = params.repo;
                                    const chartName = params.chartName;
                              
                              

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

                                export function uaaSetupReducer(state: UAASetupState = defaultState, action) {
                                  switch (action.type) {
                                    case SETUP_GET_SCOPES:
                                    case SETUP_SAVE_CONFIG:
                                      return {
                                Severity: Minor
                                Found in src/frontend/packages/store/src/reducers/uaa-setup.reducers.ts - About 1 hr to fix

                                  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 getAuthDataForConnect has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      public getAuthDataForConnect(resolver: ComponentFactoryResolver, injector: Injector, fb: FormBuilder, user: KubeConfigFileUser)
                                        : ConnectEndpointData | null {
                                    
                                        let data = null;
                                    
                                    

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

                                        private setupInputSub() {
                                          this.stopInputSub();
                                          this.sub = combineLatest(
                                            this.timeObservable,
                                            this.dateObservable

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

                                          public deleteWarn() {
                                            // Namespace vs Pod definition in different places
                                            const defn = (this.data.definition?.definition || this.data.definition) as KubeResourceEntityDefinition;
                                            this.sidePanelService.hide();
                                            const confirmation = new ConfirmationDialogConfig(
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language