SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

Function KubeDashboardLogin has 55 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func KubeDashboardLogin(c echo.Context, p interfaces.PortalProxy) error {
    log.Debug("kubeDashboardLogin request")

    endpointGUID := c.Param("guid")
    userGUID := c.Get("user_id").(string)
Severity: Minor
Found in src/jetstream/plugins/kubernetes/dashboard/login.go - About 1 hr to fix

    Method portalProxy.DoRegisterEndpoint has 55 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (p *portalProxy) DoRegisterEndpoint(cnsiName string, apiEndpoint string, skipSSLValidation bool, clientId string, clientSecret string, ssoAllowed bool, subType string, fetchInfo interfaces.InfoFunc) (interfaces.CNSIRecord, error) {
    
        if len(cnsiName) == 0 || len(apiEndpoint) == 0 {
            return interfaces.CNSIRecord{}, interfaces.NewHTTPShadowError(
                http.StatusBadRequest,
    Severity: Minor
    Found in src/jetstream/cnsi.go - About 1 hr to fix

      Function reporter has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        module.exports.reporter = function () {
          var total = 0;
          var skipped = 0;
      
          const ansi = {
      Severity: Minor
      Found in src/test-e2e/skip-plugin.js - About 1 hr to fix

        Function validateSpecificDateEndDateTime has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          validateSpecificDateEndDateTime(): ValidatorFn {
            return (control: AbstractControl): { [key: string]: any, } => {
              if (!this.editSpecificDateForm) {
                return null;
              }

          Function validateSpecificDateStartDateTime has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            validateSpecificDateStartDateTime(): ValidatorFn {
              return (control: AbstractControl): { [key: string]: any, } => {
                if (!this.editSpecificDateForm) {
                  return null;
                }

            Function jsonFilter has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              public jsonFilter(jsonString: string): string {
                let filtered = jsonString;
                try {
                  const cfEvent: FireHoseItem = JSON.parse(jsonString);
                  switch (cfEvent.eventType) {

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

                constructor(public applicationService: ApplicationService) {
                  const chartConfigBuilder = getMetricsChartConfigBuilder<IMetricApplication>(result => `Instance ${result.metric.instance_index}`);
                  this.instanceMetricConfigs = [
                    chartConfigBuilder(
                      new FetchApplicationChartMetricsAction(

                Function constructStatusObservables has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  private constructStatusObservables() {
                    this.isFetchingApp$ = this.entityService.isFetchingEntity$;
                
                    this.isUpdatingApp$ = this.entityService.entityObs$.pipe(map(a => {
                      const updatingRoot = a.entityRequestInfo.updating[rootUpdatingKey] || { busy: false };

                  Function generateCFServiceBindingEntity has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Function newEntityState has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function newEntityState<T = StateEntity>(state: StateEntities<T>, action: ChangeCfUserRole, add: boolean): StateEntities<T> {
                      const apiResource: APIResource<T> = state[action.guid];
                      if (!apiResource) {
                        return state;
                      }

                      Function uaaSetupReducer has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function uaaSetupReducer(state: UAASetupState = defaultState, action) {
                        switch (action.type) {
                          case SETUP_GET_SCOPES:
                          case SETUP_SAVE_CONFIG:
                            return {
                      Severity: Minor
                      Found in src/frontend/packages/store/src/reducers/uaa-setup.reducers.ts - About 1 hr to fix

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

                          ngOnInit() {
                            this.route.params.forEach((params: Params) => {
                              const repo = params.repo;
                              const chartName = params.chartName;
                        
                        

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

                            constructor(
                              public pageHeaderService: PageHeaderService,
                              private store: Store<DashboardOnlyAppState>,
                              private breakpointObserver: BreakpointObserver,
                              private router: Router,

                            Function doRegister has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              private doRegister(reg: KubeConfigImportAction, next: KubeConfigImportAction[]) {
                                const obs$ = this.registerEndpoint(
                                  reg.cluster.name,
                                  reg.cluster.cluster.server,
                                  reg.cluster.cluster['insecure-skip-tls-verify'],

                              Function getAuthDataForConnect has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                public getAuthDataForConnect(resolver: ComponentFactoryResolver, injector: Injector, fb: FormBuilder, user: KubeConfigFileUser)
                                  : ConnectEndpointData | null {
                              
                                  let data = null;
                              
                              

                                Function setupInputSub has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  private setupInputSub() {
                                    this.stopInputSub();
                                    this.sub = combineLatest(
                                      this.timeObservable,
                                      this.dateObservable

                                  Function setupObservables has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    private setupObservables() {
                                      this.update$ = stratosEntityCatalog.endpoint.store.getEntityMonitor(this.config.guid).getUpdatingSection(ConnectEndpoint.UpdatingKey)
                                        .pipe(filter(update => !!update));
                                  
                                      this.fetchingInfo$ = stratosEntityCatalog.endpoint.store.getEntityMonitor(this.config.guid).entityRequest$.pipe(

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

                                      private init(config: ConnectEndpointConfig) {
                                        const endpoint = entityCatalog.getEndpoint(config.type, config.subType);
                                        // Populate the valid auth types for the endpoint that we want to connect to
                                    
                                        // Remove SSO if not allowed on this endpoint

                                      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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language