cloudfoundry-incubator/stratos

View on GitHub

Showing 650 of 1,370 total issues

Function removeFavoriteFromGroup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function removeFavoriteFromGroup(state: IUserFavoritesGroups, action: RemoveUserFavoriteSuccessAction): IUserFavoritesGroups {
  const { favorite } = action;
  const endpointGuid = getEndpointIDFromFavorite(favorite);
  const userGroup = state[endpointGuid] || getDefaultFavoriteGroup();
  // Favorite will not have and entityId if it is for an endpoint

    Function paginationResetSortAndFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function paginationResetSortAndFilter(state: PaginationState, action: ResetPaginationSortFilter): PaginationState {
      const { pAction } = action;
      const entityKey = entityCatalog.getEntityKey(pAction);
      const pKey = action.pAction.paginationKey;
    
    

      Function makeSpan has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        makeSpan() {
          let span = '';
          if (this.boldOn || this.currentFg || this.currentBg) {
            span += '<span class="';
            if (this.boldOn) {

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

          constructor(
            private activatedRoute: ActivatedRoute,
            private metricsService: MetricsService,
            private store: Store<AppState>,
          ) {

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

            constructor(private store: Store<GeneralEntityAppState>) {
              const eventsAndPriority$ = combineLatest([
                this.getEventsAndPriorityType(),
                this.readEventsSubject.asObservable()
              ]).pipe(
          Severity: Minor
          Found in src/frontend/packages/core/src/shared/global-events.service.ts - About 1 hr to fix

            Function fillOutTimeOrderedChartSeries has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              static fillOutTimeOrderedChartSeries(
                timeOrdered: ChartSeries[],
                start: number,
                end: number,
                step: number,

              Function setupAction has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                private setupAction(config: IListDataSourceConfig<A, T>) {
                  if (config.schema instanceof MultiActionConfig) {
                    if (!config.isLocal) {
                      // We cannot do multi action lists for non-local lists
                      this.action = config.schema[0].paginationAction;

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

                  ngOnInit() {
                    if (this.rowState) {
                      this.inErrorState$ = this.rowState.pipe(
                        map(state => state.error)
                      );

                  Method UaaUserInfo.uaa has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func (userInfo *UaaUserInfo) uaa(target string, body []byte) (int, []byte, *http.Header, error) {
                      log.Debug("uaa request")
                  
                      // Check session
                      _, err := userInfo.portalProxy.GetSessionInt64Value(userInfo.echo, "exp")
                  Severity: Minor
                  Found in src/jetstream/plugins/userinfo/uaa_user.go - About 1 hr to fix

                    Method KubeTerminal.cleanup has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func (k *KubeTerminal) cleanup() {
                        // Use a random initial wait before cleaning up
                        // If we had more than one backend, this helps to ensure they are not all trying to cleanup at the same time
                        wait := rand.Intn(30)
                        log.Debug("Kubernetes Terminal cleanup will start in %d minutes", wait)
                    Severity: Minor
                    Found in src/jetstream/plugins/kubernetes/terminal/cleanup.go - About 1 hr to fix

                      Method PgsqlTokenRepository.SaveAuthToken has 51 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func (p *PgsqlTokenRepository) SaveAuthToken(userGUID string, tr interfaces.TokenRecord, encryptionKey []byte) error {
                          log.Debug("SaveAuthToken")
                          if userGUID == "" {
                              msg := "Unable to save Auth Token without a valid User GUID."
                              log.Debug(msg)
                      Severity: Minor
                      Found in src/jetstream/repository/tokens/pgsql_tokens.go - About 1 hr to fix

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

                        export function getOrgRoles(userRolesInOrg: UserRoleInOrg): IUserRole<OrgUserRoleNames>[] {
                          const roles = [];
                          if (userRolesInOrg[OrgUserRoleNames.MANAGER]) {
                            roles.push({
                              string: UserRoleLabels.org.short[OrgUserRoleNames.MANAGER],
                        Severity: Minor
                        Found in src/frontend/packages/cloud-foundry/src/features/cf/cf.helpers.ts - About 1 hr to fix

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

                            constructor(
                              public cfEndpointService: CloudFoundryEndpointService,
                              public cfSpaceService: CloudFoundrySpaceService,
                              public cfOrgService: CloudFoundryOrganizationService,
                              private store: Store<CFAppState>,

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

                              poll(interval = 10000, action: () => void, getActionState: (request: RequestInfoState) => ActionState) {
                                const pollingEnabled$ = this.store.select(selectDashboardState).pipe(
                                  map(dashboardState => dashboardState.pollingEnabled)
                                );
                                return observableInterval(interval)
                            Severity: Minor
                            Found in src/frontend/packages/store/src/monitors/entity-monitor.ts - About 1 hr to fix

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

                                private createChangesObs() {
                                  const changesViaUsername = this.updateChanges.pipe(
                                    switchMap(() => this.store.select(selectCfUsersRolesChangedRoles)),
                                    map(changes => changes
                                      .map(change => ({

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

                                  private setUpBreadcrumbs(
                                    cfEndpointService: CloudFoundryEndpointService,
                                    cfOrgService: CloudFoundryOrganizationService
                                  ) {
                                    this.breadcrumbs$ = combineLatest(

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

                                    private createRolesUserDiff(
                                      existingRoles: CfUserRolesSelected,
                                      newRoles: IUserPermissionInOrg,
                                      changes: CfRoleChange[],
                                      user: CfUser,

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

                                      constructor(
                                        protected store: Store<CFAppState>,
                                        protected activatedRoute: ActivatedRoute,
                                        protected activeRouteCfOrgSpace: ActiveRouteCfOrgSpace,
                                      ) {

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

                                      function getState(
                                        orgOrSpace: RoleEntities,
                                        allRoles: { guid: string, roles: ISpaceRoleState | IOrgRoleState }[] = [],
                                        roles?: ISpaceRoleState | IOrgRoleState
                                      ): ICfRolesState {

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

                                        function updateMetricsInfo(state: IRequestEntityTypeState<EndpointModel>, action: MetricsAPIActionSuccess) {
                                          if (action.queryType === MetricAPIQueryTypes.TARGETS) {
                                            const existingEndpoint = state[action.endpointGuid];
                                            return {
                                              ...state,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language