RLOpenCatalyst/core

View on GitHub
client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js

Summary

Maintainability
F
6 days
Test Coverage

File newTaskCtrl.js has 681 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Copyright (C) Relevance Lab Private Limited- All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 * Written by Relevance UI Team,
 * Aug 2015

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

                    ok: function () {
                        //these values are common across all task types
                        var taskJSON={};
                        if($scope.checkBotType){
                            taskJSON = {

      Function addTaskEvent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      addTaskEvent : function() {
                          $modal.open({
                              templateUrl: 'src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEvent.html',
                              controller: 'addChefJobEventCtrl',
                              backdrop: 'static',

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

                    $scope.allInstances=function(){
                        allInstances.then(function (response) {
                            var data, selectorList = [],
                                optionList = [];
                            if (response.data) {

          Avoid too many return statements within this function.
          Open

                                      return false;

            Avoid too many return statements within this function.
            Open

                                        return false;

              Avoid too many return statements within this function.
              Open

                                          return false;

                Avoid too many return statements within this function.
                Open

                                            return false;

                  Avoid too many return statements within this function.
                  Open

                                              return false;

                    Avoid too many return statements within this function.
                    Open

                                                return false;

                      Avoid too many return statements within this function.
                      Open

                                                  return false;

                        Avoid too many return statements within this function.
                        Open

                                                    return false;

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

                                              if (items.taskType && items.taskType === "chef" || items.taskType && items.taskType === "script") {
                                                  for (var j = 0; j < items.taskConfig.nodeIds.length; j++) {
                                                      for (var i = 0; i < data.length; i++) {
                                                          if (items.taskConfig.nodeIds[j] === data[i]._id) {
                                                              selectorList.push(data[i]);
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 526..536

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

                          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 (items.taskType && items.taskType === "composite") {
                                              for (var j = 0; j < items.taskConfig.assignTasks.length; j++) {
                                                  for (var i = 0; i < data.length; i++) {
                                                      if (items.taskConfig.assignTasks[j] === data[i]._id) {
                                                          selectorList.push(data[i]);
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 564..574

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

                          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

                                                  for (var pi = 0; pi < $scope.puppetInstanceList.length; pi++) {
                                                      if ($scope.puppetInstanceList[pi]._isNodeSelected) {
                                                          taskJSON.nodeIds.push($scope.puppetInstanceList[pi]._id);
                                                      }
                                                  }
                          client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 865..869
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 359..363

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

                          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

                                                  for(var bi = 0; bi < $scope.chefBluePrintList.length; bi++){
                                                      if ($scope.chefBluePrintList[bi]._isBlueprintSelected) {
                                                          taskJSON.blueprintIds.push($scope.chefBluePrintList[bi]._id);
                                                      }
                                                  }
                          client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 865..869
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 393..397

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

                          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

                                              $modal.open({
                                                  templateUrl: 'src/partials/sections/dashboard/workzone/orchestration/popups/addJobLinks.html',
                                                  controller: 'addJobLinksCtrl',
                                                  backdrop: 'static',
                                                  keyboard: false,
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js on lines 199..214

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

                          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

                                              instanceSelector = new factory({
                                                  scopeElement: '.component_for_instances',
                                                  optionList: responseFormatter.formatInstanceList(optionList),
                                                  selectorList: responseFormatter.formatInstanceList(selectorList),
                                                  isSortList: true,
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 539..547

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

                          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

                                          compositeSelector = new factory({
                                              scopeElement: '#component_for_composite',
                                              optionList: responseFormatter.formatTaskList(optionList),
                                              selectorList: responseFormatter.formatTaskList(selectorList),
                                              isSortList: true,
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 577..585

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

                          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.toggleAllScripts = function() {
                                          var toggleStatusScript = $scope.isAllScriptSelected;
                                          angular.forEach($scope.scriptTaskList, function(itm){ itm._isScriptSelected = toggleStatusScript;});
                                      };
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 32..35
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 46..49

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

                          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.toggleAll = function() {
                                          var toggleStatus = $scope.isAllSelected;
                                          angular.forEach($scope.chefInstanceList, function(itm){ itm._isNodeSelected = toggleStatus;});
                                      };
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 46..49
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 53..56

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

                          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.toggleAllScriptInstance = function() {
                                          var toggleStatusInstance = $scope.isAllInstanceScriptSelected;
                                          angular.forEach($scope.chefInstanceList, function(itm){ itm._isNodeSelected = toggleStatusInstance; });
                                      };
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 32..35
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 53..56

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

                          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 (selectedList && selectedList.length) {
                                                      for (var i = 0; i < selectedList.length; i++) {
                                                          taskJSON.assignTasks.push(selectedList[i].data._id);
                                                      }
                                                  } else {
                          client/cat3/src/partials/sections/dashboard/workzone/instance/manage/templates/cpInfoCtrl.js on lines 212..216

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

                          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

                                      $scope.botStatus = function() {
                                          if($scope.checkBotType){
                                              $scope.checkBotStatus = true;
                                          }else{
                                              $scope.checkBotStatus = false;
                          client/cat3/src/partials/sections/dashboard/workzone/instance/popups/InstanceImportByIpCtrl.js on lines 38..44

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

                          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

                                      $scope.optionToggled = function(){
                                          $scope.isAllSelected = $scope.chefInstanceList.every(function(itm){ return  itm._isNodeSelected; });
                                      };
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 50..52

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

                          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

                                      $scope.optionInstanceToggled = function(){
                                          $scope.isAllInstanceScriptSelected = $scope.chefInstanceList.every(function(itm){ return  itm._isNodeSelected; });
                                      };
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 43..45

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

                          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

                                                  workzoneServices.getJenkinsServerJobList($scope.jenkinsServerSelect).then(function (response) {
                                                      if (response.data) {
                                                          $scope.jenkinServerJobList = response.data;
                                                      } else {
                                                          $scope.jenkinServerJobList = response;
                          client/cat3/src/partials/sections/dashboard/workzone/cloudFormation/popups/stackInfoCtrl.js on lines 26..33

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

                          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 (taskJSON.nodeIds.length && taskJSON.role) {
                                                      $scope.inputValidationMsg='Please choose either nodes or blueprints or role, not all';
                                                      $scope.taskSaving = false;
                                                      return false;
                                                  }
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 381..385

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

                          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 (taskJSON.blueprintIds.length && taskJSON.role) {
                                                      $scope.inputValidationMsg='Please choose either nodes or blueprints or role, not all';
                                                      $scope.taskSaving = false;
                                                      return false;
                                                  }
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 375..379

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

                          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

                                          selectTaskCheckbox: function(){
                                              if($scope._isEventSelected.flag) {
                                                  $scope.showAddTask = true;
                                              } else {
                                                  $scope.showAddTask = false;
                          client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 345..351

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

                          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

                                          removeScriptParams: function (scriptObject,params) {
                                              var idx = $scope.scriptParamsObj[scriptObject].indexOf(params);
                                              $scope.scriptParamsObj[scriptObject].splice(idx,1);
                                          },
                          client/cat3/src/partials/sections/dashboard/workzone/blueprint/blueprintCtrl.js on lines 246..249

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

                          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

                                          removeJenkinsParams: function (params) {
                                              var idx = $scope.jenkinsParamsList.indexOf(params);
                                              $scope.jenkinsParamsList.splice(idx,1);
                                          },
                          client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 665..668
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 180..183

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

                          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

                                          removeJobLink: function (jobLink) {
                                              var idx = $scope.jobResultURL.indexOf(jobLink);
                                              $scope.jobResultURL.splice(idx,1);
                                          },
                          client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 665..668
                          client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 167..170

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

                          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

                          There are no issues that match your filters.

                          Category
                          Status