SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

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

  function setup(orgName: string, appNames: string[], orderImportant: boolean) {
    defaultCf = e2e.secrets.getDefaultCFEndpoint();
    endpointGuid = e2e.helper.getEndpointGuid(e2e.info, defaultCf.name);

    return browser.wait(
Severity: Minor
Found in src/test-e2e/applications/application-wall-e2e.spec.ts - About 1 hr to fix

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

      createServiceInstance(createServiceInstance: CreateServiceInstanceState): Observable<RequestInfoState> {
    
        const name = this.createNewInstanceForm.controls.name.value;
        const { spaceGuid, cfGuid } = createServiceInstance;
        const servicePlanGuid = createServiceInstance.servicePlanGuid;

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

      export function createServiceInstanceReducer(state: CreateServiceInstanceState = defaultState, action): CreateServiceInstanceState {
        switch (action.type) {
          case SET_SERVICE_PLAN:
            return { ...state, servicePlanGuid: action.servicePlanGuid };
          case SET_ORG:

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

          constructor(
            private store: Store<CFAppState>,
            private activeRouteCfOrgSpace: ActiveRouteCfOrgSpace,
            private cfUserService: CfUserService,
            private route: ActivatedRoute

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

              this.appMonitor$ = this.applicationService.appStats$.pipe(map(stats => {
                const res = new AppMonitorState();
                if (!stats) {
                  return res;
                }

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

              private constructCoreObservables() {
                // First set up all the base observables
                this.app$ = this.entityService.waitForEntity$;
                const moreWaiting$ = this.app$.pipe(
                  filter(entityInfo => !!(entityInfo.entity && entityInfo.entity.entity && entityInfo.entity.entity.cfGuid)),

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

                constructor(
                  private fb: FormBuilder,
                  private store: Store<CFAppState>,
                  private appEnvVarsService: ApplicationEnvVarsHelper,
                  private activatedRoute: ActivatedRoute

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

                  @Input()
                  set row(row: APIResource<IService>) {
                    super.row = row;
                    if (row && !this.spaceLink$) {
                      this.broker$ = cfEntityCatalog.serviceBroker.store.getEntityService(

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

                      unconfigure(cfGUID: string) {
                        const confirmation = new ConfirmationDialogConfig(
                          'Disable User Invitations',
                          `Are you sure you want to disable user invitation support?`,
                          'Disable'

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

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

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

                                    @Input() set data(usageData: ISimpleUsageChartData) {
                                      if (usageData) {
                                        const {
                                          total,
                                          used = 0,

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

                                      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 findDatabaseConfig has 55 lines of code (exceeds 50 allowed). Consider refactoring.
                                        Open

                                        func findDatabaseConfig(vcapServices map[string][]VCAPService, db *DatabaseConfig, env *env.VarSet) bool {
                                            var service VCAPService
                                            configs := findDatabaseConfigurations(vcapServices)
                                            log.Infof("Found %d database service instances", len(configs))
                                            for _, s := range configs {
                                        Severity: Minor
                                        Found in src/jetstream/datastore/database_cf_config.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language