uPortal-Project/uportal-home

View on GitHub

Showing 30 of 73 total issues

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

          $scope.moveWithKeyboard = function(widget, event) {
            // Get index independent of ng-repeat to avoid filter bugs
            var currentIndex =
              findLayoutIndex($scope.layout, 'nodeId', widget.nodeId);
            var previousIndex = currentIndex - 1;
    Severity: Minor
    Found in web/src/main/webapp/my-app/layout/controllers.js - About 1 hr to fix

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

            var init = function() {
              // init variables
              $scope.portlets = [];
              marketplaceService.getPortlets().then(function(data) {
                $scope.portlets = data.portlets;
      Severity: Minor
      Found in web/src/main/webapp/my-app/marketplace/controllers.js - About 1 hr to fix

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

              var filterAppsBySearchTerm = function(apps) {
                // Filter by title matches first
                var appsWithMatchingTitle =
                  marketplaceService.filterPortletsBySearchTerm(
                    apps,
        Severity: Minor
        Found in web/src/main/webapp/my-app/search/controllers.js - About 1 hr to fix

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

                  var getExclusiveMarkup = function(portlet) {
                    return $http.get(SERVICE_LOC.context +
                        '/p/' + portlet.fname + '/exclusive/render.uP', {cache: true})
                        .then(function(result) {
                            var data = result.data;
          Severity: Minor
          Found in web/src/main/webapp/my-app/layout/services.js - About 1 hr to fix

            Function invokeCallback has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    function invokeCallback(expression, event, dropEffect, itemType, index, item) {
            Severity: Minor
            Found in web/src/main/webapp/js/dnd-lists.js - About 45 mins to fix

              Function moveStuff has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                              index, length, sourceId, previousNodeId, nextNodeId) {
              Severity: Minor
              Found in web/src/main/webapp/my-app/layout/services.js - About 35 mins to fix

                Avoid too many return statements within this function.
                Open

                            if (!data) return stopDragover();
                Severity: Major
                Found in web/src/main/webapp/js/dnd-lists.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                            return false;
                  Severity: Major
                  Found in web/src/main/webapp/js/dnd-lists.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                              return false;
                    Severity: Major
                    Found in web/src/main/webapp/my-app/marketplace/services.js - About 30 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language