SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

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

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

            constructor(
              store: Store<CFAppState>,
              cfGuid: string,
              cellId: string,
              listConfig: IListConfig<CfCellApp>,

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

            export function autoscalerTransformArrayToMap(policy: AppAutoscalerPolicy) {
              const newPolicy: AppAutoscalerPolicyLocal = {
                ...policy,
                enabled: true,
                scaling_rules_map: {},

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

                private createCf() {
                  const list$ = this.store.select(connectedEndpointsOfTypesSelector(CF_ENDPOINT_TYPE)).pipe(
                    // Ensure we have endpoints
                    filter(endpoints => endpoints && !!Object.keys(endpoints).length),
                    publishReplay(1),

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

                  private static setUpManager(
                    paginationMonitor: PaginationMonitor<APIResource>,
                    rowStateManager: TableRowStateManager
                  ) {
                    return paginationMonitor.currentPage$.pipe(

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

                    export function updateAppSummaryRoutesReducer(state: IRequestEntityTypeState<IAppSummary>, action: APISuccessOrFailedAction) {
                      let currentState;
                      let routeGuid;
                      switch (action.type) {
                        case RouteEvents.UNMAP_ROUTE_SUCCESS:

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

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

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

                                private getSpacePermissions(spacePerms: IUserPermissionInSpace, row: APIResource<CfUser>, isOrgLevel = true) {
                                  return getSpaceRoles(spacePerms.permissions).map(perm => {
                                    const updatingKey = RemoveCfUserRole.generateUpdatingKey(
                                      perm.key,
                                      row.metadata.guid

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

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

                                  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 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,

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

                                        private static getActionDispatcher<Y, ABC extends OrchestratedActionBuilders, K extends keyof ABC>(
                                          es: CoreEntityCatalogEntityStore<Y, ABC>,
                                          builder: OrchestratedActionBuilder,
                                          actionKey: string,
                                        ): ActionDispatcher<K, ABC> {

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

                                          private static parseStorePartForLocalStorage<T = any>(storePart: T, type: LocalStorageSyncTypes): object {
                                            switch (type) {
                                              case LocalStorageSyncTypes.PAGINATION:
                                                const pagination: PaginationState = storePart as unknown as PaginationState;
                                                // Convert each pagination section that we care about into an object with only the properties we care about
                                        Severity: Minor
                                        Found in src/frontend/packages/store/src/helpers/local-storage-service.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language