sensu/uchiwa-web

View on GitHub

Showing 15 of 77 total issues

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

'use strict';

var controllerModule = angular.module('uchiwa.controllers', []);

/**
Severity: Major
Found in js/controllers.js - About 2 days to fix

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

    'use strict';
    
    var serviceModule = angular.module('uchiwa.services', []);
    
    /**
    Severity: Major
    Found in js/services.js - About 1 day to fix

      File filters.js has 390 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      'use strict';
      
      var filterModule = angular.module('uchiwa.filters', []);
      
      filterModule.filter('arrayLength', function() {
      Severity: Minor
      Found in js/filters.js - About 5 hrs to fix

        File factories.js has 329 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        'use strict';
        
        var factoryModule = angular.module('uchiwa.factories', []);
        
        factoryModule.factory('authInterceptor', function ($cookieStore, $q, $location) {
        Severity: Minor
        Found in js/factories.js - About 3 hrs to fix

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

          module.exports = function (grunt) {
            require('load-grunt-tasks')(grunt);
            require('time-grunt')(grunt);
          
            grunt.initConfig({
          Severity: Major
          Found in Gruntfile.js - About 3 hrs to fix

            Function addEntry has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $scope.addEntry = function() {
                  // Verify the datacenter
                  if (angular.isUndefined($scope.options.datacenter) || $scope.options.datacenter === '') {
                    Notification.error('Please select a datacenter');
                    return false;
            Severity: Major
            Found in js/controllers.js - About 2 hrs to fix

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

                  $scope.ok = function() {
                    // Verify that the datacenter was added
                    if (angular.isUndefined($scope.datacenter.selected) || $scope.datacenter.selected === '') {
                      Notification.error('Please select a datacenter');
                      return false;
              Severity: Minor
              Found in js/controllers.js - About 1 hr to fix

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

                    link: function (scope) {
                      scope.display = false;
                      scope.userSubscriptions = [];
                
                      var verifySubscriptions = function() {
                Severity: Minor
                Found in js/directives.js - About 1 hr to fix

                  Avoid too many return statements within this function.
                  Open

                          return false;
                  Severity: Major
                  Found in js/controllers.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                              return false;
                    Severity: Major
                    Found in js/controllers.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return false;
                      Severity: Major
                      Found in js/controllers.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                  return false;
                        Severity: Major
                        Found in js/controllers.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                    return false;
                          Severity: Major
                          Found in js/controllers.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return false;
                            Severity: Major
                            Found in js/controllers.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return false;
                              Severity: Major
                              Found in js/controllers.js - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language