cloudfoundry-incubator/stratos

View on GitHub

Showing 1,111 of 1,370 total issues

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(

    Function getFolderSource has 12 return statements (exceeds 4 allowed).
    Open

    func getFolderSource(clientWebSocket *websocket.Conn, tempDir string, msg SocketMessage) (StratosProject, string, error) {
        // The msg data is JSON for the Folder info
        info := FolderSourceInfo{
            WaitAfterUpload: false,
        }
    Severity: Major
    Found in src/jetstream/plugins/cfapppush/deploy.go - About 1 hr to fix

      Method Analyzer.doRun has 12 return statements (exceeds 4 allowed).
      Open

      func (a *Analyzer) doRun(ec echo.Context) error {
      
          log.Debug("Run analyzer!")
      
          engine := ec.Param("analyzer")
      Severity: Major
      Found in src/jetstream/plugins/analysis/container/run.go - About 1 hr to fix

        Function setUpTestOrgSpaceUserRoles has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function setUpTestOrgSpaceUserRoles(
          cfGuid: string,
          defaultCf: E2EConfigCloudFoundry,
          orgName: string,
          spaceName: string,
        Severity: Minor
        Found in src/test-e2e/cloud-foundry/users-list-e2e.helper.ts - About 1 hr to fix

          Function customSassImport has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            private customSassImport(config: StratosConfig) {
              const that = this;
              return (url, resourcePath) => {
                if (url === '~@stratosui/theme/extensions') {
                  // Generate SCSS to appy theming to the packages that need to be themed
          Severity: Minor
          Found in src/frontend/packages/devkit/src/build/sass.ts - About 1 hr to fix

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

              ngOnInit() {
                this.connectionStatusSubject.next(0);
                if (!this.applicationService.cfGuid || !this.applicationService.appGuid) {
                  this.messages = NEVER;
                } else {

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

                constructor(
                  store: Store<GeneralEntityAppState>,
                  public entityMonitor: EntityMonitor<T>,
                  actionOrConfig: EntityRequestAction | EntityActionBuilderEntityConfig,
                ) {
              Severity: Minor
              Found in src/frontend/packages/store/src/entity-service.ts - About 1 hr to fix

                Function checkPageLoad has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  checkPageLoad() {
                    let hasLoaded = false;
                    const errMsg = this.getStratosError();
                    if (!!errMsg) {
                      hasLoaded = true;

                  Function init has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    private init() {
                      // Observabled for loading schema and values for the Chart
                      const schema$ = this.httpClient.get(this.schemaUrl).pipe(catchError(e => of(null)));
                      const values$: Observable<string> = this.httpClient.get(this.valuesUrl, { responseType: 'text' }).pipe(
                        catchError(e => of(null))

                    Function getEndpointConfig has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      static getEndpointConfig(
                        store: Store<AppState>,
                        action: GetAllEndpoints,
                        listConfig: IListConfig<EndpointModel>,
                        rowsState: Observable<RowsState>,

                      Function AddUnsigned has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        private static AddUnsigned( lX: number, lY: number ) : number
                        {
                            let lX4: number,
                                lY4: number,
                                lX8: number,
                      Severity: Minor
                      Found in src/frontend/packages/core/src/shared/components/user-avatar/md5.ts - About 1 hr to fix

                        Method cnsiTokenBackup.createBackup has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func (ctb *cnsiTokenBackup) createBackup(data *BackupRequest) (*BackupContent, error) {
                            log.Debug("createBackup")
                            allEndpoints, err := ctb.p.ListEndpoints()
                            if err != nil {
                                return nil, interfaces.NewHTTPShadowError(http.StatusBadGateway, "Failed to fetch endpoints", "Failed to fetch endpoints: %+v", err)
                        Severity: Minor
                        Found in src/jetstream/plugins/backup/backup_restore.go - About 1 hr to fix

                          Method portalProxy.verifySession has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func (p *portalProxy) verifySession(c echo.Context) error {
                              log.Debug("verifySession")
                          
                              p.StratosAuthService.BeforeVerifySession(c)
                          
                          
                          Severity: Minor
                          Found in src/jetstream/session.go - About 1 hr to fix

                            Function dispatchRoleRequests has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function dispatchRoleRequests(
                              endpoints: EntityUserRolesEndpoint[],
                              store: Store<AppState>,
                              httpClient: HttpClient
                            ): CfsRequestState {

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

                                constructor(private servicesService: ServicesService, private store: Store<CFAppState>) {
                                  this.hasVisiblePlans$ = this.servicesService.servicePlans$.pipe(
                                    map(p => p.length > 0));
                                  this.canCreateServiceInstance = CfCurrentUserPermissions.SERVICE_INSTANCE_CREATE;
                                  this.toolTipText$ = this.hasVisiblePlans$.pipe(

                                Function getBreadcrumbs has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  protected getBreadcrumbs(
                                    endpoint: EndpointModel,
                                    org: APIResource<IOrganization>,
                                    space: APIResource<ISpace>
                                  ) {

                                  Function generateRouteEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Function endpointErrorsHandlerFactory has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const endpointErrorsHandlerFactory = (actionDispatcher: ActionDispatcher) => (
                                      action: EntityRequestAction,
                                      catalogEntity: StratosBaseCatalogEntity,
                                      requestType: ApiRequestTypes,
                                      errors: JetstreamError[]

                                      Function generateCFUserProvidedServiceInstanceEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function generateCFUserProvidedServiceInstanceEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                                        const definition: IStratosEntityDefinition = {
                                          type: userProvidedServiceInstanceEntityType,
                                          schema: cfEntityFactory(userProvidedServiceInstanceEntityType),
                                          label: 'User Provided Service Instance',
                                      Severity: Minor
                                      Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix

                                        Function generateEventEntity has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function generateEventEntity(endpointDefinition: StratosEndpointExtensionDefinition) {
                                          const definition: IStratosEntityDefinition = {
                                            type: cfEventEntityType,
                                            schema: cfEntityFactory(cfEventEntityType),
                                            label: 'Event',
                                        Severity: Minor
                                        Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language