SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

Function map has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public map() {
    if (!this.report.report || !this.report.report.popeye) {
      return;
    }

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

      ngOnInit(): void {
        // Has the endpoint ID been specified in the URL?
        const endpoint = this.activatedRoute.snapshot.queryParams[AUTO_SELECT_CF_URL_PARAM];
        if (endpoint) {
          this.cfOrgSpaceService.cf.select.next(endpoint);

      Function createCoreStore has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        static createCoreStore<Y, ABC extends OrchestratedActionBuilders>(
          actionOrchestrator: ActionOrchestrator<ABC>,
          entityKey: string,
          getSchema: (schema: string) => EntitySchema
        ): CoreEntityCatalogEntityStore<Y, ABC> {

        Function graph has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            ).subscribe(([g, report]) => {
              const newNodes: CustomHelmReleaseGraphNode[] = [];
              Object.values(g.nodes).forEach((node: HelmReleaseGraphNode) => {
                const colors = this.getColor(node.data.status);
                const icon = getIcon(node.data.kind);

          Function start has 62 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func start(config interfaces.PortalConfig, p *portalProxy, needSetupMiddleware bool, isUpgrade bool, envLookup *env.VarSet) error {
              log.Debug("start")
              e := echo.New()
              e.HideBanner = true
              e.HidePort = true
          Severity: Minor
          Found in src/jetstream/main.go - About 1 hr to fix

            Method UserInvite.refreshToken has 62 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func (invite *UserInvite) refreshToken(clientID, clientSecret string, endpoint interfaces.CNSIRecord) (*interfaces.UAAResponse, *interfaces.TokenRecord, error) {
                now := time.Now()
                clientSecret = strings.TrimSpace(clientSecret)
                authEndpoint := fmt.Sprintf("%s/oauth/token", endpoint.TokenEndpoint)
            
            
            Severity: Minor
            Found in src/jetstream/plugins/userinvite/auth.go - About 1 hr to fix

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

                function setup(spaceName: string, routeHosts: string[], orderImportant: boolean) {
                  defaultCf = e2e.secrets.getDefaultCFEndpoint();
                  endpointGuid = e2e.helper.getEndpointGuid(e2e.info, defaultCf.name);
                  const defaultOrgGuidP = CFHelpers.cachedDefaultOrgGuid ?
                    promise.fullyResolved<string>(CFHelpers.cachedDefaultOrgGuid) : cfHelper.fetchDefaultOrgGuid();
              Severity: Minor
              Found in src/test-e2e/cloud-foundry/space-level/space-routes-e2e.spec.ts - About 1 hr to fix

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

                  constructor(
                    private store: Store<CFAppState>,
                    private paginationMonitorFactory: PaginationMonitorFactory,
                    private csiGuidService: CsiGuidsService,
                    private servicesWallService: ServicesWallService

                  Function initialiseObservables has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    private initialiseObservables() {
                      this.org$ = this.cfUserService.isConnectedUserAdmin(this.cfGuid).pipe(
                        switchMap(isAdmin => {
                          const relations = [
                            createEntityRelationKey(organizationEntityType, spaceEntityType),

                    Function generateCfApplicationEntity has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function generateCfApplicationEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                      const applicationDefinition: IStratosEntityDefinition<EntitySchema, APIResource<IApp>> = {
                        type: applicationEntityType,
                        schema: cfEntityFactory(applicationEntityType),
                        label: 'Application',
                    Severity: Minor
                    Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix

                      Function deleteOrgWarn has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        deleteOrgWarn() {
                          this.cfOrgService.org$.pipe(
                            map(org => org.entity.entity.name),
                            first()
                          ).subscribe(name => {

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

                          public apply(webpackConfig: any, config: StratosConfig, options: any) {
                        
                            // Generate the module file to import the appropriate extensions
                            const dir = path.join(config.rootDir, path.dirname(options.main));
                            const overrideFile = path.resolve(path.join(dir, './_custom-import.module.ts'));
                        Severity: Minor
                        Found in src/frontend/packages/devkit/src/build/extensions.ts - About 1 hr to fix

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

                            ngOnInit() {
                              this.endpointId = this.activatedRoute.snapshot.params && this.activatedRoute.snapshot.params.endpointId ?
                                this.activatedRoute.snapshot.params.endpointId : null;
                              if (!this.endpointIds$ && this.endpointId) {
                                this.endpointIds$ = observableOf([this.endpointId]);

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

                              constructor(
                                catalogEntity: StratosBaseCatalogEntity,
                                store: Store<any>
                              ) {
                                super();

                              Function updateUserMissingRoles has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function updateUserMissingRoles(users: IRequestEntityTypeState<APIResource<CfUser>>, action: APISuccessOrFailedAction<NormalizedResponse>) {
                                // At this point in the flow the request flow (APISuccessOrFailedAction), the users may or may not be in the store yet
                                // (via WrapperRequestActionSuccess). Therefore in order to avoid partial entities we need to stick the whole user set into the store
                                // including `missingRoles`.
                                const usersInResponse: IRequestEntityTypeState<APIResource<CfUser>> = action.response.entities[cfUserEntityType];

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

                                  ngOnInit() {
                                    const userRole$ = this.cfEndpointService.currentUser$.pipe(
                                      switchMap(u => {
                                        // This is null if the endpoint is disconnected. Probably related to https://github.com/cloudfoundry-incubator/stratos/issues/1727
                                        if (!u) {

                                  Function createAppReducer has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function createAppReducer(state: CreateNewApplicationState = defaultState, action) {
                                    switch (action.type) {
                                      case SET_CF_DETAILS:
                                        return {
                                          ...state, cloudFoundryDetails: action.cloudFoundryDetails

                                    Function mapPods has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      private mapPods(pods: KubernetesPod[]): HelmReleaseChartData {
                                        const podPhases: { [phase: string]: number, } = {};
                                        const containers = {
                                          ready: {
                                            name: 'Ready',

                                      Function installChart has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        installChart(): Observable<StepOnNextResult> {
                                          const endpoint = getMonocularEndpoint(this.route, null, null);
                                          // Build the request body
                                          const values: HelmInstallValues = {
                                            ...this.details.value,

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

                                          constructor(
                                            public kubeEndpointService: KubernetesEndpointService,
                                            public activatedRoute: ActivatedRoute,
                                            public store: Store<AppState>,
                                            private snackbarService: SnackBarService
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language