From 9300fdcff8ffc839f8ddd33f859cac40bf4a8ce0 Mon Sep 17 00:00:00 2001 From: hrushikesh07 Date: Thu, 20 Oct 2016 16:27:21 +0530 Subject: [PATCH 1/3] Changed the launch type --- .../dashboard/bots/controller/libraryCtrl.js | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js index f0297f007..9e90257bd 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -13,37 +13,44 @@ multiSelect :false, }, columnDefs: [ - { name: 'type',field:'botType'}, - { name: 'name',field:'name'}, + { name: 'bots type',field:'botType'}, + { name: 'bots name',field:'name'}, { name: 'description',field:'shortDesc'}, - { name: 'run Bot' }, { name: 'history' }, { name: 'last run'}, - { name: 'bot Action',cellTemplate:''} + { name: 'bot Action',cellTemplate:''} ], data:[] }; $scope.launchInstance = function(lunch){ - if(lunch.botType === 'Task'){ + if(lunch.launcType === 'task'){ genSevs.executeTask(lunch); - } else if(lunch.botType === 'blueprint') { + } else if(lunch.launcType === 'bp') { genSevs.lunchBlueprint(lunch); } }; lib.int =function(){ lib.gridOptions.data=[]; var param={ - url:'/blueprints/serviceDelivery/?serviceDeliveryCheck=true' + //url:'/blueprints/serviceDelivery/?serviceDeliveryCheck=true' + url:'src/partials/sections/dashboard/bots/data/bp.json' }; genSevs.promiseGet(param).then(function (result) { - angular.extend(lib.gridOptions.data,result); + angular.forEach(result,function (val) { + angular.extend(val,{launcType:'bp'}); + lib.gridOptions.data.push(val); + }); }); var param2={ - url:'/tasks/serviceDelivery/?serviceDeliveryCheck=true' + // url:'/tasks/serviceDelivery/?serviceDeliveryCheck=true' + url:'src/partials/sections/dashboard/bots/data/t.json' }; genSevs.promiseGet(param2).then(function (resultTask) { - angular.extend(lib.gridOptions.data,resultTask); + angular.forEach(resultTask,function (val) { + angular.extend(val,{launcType:'task'}); + lib.gridOptions.data.push(val); + }); }); }; lib.int(); From 1139f195fd9b2b0b2ff0a36eaa49c9e859cb5445 Mon Sep 17 00:00:00 2001 From: hrushikesh07 Date: Thu, 20 Oct 2016 16:32:41 +0530 Subject: [PATCH 2/3] Changed the launch type --- .../sections/dashboard/bots/controller/libraryCtrl.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js index 9e90257bd..34c92ce8b 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -16,8 +16,6 @@ { name: 'bots type',field:'botType'}, { name: 'bots name',field:'name'}, { name: 'description',field:'shortDesc'}, - { name: 'history' }, - { name: 'last run'}, { name: 'bot Action',cellTemplate:''} ], data:[] @@ -33,8 +31,8 @@ lib.int =function(){ lib.gridOptions.data=[]; var param={ - //url:'/blueprints/serviceDelivery/?serviceDeliveryCheck=true' - url:'src/partials/sections/dashboard/bots/data/bp.json' + url:'/blueprints/serviceDelivery/?serviceDeliveryCheck=true' + //url:'src/partials/sections/dashboard/bots/data/bp.json' }; genSevs.promiseGet(param).then(function (result) { angular.forEach(result,function (val) { @@ -43,8 +41,8 @@ }); }); var param2={ - // url:'/tasks/serviceDelivery/?serviceDeliveryCheck=true' - url:'src/partials/sections/dashboard/bots/data/t.json' + url:'/tasks/serviceDelivery/?serviceDeliveryCheck=true' + // url:'src/partials/sections/dashboard/bots/data/t.json' }; genSevs.promiseGet(param2).then(function (resultTask) { angular.forEach(resultTask,function (val) { From 0f1380077dcf46477338e78a133d75eb871761e1 Mon Sep 17 00:00:00 2001 From: hrushikesh07 Date: Thu, 20 Oct 2016 17:28:51 +0530 Subject: [PATCH 3/3] BP id added --- .../dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 505484c33..eb3f7df3a 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 @@ -79,7 +79,7 @@ versionsList = bpItem.bp.blueprintConfig.infraManagerData.versionsList; versionOptional = versionsList[versionsList.length-1].ver; } - var selectedVersionBpId = bpItem.bp.selectedVersionBpId; + var selectedVersionBpId = bpItem.bp.selectedVersionBpId || bpItem._id; workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, envParams.env, bpItem.stackName,bpItem.domainName,bpItem.tagServer).then(function(bpLaunchResponse) { $scope.isBPLogsLoading = false; var launchingInstance;