uPortal-Project/uportal-home

View on GitHub

Showing 30 of 73 total issues

File services.js has 418 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Licensed to Apereo under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Apereo licenses this file to you under the Apache License,
Severity: Minor
Found in web/src/main/webapp/my-app/layout/services.js - About 6 hrs to fix

    File controllers.js has 351 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Licensed to Apereo under one or more contributor license
     * agreements. See the NOTICE file distributed with this work
     * for additional information regarding copyright ownership.
     * Apereo licenses this file to you under the Apache License,
    Severity: Minor
    Found in web/src/main/webapp/my-app/layout/controllers.js - About 4 hrs to fix

      File controllers.js has 338 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Licensed to Apereo under one or more contributor license
       * agreements. See the NOTICE file distributed with this work
       * for additional information regarding copyright ownership.
       * Apereo licenses this file to you under the Apache License,
      Severity: Minor
      Found in web/src/main/webapp/my-app/marketplace/controllers.js - About 4 hrs to fix

        File services.js has 311 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Licensed to Apereo under one or more contributor license
         * agreements. See the NOTICE file distributed with this work
         * for additional information regarding copyright ownership.
         * Apereo licenses this file to you under the Apache License,
        Severity: Minor
        Found in web/src/main/webapp/my-app/search/services.js - About 3 hrs to fix

          File dnd-lists.js has 299 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * Licensed to Apereo under one or more contributor license
           * agreements. See the NOTICE file distributed with this work
           * for additional information regarding copyright ownership.
           * Apereo licenses this file to you under the Apache License,
          Severity: Minor
          Found in web/src/main/webapp/js/dnd-lists.js - About 3 hrs to fix

            Function getLayout has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                      var getLayout = function() {
                        $log.log('getLayout (new backend version)');
                        return checkLayoutCache().then(function(data) {
                          var successFn;
                          var errorFn;
            Severity: Major
            Found in web/src/main/webapp/my-app/layout/services.js - About 2 hrs to fix

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

                    var init = function() {
                      initwiscDirectoryResultLimit();
                      $scope.myuwResults = [];
                      $scope.filteredApps = [];
                      $scope.appDirectoryLoading = true;
              Severity: Minor
              Found in web/src/main/webapp/my-app/search/controllers.js - About 1 hr to fix

                Function showConfirmationToast has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      var showConfirmationToast = function(data) {
                        var widgetTitle = data.title;
                
                        var accentColor = '';
                        if ($sessionStorage.portal.theme) {
                Severity: Minor
                Found in web/src/main/webapp/my-app/layout/controllers.js - About 1 hr to fix

                  Function initDirectorySearch has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        var initDirectorySearch = function() {
                          $scope.wiscDirectoryLoading = true;
                          $scope.wiscDirectoryResultsBadge = '?';
                          $scope.wiscDirectoryHopeForResults = true;
                          directorySearchService.directorySearch($scope.searchTerm).then(
                  Severity: Minor
                  Found in web/src/main/webapp/my-app/search/controllers.js - About 1 hr to fix

                    Function exports has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function(config) {
                        config.set({
                    
                            basePath: './',
                    
                    
                    Severity: Minor
                    Found in web/src/main/webapp/karma.conf.js - About 1 hr to fix

                      Function formatLayoutForCache has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              var formatLayoutForCache = function(data) {
                                var result = {
                                  'layout': [],
                                };
                                //  Check if there are duplicate fnames in data.layout
                      Severity: Minor
                      Found in web/src/main/webapp/my-app/layout/services.js - About 1 hr to fix

                        Function googleSearch has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              function googleSearch(term) {
                                return getGoogleSearchURL().then(function(googleSearchURL) {
                                  return $q(function(resolve, reject) {
                                    if (googleSearchURL) {
                                      return $http.get(googleSearchURL + '&q=' + term,
                        Severity: Minor
                        Found in web/src/main/webapp/my-app/search/services.js - About 1 hr to fix

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

                                vm.initializeConstants = function() {
                                  var errorFn = function(name) {
                                    return function() {
                                      $log.warn('Could not ' + name);
                                    };
                          Severity: Minor
                          Found in web/src/main/webapp/my-app/marketplace/controllers.js - About 1 hr to fix

                            Function getPortlet has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    var getPortlet = function(fname) {
                                      var successFn;
                                      var errorFn;
                                      var defer;
                                      // first check cache, if there use that (it'll be faster)
                            Severity: Minor
                            Found in web/src/main/webapp/my-app/marketplace/services.js - About 1 hr to fix

                              Function addToHome has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      $scope.addToHome = function addToHome(portlet) {
                                        var fname = portlet.fname;
                                        var ret = layoutService.addToHome(portlet, $sessionStorage.layout);
                                        ret.then(
                                          function successCallback(response) {
                              Severity: Minor
                              Found in web/src/main/webapp/my-app/marketplace/controllers.js - About 1 hr to fix

                                Function addToHome has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        vm.addToHome = function(portlet) {
                                          console.log("addToHome: pportlet", portlet);
                                          var ret = layoutService.addToHome(portlet);
                                          console.log("addToHome: ret", ret);
                                          ret.success(function(request, text) {
                                Severity: Minor
                                Found in web/src/main/webapp/my-app/layout/static/controllers.js - About 1 hr to fix

                                  Function addToHome has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                         $scope.addToHome = function addToHome(portlet) {
                                          console.log("market: portlet", portlet);
                                            var fname = portlet.fname;
                                            var ret = layoutService.addToHome(portlet);
                                            console.log("market: fname", fname);
                                  Severity: Minor
                                  Found in web/src/main/webapp/my-app/marketplace/controllers.js - About 1 hr to fix

                                    Function persistAndUse has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                  var persistAndUse = function(result) {
                                                    $log.log('persistAndUse: got data from old layout backend: ' +
                                                      result.data.layout);
                                                    var formattedOldLayout = formatLayoutForCache(result.data);
                                    
                                    
                                    Severity: Minor
                                    Found in web/src/main/webapp/my-app/layout/services.js - About 1 hr to fix

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

                                              var getPortlets = function() {
                                                  return checkMarketplaceCache().then(function(data) {
                                                      var successFn;
                                                      var errorFn;
                                                      var defer;
                                      Severity: Minor
                                      Found in web/src/main/webapp/my-app/marketplace/services.js - About 1 hr to fix

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

                                                vm.addToHome = function(portlet) {
                                                  var ret = layoutService.addToHome(portlet);
                                                  ret.success(function(request, text) {
                                                    angular.element('.fname-' + portlet.fname)
                                                      .html('<span style="color : green;">' +
                                        Severity: Minor
                                        Found in web/src/main/webapp/my-app/layout/static/controllers.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language