Cloud-CV/EvalAI

View on GitHub

Showing 666 of 1,371 total issues

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

        vm.getAllResults = function(parameters, resultsArray, typ){
            parameters.callback = {
                onSuccess: function(response) {
                    var data = response.data;
                    var results = data.results;
Severity: Minor
Found in frontend/src/js/controllers/challengeListCtrl.js - About 1 hr to fix

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

                    onSuccess: function(response) {
                        $rootScope.notify("success", "New team- '" + vm.team.name + "' has been created");
                        var details = response.data;
                        vm.teamId = details.id;
                        vm.team.error = false;
    Severity: Minor
    Found in frontend/src/js/controllers/challengeHostTeamsCtrl.js - About 1 hr to fix

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

              this.sendRequest = function(parameters, header, type) {
                  var url = EnvironmentConfig.API + parameters.url;
                  var data = parameters.data;
                  var token = parameters.token;
                  var method = parameters.method;
      Severity: Minor
      Found in frontend/src/js/services/services.js - About 1 hr to fix

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

          editChallengeOverviewUpload() {
            const SELF = this;
            SELF.apiCall = (params) => {
              const FORM_DATA: FormData = new FormData();
              FORM_DATA.append('overview_file', params['overview_file']);

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

            editEvaluationCriteriaUpload() {
              const SELF = this;
              SELF.apiCall = (params) => {
                const FORM_DATA: FormData = new FormData();
                FORM_DATA.append('evaluation_criteria_file', params['evaluation_criteria_file']);

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

              editLeaderboardSchema() {
                const SELF = this;
                SELF.apiCall = (params) => {
                  let currentLeaderboard = this.leaderboard;
                  this.logger.info(params);

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

                editChallengeTermsAndConditionsUpload() {
                  const SELF = this;
                  SELF.apiCall = (params) => {
                    const FORM_DATA: FormData = new FormData();
                    FORM_DATA.append('terms_and_conditions_file', params['terms_and_conditions_file']);

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

                  editChallengeImage() {
                    const SELF = this;
                    SELF.apiCall = (params) => {
                      const FORM_DATA: FormData = new FormData();
                      FORM_DATA.append('image', params['image']);

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

                    editTestAnnotations() {
                      const SELF = this;
                      SELF.apiCall = (params) => {
                        const FORM_DATA: FormData = new FormData();
                        FORM_DATA.append('test_annotation', params['test_annotation']);

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

                       editSubmissionGuidelineUpload() {
                        const SELF = this;
                        SELF.apiCall = (params) => {
                          const FORM_DATA: FormData = new FormData();
                          FORM_DATA.append('submission_guidelines_file', params['submission_guidelines_file']);

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

                        ngOnInit() {
                          if (this.authService.isLoggedIn()) {
                            this.isLoggedIn = true;
                          }
                          this.routerPublic = this.router;

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

                          addMembersToTeamWrapper() {
                            const SELF = this;
                            const addMembersToTeam = (team) => {
                              SELF.apiCall = (params) => {
                                const BODY = JSON.stringify(params);

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

                                  vm.publishChallenge = function(ev) {
                                      ev.stopPropagation();
                                      vm.toggleChallengeState = null;
                                      vm.publishDesc = null;
                                      if (vm.isPublished)
                          Severity: Minor
                          Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

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

                              loadPaginationData(url) {
                                if (url !== null) {
                                  const SELF = this;
                                  const API_PATH = url.split(environment.api_endpoint)[1];
                                  SELF.apiService.getUrl(API_PATH, true).subscribe(

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

                                cancelSubmission(submission) {
                                  const SELF = this;
                                  if (submission.status != "submitted") {
                                    SELF.globalService.showToast('error', 'Only unproccessed submissions can be cancelled', 5);
                                    return;

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

                                  phaseSplitSelected() {
                                    const SELF = this;
                                    return (phaseSplit) => {
                                      SELF.selectedPhaseSplit = phaseSplit;
                                      SELF.isPhaseSplitLeaderboardPublic = SELF.selectedPhaseSplit['visibility'];

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

                                     cancelSubmission(submission) {
                                      const SELF = this;
                                      if (submission.status != "submitted") {
                                        SELF.globalService.showToast('error', 'Only unproccessed submissions can be cancelled', 5);
                                        return;

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

                                            vm.editChallengeTag = function(editChallengeTagDomainForm) {
                                                var new_tags;
                                                if (!editChallengeTagDomainForm) {
                                                    $mdDialog.hide();
                                                    return;
                                    Severity: Minor
                                    Found in frontend/src/js/controllers/challengeCtrl.js - About 1 hr to fix

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

                                                      onSuccess: function() {
                                                          $rootScope.notify("success", "Team " + vm.team.name + " has been created successfully!");
                                                          vm.team.error = false;
                                                          vm.stopLoader();
                                                          // reset the team attributes
                                      Severity: Minor
                                      Found in frontend/src/js/controllers/teamsCtrl.js - About 1 hr to fix

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

                                          userLogin(loginFormValid) {
                                            if (!loginFormValid) {
                                              this.globalService.stopLoader();
                                              return;
                                            }
                                        Severity: Minor
                                        Found in frontend_v2/src/app/components/auth/login/login.component.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language