From ce19fb8682b20dfde4f53dc1115dc1a98edfcedf Mon Sep 17 00:00:00 2001 From: Durgesh1988 Date: Fri, 20 Jan 2017 12:49:48 +0530 Subject: [PATCH] CAT-2648/CAT-2649 Fixed --- .../sections/dashboard/bots/controller/botChefLogCtrl.js | 9 ++++++++- .../sections/dashboard/bots/controller/botLogsCtrl.js | 6 +++++- .../cloud-formation-blueprint.js | 4 ++++ server/app/services/settingsService.js | 8 ++++---- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/botChefLogCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/botChefLogCtrl.js index 880611f22..aaf671ca0 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/botChefLogCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/botChefLogCtrl.js @@ -85,7 +85,14 @@ }); }; chefLogData.createInstanceList = function (historyItem) { - var nodeIds =historyItem.nodeIds ? historyItem.nodeIds : historyItem.auditTrailConfig.nodeIds ; + var nodeIds = []; + if(historyItem.nodeIds){ + nodeIds = historyItem.nodeIds; + }else{ + for(var i = 0; i < historyItem.auditTrailConfig.nodeIdsWithActionLog.length;i++){ + nodeIds.push(historyItem.auditTrailConfig.nodeIdsWithActionLog[i].nodeId); + } + } var nodeIdWithActionLogs = []; var requestObj = { "instanceIds": nodeIds 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 a74ada9e6..c97c3dbd0 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js @@ -10,7 +10,11 @@ angular.module('library.bots',[]) .controller('botLogsCtrl',['$scope', '$rootScope', 'genericServices', 'workzoneServices', 'toastr', '$modalInstance', 'items', '$timeout', function ($scope, $rootScope, genSevs, workzoneServices, toastr, $modalInstance, items, $timeout) { $scope.botName = items.auditTrailConfig.name; - $scope.nodeIds = items.auditTrailConfig.nodeIds; + //$scope.nodeIds = items.auditTrailConfig.nodeIds; + $scope.nodeIds = []; + for(var i = 0; i < items.auditTrailConfig.nodeIdsWithActionLog.length;i++){ + $scope.nodeIds.push(items.auditTrailConfig.nodeIdsWithActionLog[i].nodeId); + } $scope.taskType = items.auditTrailConfig.executionType; $scope.nodeIdsWithActionLog = items.auditTrailConfig.nodeIdsWithActionLog; $scope.isBotLogsLoading = true; diff --git a/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js b/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js index 7b85924f1..e27df5516 100755 --- a/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js +++ b/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js @@ -549,6 +549,10 @@ CloudFormationBlueprintSchema.methods.launch = function (launchParams, callback) } }); if (nodeIdWithActionLogId.length === instances.length && launchParams.auditTrailId !== null) { + var nodeIds = []; + for(var i = 0; i < nodeIdWithActionLogId.length;i++){ + nodeIds.push(nodeIdWithActionLogId[i].nodeId); + } var resultTaskExecution = { "actionLogId": logsReferenceIds[1], "auditTrailConfig.nodeIdsWithActionLog": nodeIdWithActionLogId, diff --git a/server/app/services/settingsService.js b/server/app/services/settingsService.js index e9f0c79fb..d42b55139 100644 --- a/server/app/services/settingsService.js +++ b/server/app/services/settingsService.js @@ -334,8 +334,8 @@ settingsService.trackSettingWizard = function trackSettingWizard(id,orgId,callba } if (settingWizards !== null && settingWizards.currentStep && settingWizards.currentStep.nestedSteps && settingWizards.currentStep.name === 'Gallery Setup' - && settingWizards.nestedSteps[1].isCompleted === false) { - settingWizards.nestedSteps[0].isCompleted = false; + && settingWizards.currentStep.nestedSteps[1].isCompleted === false) { + settingWizards.currentStep.nestedSteps[0].isCompleted = false; settingWizard.updateSettingWizard(settingWizards, function (err, data) { if (err) { callback(err,null); @@ -356,8 +356,8 @@ settingsService.trackSettingWizard = function trackSettingWizard(id,orgId,callba } if (settingWizards !== null && settingWizards.currentStep && settingWizards.currentStep.nestedSteps && settingWizards.currentStep.name === 'Gallery Setup' - && settingWizards.nestedSteps[2].isCompleted === false) { - settingWizards.nestedSteps[1].isCompleted = false; + && settingWizards.currentStep.nestedSteps[2].isCompleted === false) { + settingWizards.currentStep.nestedSteps[1].isCompleted = false; settingWizard.updateSettingWizard(settingWizards, function (err, data) { if (err) { callback(err,null);