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..34c92ce8b 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -13,21 +13,18 @@ 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); } }; @@ -35,15 +32,23 @@ lib.gridOptions.data=[]; var param={ 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(); 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;