RLOpenCatalyst/core

View on GitHub
client/cat3/customlib/angular-datatables.js

Summary

Maintainability
F
1 wk
Test Coverage

File angular-datatables.js has 893 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * angular-datatables - v0.5.0
 * https://github.com/l-lin/angular-datatables
 * License: MIT
 */
Severity: Major
Found in client/cat3/customlib/angular-datatables.js - About 2 days to fix

    Function dtPromiseRenderer has 109 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function dtPromiseRenderer($q, $timeout, $log, DTRenderer, DTRendererService, DTInstanceFactory) {
        /**
         * Renderer for displaying with a promise
         * @param options the options
         * @returns {{options: *}} the renderer
    Severity: Major
    Found in client/cat3/customlib/angular-datatables.js - About 4 hrs to fix

      Function create has 104 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function create(options) {
              var _oTable;
              var _loadedPromise = null;
              var _$elem;
      
      
      Severity: Major
      Found in client/cat3/customlib/angular-datatables.js - About 4 hrs to fix

        Function dataTable has 99 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function dataTable($q, $http, DTRendererFactory, DTRendererService, DTPropertyUtil) {
            compileDirective.$inject = ['tElm'];
            ControllerDirective.$inject = ['$scope'];
            return {
                restrict: 'A',
        Severity: Major
        Found in client/cat3/customlib/angular-datatables.js - About 3 hrs to fix

          Function dtPropertyUtil has 83 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function dtPropertyUtil($q) {
              return {
                  overrideProperties: overrideProperties,
                  deleteProperty: deleteProperty,
                  resolveObjectPromises: resolveObjectPromises,
          Severity: Major
          Found in client/cat3/customlib/angular-datatables.js - About 3 hrs to fix

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

            function initAngularDataTables() {
                if ($.fn.DataTable.Api) {
                    /**
                     * Register an API to destroy a DataTable without detaching the tbody so that we can add new data
                     * when rendering with the "Angular way".
            Severity: Major
            Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

              Function dtNGRenderer has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererService, DTInstanceFactory) {
                  /**
                   * Renderer for displaying the Angular way
                   * @param options
                   * @returns {{options: *}} the renderer
              Severity: Major
              Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

                Function dtOptionsBuilder has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function dtOptionsBuilder() {
                    /**
                     * The wrapped datatables options class
                     * @param sAjaxSource the ajax source to fetch the data
                     * @param fnPromise the function that returns a promise to fetch the data
                Severity: Major
                Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

                  Function dtAjaxRenderer has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function dtAjaxRenderer($q, $timeout, DTRenderer, DTRendererService, DT_DEFAULT_OPTIONS, DTInstanceFactory) {
                      /**
                       * Renderer for displaying with Ajax
                       * @param options the options
                       * @returns {{options: *}} the renderer
                  Severity: Major
                  Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

                    Function ControllerDirective has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function ControllerDirective($scope) {
                            var _dtInstance;
                            var vm = this;
                            vm.buildOptionsPromise = buildOptionsPromise;
                            vm.render = render;
                    Severity: Major
                    Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

                      Function create has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function create(options) {
                              var _staticHTML;
                              var _oTable;
                              var _$elem;
                              var _parentScope;
                      Severity: Major
                      Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

                        Function create has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function create(options) {
                                var _oTable;
                                var _$elem;
                                var renderer = Object.create(DTRenderer);
                                renderer.name = 'DTAjaxRenderer';
                        Severity: Major
                        Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

                          Function dtRendererService has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function dtRendererService(DTLoadingTemplate) {
                              var $loading = angular.element(DTLoadingTemplate.html);
                              var plugins = [];
                              var rendererService = {
                                  getLoadingElem: getLoadingElem,
                          Severity: Major
                          Found in client/cat3/customlib/angular-datatables.js - About 2 hrs to fix

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

                            function dtColumnBuilder() {
                                /**
                                 * The wrapped datatables column
                                 * @param mData the data to display of the column
                                 * @param sTitle the sTitle of the column title to display in the DOM
                            Severity: Minor
                            Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

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

                              function dtDefaultOptions() {
                                  var options = {
                                      bootstrapOptions: {},
                                      setLanguageSource: setLanguageSource,
                                      setLanguage: setLanguage,
                              Severity: Minor
                              Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

                                Function buildOptionsPromise has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        function buildOptionsPromise() {
                                            var defer = $q.defer();
                                            // Build options
                                            $q.all([
                                                $q.when($scope.dtOptions),
                                Severity: Minor
                                Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

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

                                  function dtDefaultRenderer($q, DTRenderer, DTRendererService, DTInstanceFactory) {
                                      return {
                                          create: create
                                      };
                                  
                                  
                                  Severity: Minor
                                  Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

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

                                        function resolveObjectPromises(obj, excludedPropertiesName) {
                                            var defer = $q.defer(),
                                                promises = [],
                                                resolvedObj = {},
                                                excludedProp = excludedPropertiesName || [];
                                    Severity: Minor
                                    Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

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

                                      function dtInstanceFactory() {
                                          var DTInstance = {
                                              reloadData: reloadData,
                                              changeData: changeData,
                                              rerender: rerender
                                      Severity: Minor
                                      Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

                                        Function create has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            function create(options) {
                                                var _oTable;
                                                var _$elem;
                                                var renderer = Object.create(DTRenderer);
                                                renderer.name = 'DTDefaultRenderer';
                                        Severity: Minor
                                        Found in client/cat3/customlib/angular-datatables.js - About 1 hr to fix

                                          Function dtNGRenderer has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                          function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererService, DTInstanceFactory) {
                                          Severity: Major
                                          Found in client/cat3/customlib/angular-datatables.js - About 50 mins to fix

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

                                            function dtPromiseRenderer($q, $timeout, $log, DTRenderer, DTRendererService, DTInstanceFactory) {
                                            Severity: Minor
                                            Found in client/cat3/customlib/angular-datatables.js - About 45 mins to fix

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

                                              function dtAjaxRenderer($q, $timeout, DTRenderer, DTRendererService, DT_DEFAULT_OPTIONS, DTInstanceFactory) {
                                              Severity: Minor
                                              Found in client/cat3/customlib/angular-datatables.js - About 45 mins to fix

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

                                                function dataTable($q, $http, DTRendererFactory, DTRendererService, DTPropertyUtil) {
                                                Severity: Minor
                                                Found in client/cat3/customlib/angular-datatables.js - About 35 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                          return DTDefaultRenderer.create();
                                                  Severity: Major
                                                  Found in client/cat3/customlib/angular-datatables.js - About 30 mins to fix

                                                    There are no issues that match your filters.

                                                    Category
                                                    Status