From a446bd5a213385be24e4bcf8b3a84b035933bd8f Mon Sep 17 00:00:00 2001 From: Divakar Konakalla Date: Fri, 25 Nov 2016 17:32:55 +0530 Subject: [PATCH 1/2] Resolved JShint errors. --- .../analytics/controller/capacityCtrl.js | 2 +- .../bots/controller/audittrailCtrl.js | 2 +- .../dashboard/bots/controller/botLogsCtrl.js | 3 +- .../bots/controller/editParamsCtrl.js | 1 - .../sections/dashboard/design/aDesignCtrl.js | 4 +-- .../design/controllers/blueprintCreateCtrl.js | 34 +++++++++---------- .../design/controllers/createCompositeCtrl.js | 2 +- .../orchestrationUpdateChefRunlistCtrl.js | 12 +++---- .../popups/controller/scheduleCtrl.js | 4 +-- .../blueprint/popups/blueprintLaunchCtrl.js | 2 -- .../workzone/instance/instanceCtrl.js | 1 - .../instance/manage/controlPanelCtrl.js | 4 +-- 12 files changed, 33 insertions(+), 38 deletions(-) diff --git a/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js b/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js index bf87b50fa..bbc80f290 100644 --- a/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/analytics/controller/capacityCtrl.js @@ -165,7 +165,7 @@ capaCtr.capaGridOptions.columnDefs.push({ name: keyChild, field: 'capacity.AWS.services.' + keyChild - }) + }); angular.forEach(result.splitUpCapacities[viewType], function (valBar) { var chVal = ''; if (valBar.capacity.AWS.services[keyChild]) { diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/audittrailCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/audittrailCtrl.js index 1877a1e9c..2237353a2 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/audittrailCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/audittrailCtrl.js @@ -57,7 +57,7 @@ keyboard: false, resolve: { items: function() { - return hist + return hist; } } }); diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js index fc621101e..57d1ca9f3 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js @@ -47,7 +47,6 @@ var requestObj = { "instanceIds": nodeIds }; - var bluePrintJob = false; workzoneServices.postRetrieveDetailsForInstanceNames(requestObj).then(function (response) { var _jobInstances = response.data; for (var k = 0; k < $scope.nodeIdsWithActionLog.length; k++) { @@ -81,6 +80,6 @@ $scope.cancel = function() { $modalInstance.dismiss('cancel'); - } + }; }]); })(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js index 8d8895967..1454f81c4 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js @@ -70,7 +70,6 @@ $scope.jenkinsparams = items.taskConfig.parameterized; $scope.scriptparams = items.taskConfig.scriptDetails; $scope.parameters=['']; - var taskData={}; var cookbookAttributes = []; var scriptParams = []; var choiceParam = {}; diff --git a/client/cat3/src/partials/sections/dashboard/design/aDesignCtrl.js b/client/cat3/src/partials/sections/dashboard/design/aDesignCtrl.js index a167a9146..8ff45cb85 100644 --- a/client/cat3/src/partials/sections/dashboard/design/aDesignCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/design/aDesignCtrl.js @@ -56,7 +56,7 @@ return deferred.promise; }] } - }) + }); }]).filter('inArray',['$filter', function($filter){ return function(list, arrayFilter, element){ if(arrayFilter){ @@ -126,7 +126,7 @@ $rootScope.$emit('BP_BLUEPRINTS_REFRESH_CURRENT'); return genericServices.promiseGet(params); } - } + }; design.providersList(); return design; }]); diff --git a/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js b/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js index d4910138c..37e580897 100755 --- a/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js @@ -113,7 +113,7 @@ blueprintCreation.getImages(); } else { blueprintCreation.templateListing(); - }; + } blueprintCreation.getOperatingSytems = function(){ $scope.isOSLoading = true; @@ -155,13 +155,13 @@ blueprintCreation.changeImageOS = function(){ blueprintCreation.newEnt.providers = null; blueprintCreation.providerListing = []; - blueprintCreation.newEnt.images = null + blueprintCreation.newEnt.images = null; blueprintCreation.imageListing = []; blueprintCreation.instanceType = []; blueprintCreation.regionListing = null; blueprintCreation.keyPairListing = []; blueprintCreation.regionListingAzure = []; - blueprintCreation.newEnt.vpcId = null + blueprintCreation.newEnt.vpcId = null; blueprintCreation.vpcListing = []; blueprintCreation.subnetListing = []; blueprintCreation.newEnt.subnetId = null; @@ -273,7 +273,7 @@ } } } - }; + } }; blueprintCreation.postSubnets = function() { @@ -389,14 +389,14 @@ bpCreateSer.getRepoList(bpCreate.serverRepos[bpCreate.newEnt.nexusDockerServer].rowid).then(function (repositoryResult) { $scope.isLoadingNexus = false; blueprintCreation.repositoryOptions = repositoryResult.data[0].repositories.docker; - if(blueprintCreation.repositoryOptions.length == 0){ + if(blueprintCreation.repositoryOptions.length === 0){ blueprintCreation.errorMsg= { text: "Repository is not defined", type: "warning", repository:true, role:"tooltip", positions:"bottom" - } + }; } }); } @@ -460,9 +460,9 @@ blueprintCreation.getRepositoryDetails = function() { if(bpCreate.newEnt.nexusDockerRepo.configType === 'nexus') { - + console.log('nexus'); } - } + }; blueprintCreation.selectServer = function() { if(blueprintCreation.newEnt.nexusDockerRepo) { @@ -483,8 +483,8 @@ blueprintCreation.getRegionLists = function() { bpCreateSer.getRegionLists().then(function(data){ blueprintCreation.getRegionLists = data; - }) - } + }); + }; blueprintCreation.getTemplateParameters = function() { $scope.cftTemplate = $scope.templateSelected; @@ -508,13 +508,13 @@ blueprintCreation.hideVMEvals = function() { $scope.isVMEvalsVisible = false; - } + }; blueprintCreation.checkForResource = function() { if(blueprintCreation.newEnt.armModelResources !==null){ $scope.isVMEvalsVisible = true; } - } + }; blueprintCreation.getResourceGroups = function() { $scope.isResourceGroupLoading = true; @@ -546,7 +546,7 @@ $scope.updateCookbook = function() { genericServices.editRunlist($scope.chefrunlist,$scope.cookbookAttributes); - } + }; $rootScope.$on('WZ_ORCHESTRATION_REFRESH_CURRENT', function(event,reqParams) { $scope.chefrunlist = reqParams.list; @@ -764,7 +764,7 @@ "repoName": blueprintCreation.repositoryOptions[blueprintCreation.newEnt.repositoryInd].name, "artifactId": blueprintCreation.newEnt.artifact, "groupId": blueprintCreation.newEnt.groupId - } + }; blueprintCreateJSON.nexus = nexus; }else{ var docker = { @@ -792,7 +792,7 @@ var parameterObj = { ParameterKey: key, ParameterValue: value.Default - } + }; cftParameters.push(parameterObj); blueprintCreateJSON.cftStackParameters = cftParameters; }); @@ -817,7 +817,7 @@ ParameterKey: key, ParameterValue: value.value //type: value.type - } + }; cftParameters.push(parameterObj); blueprintCreateJSON.cftStackParameters = cftParameters; }); @@ -830,7 +830,7 @@ username: blueprintCreation.getAzureVMDetails[i].username, password: blueprintCreation.getAzureVMDetails[i].password //runlist:[] - } + }; blueprintCreateJSON.cftInstances = instanceObj; } diff --git a/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js b/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js index c70f46bb9..2b4d766b4 100755 --- a/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js @@ -74,7 +74,7 @@ createCBP.newEnt.org =$rootScope.organNewEnt.org.rowid; createCBP.newEnt.buss=$rootScope.organNewEnt.buss.rowid; createCBP.newEnt.proj=$rootScope.organNewEnt.proj.rowId; - }; + } $scope.blueprintList = []; angular.forEach(createCBP.SelectedBPList, function(val){ var blueprintObj={ diff --git a/client/cat3/src/partials/sections/dashboard/popups/controller/orchestrationUpdateChefRunlistCtrl.js b/client/cat3/src/partials/sections/dashboard/popups/controller/orchestrationUpdateChefRunlistCtrl.js index efc8e99d0..f9f9b6488 100644 --- a/client/cat3/src/partials/sections/dashboard/popups/controller/orchestrationUpdateChefRunlistCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/popups/controller/orchestrationUpdateChefRunlistCtrl.js @@ -19,7 +19,7 @@ $scope.allCBAttributes = []; $scope.editRunListAttributes = []; - $scope.getCookBookListForOrg = function(getCookBooks) { + $scope.getCookBookListForOrg = function() { var p = workzoneEnvironment.getEnvParams(); genericServices.getTreeNew().then(function (orgs) { $scope.organObject=orgs; @@ -33,7 +33,7 @@ } else { param = { url: '/organizations/' + $scope.organObject[0].orgid + '/chefRunlist' - } + }; } genericServices.promiseGet(param).then(function (result) { $scope.getCookBooks = result; @@ -41,11 +41,11 @@ if(p){ params = { url: '/d4dMasters/org/' + p.org + '/templateType/SoftwareStack/templates' - } + }; }else { params = { url: '/d4dMasters/org/' + $scope.organObject[0].orgid + '/templateType/SoftwareStack/templates' - } + }; } genericServices.promiseGet(params).then(function (result) { $scope.getTemplates = result; @@ -78,11 +78,11 @@ $scope.isOrchestrationUpdateChefRunLoading = false; $scope.init(); }); - } + }; $scope.getCookBookListForOrg(); function registerUpdateEvent(obj) { obj.addListUpdateListener('updateList', $scope.updateAttributeList); - }; + } $scope.init = function () { $timeout(function () { diff --git a/client/cat3/src/partials/sections/dashboard/popups/controller/scheduleCtrl.js b/client/cat3/src/partials/sections/dashboard/popups/controller/scheduleCtrl.js index 443a19070..369cb178c 100644 --- a/client/cat3/src/partials/sections/dashboard/popups/controller/scheduleCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/popups/controller/scheduleCtrl.js @@ -27,7 +27,7 @@ sch.interval[i].days.splice(sch.interval[i].days.indexOf(d),1); } if(sch.interval[i].days.length >0){ - sch.interval[i].daySelect=1 + sch.interval[i].daySelect=1; } else{ sch.interval[i].daySelect=''; } @@ -44,7 +44,7 @@ var params={ url:'/instances/'+sch.instanceIds[0] //url:'src/partials/sections/dashboard/workzone/data/oneIns.json' - } + }; genericServices.promiseGet(params).then(function (result) { sch.isScheduled=result.isScheduled; sch.schedulerStartOn=moment(result.schedulerStartOn).format('MM/DD/YYYY'); diff --git a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js index ee04b891a..140d5f3e9 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js @@ -136,8 +136,6 @@ $scope.launchResponse = {error:message}; $scope.launchMessage = messageHelper.launchMessage(); }); - } else { - } } ]); diff --git a/client/cat3/src/partials/sections/dashboard/workzone/instance/instanceCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/instance/instanceCtrl.js index a13dc1d31..7c8f1210f 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/instance/instanceCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/instance/instanceCtrl.js @@ -250,7 +250,6 @@ so that it gets replaced with instanceIP*/ helper.setHostToIp(result.data.instances); $scope.tabData = $scope.instanceList; - console.log($scope.instanceList); if ($scope.totalCards > $scope.paginationParams.pageSize) { $scope.cardsAvailable = true; } else { diff --git a/client/cat3/src/partials/sections/dashboard/workzone/instance/manage/controlPanelCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/instance/manage/controlPanelCtrl.js index 755cfba78..caabfde42 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/instance/manage/controlPanelCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/instance/manage/controlPanelCtrl.js @@ -77,7 +77,7 @@ var params={ url:'/instances/'+cpInstance._id //url:'src/partials/sections/dashboard/workzone/data/oneIns.json' - } + }; genericServices.promiseGet(params).then(function (result) { $scope.schedule={ instanceIds:[cpInstance._id], @@ -98,7 +98,7 @@ $scope.schedule.interval[i].days.splice($scope.schedule.interval[i].days.indexOf(d),1); } if($scope.schedule.interval[i].days.length >0){ - $scope.schedule.interval[i].daySelect=1 + $scope.schedule.interval[i].daySelect=1; } else{ $scope.schedule.interval[i].daySelect=''; } From 1b4022f5d8d1a4f4715c3750b4cc61a3502cb512 Mon Sep 17 00:00:00 2001 From: Divakar Konakalla Date: Fri, 25 Nov 2016 17:43:28 +0530 Subject: [PATCH 2/2] resolved jshint error --- .../cat3/src/partials/sections/dashboard/genericServices.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cat3/src/partials/sections/dashboard/genericServices.js b/client/cat3/src/partials/sections/dashboard/genericServices.js index 754495528..bf52eb924 100644 --- a/client/cat3/src/partials/sections/dashboard/genericServices.js +++ b/client/cat3/src/partials/sections/dashboard/genericServices.js @@ -275,8 +275,8 @@ } } }) - .result.then(function(selectedItem) { - //$scope.selected = selectedItem; + .result.then(function() { + }, function() { });