luyadev/luya-module-admin

View on GitHub

Showing 503 of 503 total issues

Function withAngular has 786 lines of code (exceeds 25 allowed). Consider refactoring.
Open

(function withAngular(angular, navigator) {

  'use strict';

  var A_DAY_IN_MILLISECONDS = 86400000
Severity: Major
Found in src/resources/vendorlibs/angularjs-datepicker/angular-datepicker.js - About 3 days to fix

    File directives.js has 1434 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Directive to generate e chart diagrams.
     *
     * uses echarts.js component.
     *
    Severity: Major
    Found in src/resources/js/directives.js - About 3 days to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      angular.module("ngLocale", [], ["$provide", function($provide) {
      var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
      function getDecimals(n) {
        n = n + '';
        var i = n.indexOf('.');
      Severity: Major
      Found in src/resources/angular-i18n/angular-locale_nl.js and 1 other location - About 3 days to fix
      src/resources/angular-i18n/angular-locale_it.js on lines 2..143

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 599.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      angular.module("ngLocale", [], ["$provide", function($provide) {
      var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
      function getDecimals(n) {
        n = n + '';
        var i = n.indexOf('.');
      Severity: Major
      Found in src/resources/angular-i18n/angular-locale_it.js and 1 other location - About 3 days to fix
      src/resources/angular-i18n/angular-locale_nl.js on lines 2..143

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 599.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

      angular.module("ngLocale", [], ["$provide", function($provide) {
      var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
      function getDecimals(n) {
        n = n + '';
        var i = n.indexOf('.');
      Severity: Major
      Found in src/resources/angular-i18n/angular-locale_en.js and 2 other locations - About 3 days to fix
      src/resources/angular-i18n/angular-locale_cn.js on lines 2..128
      src/resources/angular-i18n/angular-locale_de.js on lines 2..128

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 576.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

      angular.module("ngLocale", [], ["$provide", function($provide) {
      var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
      function getDecimals(n) {
        n = n + '';
        var i = n.indexOf('.');
      Severity: Major
      Found in src/resources/angular-i18n/angular-locale_cn.js and 2 other locations - About 3 days to fix
      src/resources/angular-i18n/angular-locale_de.js on lines 2..128
      src/resources/angular-i18n/angular-locale_en.js on lines 2..128

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 576.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

      angular.module("ngLocale", [], ["$provide", function($provide) {
      var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
      function getDecimals(n) {
        n = n + '';
        var i = n.indexOf('.');
      Severity: Major
      Found in src/resources/angular-i18n/angular-locale_de.js and 2 other locations - About 3 days to fix
      src/resources/angular-i18n/angular-locale_cn.js on lines 2..128
      src/resources/angular-i18n/angular-locale_en.js on lines 2..128

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 576.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function datepickerDirective has 658 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          , datepickerDirective = function datepickerDirective($window, $compile, $locale, $filter, $interpolate, $timeout) {
      
            var linkingFunction = function linkingFunction($scope, element, attr) {
      
              $scope.today = new Date();
      Severity: Major
      Found in src/resources/vendorlibs/angularjs-datepicker/angular-datepicker.js - About 3 days to fix

        Function linkingFunction has 633 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              var linkingFunction = function linkingFunction($scope, element, attr) {
        
                $scope.today = new Date();
        
                //get child input
        Severity: Major
        Found in src/resources/vendorlibs/angularjs-datepicker/angular-datepicker.js - About 3 days to fix

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

          
          
              zaa.controller("DefaultDashboardObjectController", ['$scope', '$http', '$sce', function($scope, $http, $sce) {
          
                  $scope.data;
          Severity: Major
          Found in src/resources/js/controllers.js - About 2 days to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_fr.js and 1 other location - About 2 days to fix
            src/resources/angular-i18n/angular-locale_fa.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 424.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_fa.js and 1 other location - About 2 days to fix
            src/resources/angular-i18n/angular-locale_fr.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 424.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_hu.js and 3 other locations - About 2 days to fix
            src/resources/angular-i18n/angular-locale_el.js on lines 2..125
            src/resources/angular-i18n/angular-locale_es.js on lines 2..125
            src/resources/angular-i18n/angular-locale_tr.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 405.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_tr.js and 3 other locations - About 2 days to fix
            src/resources/angular-i18n/angular-locale_el.js on lines 2..125
            src/resources/angular-i18n/angular-locale_es.js on lines 2..125
            src/resources/angular-i18n/angular-locale_hu.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 405.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_es.js and 3 other locations - About 2 days to fix
            src/resources/angular-i18n/angular-locale_el.js on lines 2..125
            src/resources/angular-i18n/angular-locale_hu.js on lines 2..125
            src/resources/angular-i18n/angular-locale_tr.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 405.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_el.js and 3 other locations - About 2 days to fix
            src/resources/angular-i18n/angular-locale_es.js on lines 2..125
            src/resources/angular-i18n/angular-locale_hu.js on lines 2..125
            src/resources/angular-i18n/angular-locale_tr.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 405.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_vi.js and 1 other location - About 2 days to fix
            src/resources/angular-i18n/angular-locale_id.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 387.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            angular.module("ngLocale", [], ["$provide", function($provide) {
            var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
            $provide.value("$locale", {
              "DATETIME_FORMATS": {
                "AMPMS": [
            Severity: Major
            Found in src/resources/angular-i18n/angular-locale_id.js and 1 other location - About 2 days to fix
            src/resources/angular-i18n/angular-locale_vi.js on lines 2..125

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 387.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function controller has 417 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        function ($scope, $http, $filter, $timeout, $q, HtmlStorage, cfpLoadingBar, Upload, ServiceFoldersData, ServiceFilesData, LuyaLoading, AdminToastService, ServiceFoldersDirectoryId, ServiceAdminTags, ServiceQueueWaiting) {
            
                            // ServiceFoldersData inheritance
            
                            $scope.foldersData = ServiceFoldersData.data;
            Severity: Major
            Found in src/resources/js/directives.js - About 2 days to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                  $('#secureForm').submit(function (e) {
                      $('#errorsSecureContainer').hide();
                      $('.login-btn[type="submit"]').attr('disabled', true);
                      $('.login-spinner').show();
                      $('.login-btn-label').hide();
              Severity: Major
              Found in src/resources/js/login.js and 1 other location - About 2 days to fix
              src/resources/js/login.js on lines 92..126

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 365.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language