RLOpenCatalyst/core

View on GitHub
client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js

Summary

Maintainability
F
1 wk
Test Coverage

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;

    Function submit has 183 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    submit : function() {
                        var blueprintCreateJSON = {
                            templateComponents:'component0',
                            dockercontainerpathstitle: '',
                            dockerlaunchparameters: '',

      Function getProviderImage has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  blueprintCreation.getProviderImage = function(){
                      $scope.isImageLoading = true;
                      $scope.isRegionKeyPairLoading = true;
                      bpCreateSer.getImageLists(blueprintCreation.newEnt.providers).then(function(data){
                          if(blueprintCreation.newEnt.providers){

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

                    blueprintCreation.getRepository = function(){
                        if (blueprintCreation.newEnt.nexusDockerServer){
                            blueprintCreation.newEnt.serverType = blueprintCreation.serverRepos[blueprintCreation.newEnt.nexusDockerServer].configType;
                        } else {
                            blueprintCreation.newEnt.serverType = '';

          Function setButtons has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          setButtons : function() {
                              if (index === steps.length - 1) {
                                  $scope.isFirstOpen = true;
                                  $scope.isOrgOpen = true;
                                  $scope.isNextVisible = false;

            Avoid deeply nested control flow statements.
            Open

                                    if(blueprintCreation.newEnt.providers){
                                        blueprintCreation.getFlavourProviders = data;
                                    }

              Avoid deeply nested control flow statements.
              Open

                                          if(blueprintCreation.newEnt.vpcId === Object.keys(subnetList[i])[0]){
                                              blueprintCreation.subnetListingAzure = subnetList[i][blueprintCreation.newEnt.vpcId];
                                          }

                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

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

                                if(blueprintCreation.newEnt.serverType === 'nexus'){
                                    // create group select box options
                                    blueprintCreation.groupOptions = blueprintCreation.serverRepos[blueprintCreation.newEnt.nexusDockerServer].groupid;
                                    bpCreateSer.getNexusRepoList(blueprintCreation.serverRepos[blueprintCreation.newEnt.nexusDockerServer].rowid,$rootScope.organObject[blueprintCreation.newEnt.orgList].businessGroups[blueprintCreation.newEnt.bgList].projects[blueprintCreation.newEnt.projectList].rowId).then(function (data) {
                                        blueprintCreation.repositoryOptions = data;
                client/cat3/src/partials/sections/dashboard/workzone/application/popups/deployNewAppCtrl.js on lines 62..83

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

                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.getVersions= function(){
                                $scope.isLoadingNexusVersion = true;
                                blueprintCreation.requestData.artifactId = blueprintCreation.newEnt.artifact;
                                bpCreateSer.getNexusVersions(blueprintCreation.requestData).then(function (versionsResult) {
                                    blueprintCreation.versionsOptions = versionsResult;
                client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js on lines 185..192

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

                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.forEach(artifactsResult,function(val){
                                        artVerObj[val.version]=val;
                                        blueprintCreation.artifactsVersion[val.artifactId]=artVerObj;
                                        if (blueprintCreation.artifactsOptions.indexOf(val.artifactId) === -1) {
                                            blueprintCreation.artifactsOptions.push(val.artifactId);
                client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js on lines 175..181

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

                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($scope.providerType === 'AWS'){
                                    bpCreateSer.getAWSProviderWithId(blueprintCreation.newEnt.providers).then(function(data){
                                        if(blueprintCreation.newEnt.providers){
                                            blueprintCreation.regionListing = data.providerRegion;
                                            blueprintCreation.keyPairListing = data.keyPairs;
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 211..232

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

                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

                                } else if($scope.providerType === 'AZURE'){
                                    bpCreateSer.getAzureLocations(blueprintCreation.newEnt.providers).then(function(data){
                                        if(blueprintCreation.newEnt.providers){
                                            blueprintCreation.regionListingAzure = data.locationList;
                                            blueprintCreation.instanceSizeListingAzure = data.instanceSizeList;
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 203..232

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

                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

                                            var docker = {
                                                "image": blueprintCreation.newEnt.repositoryIMG,
                                                "containerName": blueprintCreation.newEnt.ContNameId,
                                                "containerPort": blueprintCreation.newEnt.contPort,
                                                "hostPort": blueprintCreation.newEnt.hostPort,
                client/cat3/src/partials/sections/dashboard/workzone/application/popups/deployNewAppCtrl.js on lines 209..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 92.

                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 ii =0;ii<blueprintCreation.securityGroupListing.length;ii++){
                                            if(blueprintCreation.securityGroupListing[ii]._isChecked){
                                                blueprintCreateJSON.securityGroupIds.push(blueprintCreation.securityGroupListing[ii].GroupId);
                                            }
                                        }
                client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 359..363
                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 4 locations. Consider refactoring.
                Open

                                        blueprintCreation.instanceCount = function(max, step) {
                                            step = step || 1;
                                            var input = [];
                                            for (var i = 1; i <= max; i += step) {
                                                input.push(i);
                client/cat3/src/partials/sections/dashboard/bots/controller/botScheduleCtrl.js on lines 83..90
                client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEventCtrl.js on lines 74..81
                client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEventCtrl.js on lines 82..89

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

                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

                                    bpCreateSer.getProviderDataStore(blueprintCreation.newEnt.providers).then(function(data){
                                        if(blueprintCreation.newEnt.providers){
                                            blueprintCreation.dataStore = data.datastores;
                                            $scope.isRegionKeyPairLoading = false;
                                        }
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 526..531

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

                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

                                bpCreateSer.getProviderResourceGroup(blueprintCreation.newEnt.providers).then(function(data){
                                    if(blueprintCreation.newEnt.providers){
                                        blueprintCreation.resourceGroupListing = data.value;
                                        $scope.isResourceGroupLoading = false;
                                    }
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 220..225

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

                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

                                if (blueprintCreation.newEnt.nexusDockerServer){
                                    blueprintCreation.newEnt.serverType = blueprintCreation.serverRepos[blueprintCreation.newEnt.nexusDockerServer].configType;
                                } else {
                                    blueprintCreation.newEnt.serverType = '';
                                }
                client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js on lines 105..109
                client/cat3/src/partials/sections/dashboard/workzone/application/popups/deployNewAppCtrl.js on lines 56..60

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

                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

                                    $modal.open({
                                        animation: true,
                                        templateUrl: 'src/partials/sections/dashboard/design/view/popups/addDockerTemplate.html',
                                        controller: 'addDockerTemplateCtrl',
                                        backdrop: 'static',
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 670..686
                client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js on lines 175..195

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

                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

                                blueprintCreation.requestData={
                                    nexus:blueprintCreation.serverRepos[blueprintCreation.newEnt.nexusDockerServer].rowid,
                                    repositories:blueprintCreation.newEnt.repository,
                                    group:blueprintCreation.newEnt.groupId
                                };
                client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js on lines 166..170
                client/cat3/src/partials/sections/dashboard/workzone/application/popups/deployNewAppCtrl.js on lines 116..120

                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

                            var index = 0, // points to the current step in the steps array
                                steps = $scope.steps = [{
                                    'isDisplayed': true,
                                    'name': 'choose templates',
                                    'title': 'Choose Templates'
                client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/dockerLaunchParamsCtrl.js on lines 18..27

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

                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

                                    bpCreateSer.getNexusRepoList(blueprintCreation.serverRepos[blueprintCreation.newEnt.nexusDockerServer].rowid,$rootScope.organObject[blueprintCreation.newEnt.orgList].businessGroups[blueprintCreation.newEnt.bgList].projects[blueprintCreation.newEnt.projectList].rowId).then(function (data) {
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 721..721

                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

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

                                    $modal.open({
                                        animation: true,
                                        templateUrl: 'src/partials/sections/dashboard/workzone/blueprint/popups/dockerParams.html',
                                        controller: 'dockerParamsCtrl',
                                        backdrop: 'static',
                client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/dockerLaunchParamsCtrl.js on lines 239..244

                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

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

                                        projectId:$rootScope.organObject[blueprintCreation.newEnt.orgList].businessGroups[blueprintCreation.newEnt.bgList].projects[blueprintCreation.newEnt.projectList].rowId,
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 389..389

                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

                                    bpCreateSer.getDockerList().then(function(data){
                                        blueprintCreation.serverRepos = blueprintCreation.serverRepos.concat(data);
                                    });
                client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js on lines 96..98

                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

                            blueprintCreation.enableAppDeploy = function() {
                                if(blueprintCreation.newEnt.projectList) {
                                    $scope.showRepoServerName = true;
                                } else {
                                    $scope.showRepoServerName = false;
                client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 243..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

                                removeAppUrl : function(appUrl) {
                                    var idx = blueprintCreation.appUrlList.indexOf(appUrl);
                                    blueprintCreation.appUrlList.splice(idx,1);
                                },
                client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js on lines 167..170
                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 2 locations. Consider refactoring.
                Open

                                    bpCreateSer.getInstanceType().then(function(data){
                                        if(blueprintCreation.newEnt.images){
                                            blueprintCreation.instanceType = data;
                                            $scope.isInstanceTypeLoading = false;
                                        }
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 310..315

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

                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

                                    bpCreateSer.postSecurityGroups(blueprintCreation.newEnt.vpcId,blueprintCreation.newEnt.providers,blueprintCreation.newEnt.region).then(function(data){
                                        if(blueprintCreation.newEnt.vpcId){
                                            blueprintCreation.securityGroupListing = data;
                                            $scope.isSecurityGroupLoading = false;
                                        }
                client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js on lines 245..250

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

                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