RLOpenCatalyst/core

View on GitHub

Showing 2,557 of 2,557 total issues

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

        $scope.showScheduledBots = function(resetPage) {
            $scope.clearSearchString();
            lib.summary();
            $scope.isBotLibraryPageLoading = true;
            $scope.showLoadRecord();
client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js on lines 500..531
client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js on lines 532..563

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 505.

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

        $scope.showBotsRunning = function(resetPage) {
            $scope.clearSearchString();
            lib.summary();
            $scope.isBotLibraryPageLoading = true;
            $scope.showLoadRecord();
client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js on lines 532..563
client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js on lines 564..595

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 505.

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

        $scope.showFailedBots = function(resetPage) {
            $scope.clearSearchString();
            lib.summary();
            $scope.isBotLibraryPageLoading = true;
            $scope.showLoadRecord();
client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js on lines 500..531
client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js on lines 564..595

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 505.

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

},{}],47:[function(_dereq_,module,exports){
    /*! JSON v3.2.6 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */
    ;(function (window) {
        // Convenience aliases.
        var getClass = {}.toString, isProperty, forEach, undef;
Severity: Major
Found in client/cat3/customlib/socket.io/socket.io.js - About 2 days to fix

    Function write has 536 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Terminal.prototype.write = function(data) {
            var l = data.length
                , i = 0
                , j
                , cs
    Severity: Major
    Found in client/cat3/customlib/terminal/terminal.js - About 2 days to fix

      File bootstrap-material-datetimepicker.js has 1033 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function ($, moment)
      {
          var pluginName = "bootstrapMaterialDatePicker";
          var pluginDataName = "plugin_" + pluginName;
      
      
      Severity: Major
      Found in client/cat3/customlib/dateTime/js/bootstrap-material-datetimepicker.js - About 2 days to fix

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

        angular.module('ui.bootstrap.collapse', []).directive('collapse', ['$animate', function($animate) {
                return {
                    link: function(scope, element, attrs) {
                        function expand() {
                            element.removeClass('collapse')
        Severity: Major
        Found in client/cat3/customlib/ui-bootstrap-custom-tpls-0.13.4.js and 1 other location - About 2 days to fix
        client/cat3/customlib/ui-bootstrap-custom-0.13.4.min.js on lines 9..67

        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 423.

        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

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

        angular.module('ui.bootstrap.collapse', [])
        
            .directive('collapse', ['$animate', function($animate) {
                return {
                    link: function(scope, element, attrs) {
        Severity: Major
        Found in client/cat3/customlib/ui-bootstrap-custom-0.13.4.min.js and 1 other location - About 2 days to fix
        client/cat3/customlib/ui-bootstrap-custom-tpls-0.13.4.js on lines 10..66

        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 423.

        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

        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

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

                      appDeployCreate.changeRepository = function(){
                          if(appDeployCreate.newEnt.serverType === 'docker') {
                              var repository=appDeployCreate.newEnt.repositoryIMG.split('/');
                              appDeployCreate.newEnt.repository=appDeployCreate.newEnt.repositoryIMG;
                              var tagRep='';
          client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 410..436

          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 380.

          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

                      blueprintCreation.changeRepository = function(){
                          if(blueprintCreation.newEnt.serverType === 'docker') {
                              var repository=blueprintCreation.newEnt.repositoryIMG.split('/');
                              blueprintCreation.newEnt.repository=blueprintCreation.newEnt.repositoryIMG;
                              var tagRep='';
          client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js on lines 136..162

          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 380.

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

              Terminal.prototype.keySelect = function(ev, key) {
                  this.showCursor();
          
                  if (this.searchMode || key === 'n' || key === 'N') {
                      return this.keySearch(ev, key);
          Severity: Major
          Found in client/cat3/customlib/terminal/terminal.js - About 2 days to fix

            Function 13 has 406 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"./socket":13,"engine.io-parser":25}],13:[function(_dereq_,module,exports){
                (function (global){
                    /**
                     * Module dependencies.
                     */
            Severity: Major
            Found in client/cat3/customlib/socket.io/socket.io.js - About 2 days to fix

              Function chefSelectorComponent has 395 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  window.chefSelectorComponent = window.chefSelectorComponent || function(
                      options) {
                      var lastFilterClass = '';
                      var defaultOptions = {
                          scopeElement: "body", //parent element which restrict the dom search scope

                File blueprintCreateCtrl.js has 822 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                (function (angular) {
                    "use strict";
                    angular.module('dashboard.design')
                        .controller('blueprintCreateCtrl',['$scope','$rootScope','$modal','toastr','$state', 'blueprintCreateService','responseFormatter','genericServices','confirmbox', function ($scope,$rootScope,$modal,toastr,$state,bpCreateSer,responseFormatter,genericServices,confirmbox) {
                            var blueprintCreation = this;

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

                              if (typeof (this.params.minDate) !== 'undefined' && this.params.minDate !== null)
                              {
                                  if (typeof (this.params.minDate) === 'string')
                                  {
                                      if (typeof (this.params.format) !== 'undefined' && this.params.format !== null)
                  client/cat3/customlib/dateTime/js/bootstrap-material-datetimepicker.js on lines 164..189

                  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 345.

                  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

                              if (typeof (this.params.maxDate) !== 'undefined' && this.params.maxDate !== null)
                              {
                                  if (typeof (this.params.maxDate) === 'string')
                                  {
                                      if (typeof (this.params.format) !== 'undefined' && this.params.format !== null)
                  client/cat3/customlib/dateTime/js/bootstrap-material-datetimepicker.js on lines 137..162

                  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 345.

                  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

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

                              var helper = {
                                  lastTimeStamp: '',
                                  getlastTimeStamp: function (logObj) {
                                      if (logObj instanceof Array && logObj.length) {
                                          var lastTime = logObj[logObj.length - 1].timestamp;
                  client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/chefLogCtrl.js on lines 32..65

                  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 333.

                  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

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

                              var helper = {
                                  lastTimeStamp: '',
                                  getlastTimeStamp: function (logObj) {
                                      if (logObj instanceof Array && logObj.length) {
                                          var lastTime = logObj[logObj.length - 1].timestamp;
                  client/cat3/src/partials/sections/dashboard/bots/controller/botChefLogCtrl.js on lines 33..66

                  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 333.

                  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

                  File datetime.js has 776 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  // https://github.com/Gillardo/bootstrap-ui-datetime-picker
                  // Version: 2.4.0
                  // Released: 2016-06-03
                  angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.position'])
                      .constant('uiDatetimePickerConfig', {
                  Severity: Major
                  Found in client/cat3/customlib/datetime.js - About 1 day to fix
                    Severity
                    Category
                    Status
                    Source
                    Language