diff --git a/client/cat3/main.html b/client/cat3/main.html
index 95f0d02cc..dce92b810 100644
--- a/client/cat3/main.html
+++ b/client/cat3/main.html
@@ -114,6 +114,7 @@
+
diff --git a/client/cat3/src/clientRoutes.js b/client/cat3/src/clientRoutes.js
index fca4c6c1e..527ec017d 100644
--- a/client/cat3/src/clientRoutes.js
+++ b/client/cat3/src/clientRoutes.js
@@ -36,7 +36,6 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe
url: "/workzone",
templateUrl: "src/partials/sections/dashboard/workzone/workzone.html",
controller: "workzoneCtrl",
- params:{filterView:{workzone:true}},
onEnter: function () {
},
onExit: function () {
@@ -58,7 +57,6 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe
url: "/design",
templateUrl: "src/partials/sections/dashboard/design/design.html",
controller: "designCtrl as desCtrl",
- params:{filterView:{design:true}},
resolve: {
auth: ["$q", function ($q) {
var deferred = $q.defer();
@@ -76,7 +74,6 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe
url: "/analytics/",
templateUrl: "src/partials/sections/dashboard/analytics/analytics.html",
controller: "analyticsCtrl as analytic",
- params:{filterView:{analytics:true}},
resolve: {
auth: ["$q", function ($q) {
var deferred = $q.defer();
@@ -95,7 +92,6 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe
url: "/bots",
templateUrl: "src/partials/sections/dashboard/bots/bots.html",
controller: "botsCtrl as bts",
- params:{filterView:{bots:true}},
resolve: {
auth: ["$q", function ($q) {
var deferred = $q.defer();
diff --git a/client/cat3/src/partials/globals/header/header.scss b/client/cat3/src/partials/globals/header/header.scss
index e52098f80..b56e0bb1d 100755
--- a/client/cat3/src/partials/globals/header/header.scss
+++ b/client/cat3/src/partials/globals/header/header.scss
@@ -19,8 +19,8 @@
cursor:pointer;
}
- .header-selected-item {
- color: #40BAF1;
+ .activeSection i {
+ color: #40BAF1 !important;
}
.header-logo-image {
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 b6822c1fd..fc7e3a947 100644
--- a/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js
@@ -113,7 +113,7 @@
};
$scope.executeBot=function(){
- if (items.botConfig && items.botConfig.botLinkedSubCategory === 'script') {
+ if (items.botConfig && items.botConfig.taskType === 'script') {
var checkParam = false;
if ($scope.scriptParamsFlag) {
for(var i =0; i<$scope.parameters.length; i++){
@@ -130,11 +130,10 @@
scriptParams = $scope.parameters;
}
}
- if (items.botConfig && items.botConfig.botLinkedSubCategory === 'chef') {
+ if (items.botConfig && items.botConfig.taskType === 'chef') {
cookbookAttributes = responseFormatter.formatSelectedCookbookAttributes($scope.chefattributes);
-
}
- if (items.botConfig && items.botConfig.botLinkedSubCategory === 'jenkins') {
+ if (items.botConfig && items.botConfig.taskType === 'jenkins') {
choiceParam = $scope.jenparams;
}
$scope.executeBot();
@@ -142,14 +141,14 @@
$scope.executeBot = function(){
var reqBody = {};
- if (items.botConfig && items.botConfig.botLinkedSubCategory === 'jenkins') {
+ if (items.botConfig && items.botConfig.taskType === 'jenkins') {
reqBody.choiceParam = choiceParam;
- } else if (items.botConfig && items.botConfig.botLinkedSubCategory === 'chef'){
+ } else if (items.botConfig && items.botConfig.taskType === 'chef'){
reqBody.tagServer = $scope.tagSerSelected;
if ($scope.chefAttributesFlag) {
reqBody.cookbookAttributes = cookbookAttributes;
}
- } else if (items.botConfig && items.botConfig.botLinkedSubCategory === 'script') {
+ } else if (items.botConfig && items.botConfig.taskType === 'script') {
reqBody.tagServer = $scope.tagSerSelected;
if ($scope.scriptParamsFlag) {
reqBody.scriptParams = scriptParams;
@@ -163,7 +162,7 @@
console.log(response);
$modalInstance.close(response.data);
$rootScope.$emit('BOTS_LIBRARY_REFRESH');
- helper.botLogModal(items._id, response.historyId, response.taskType);
+ helper.botLogModal(items.botId, response.historyId, response.taskType);
},
function (error) {
error = error.responseText || error;
@@ -173,34 +172,10 @@
toastr.error(error);
}
});
- /*workzoneServices.runTask(items._id, reqBody).then(
- function (response) {
- $modalInstance.close(response.data);
- $rootScope.$emit('BOTS_LIBRARY_REFRESH');
- $rootScope.$emit('WZ_ORCHESTRATION_REFRESH_CURRENT');
- },
- function (error) {
- error = error.responseText || error;
- if (error.message) {
- toastr.error(error.message);
- } else {
- toastr.error(error);
- }
- }
- );*/
};
$scope.cancel= function() {
$modalInstance.dismiss('cancel');
};
- }])/*.controller('botExecutionLogsCtrl',['$scope', 'items', '$modalInstance', function ($scope, items, $modalInstance) {
- $scope.botExecutionLogs = items;
- console.log(items);
-
-
-
- $scope.cancel= function() {
- $modalInstance.dismiss('cancel');
- };
- }])*/;
+ }]);
})(angular);
\ No newline at end of file
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 fadbd0720..8206a3c97 100644
--- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js
@@ -21,28 +21,30 @@
console.log($scope.paginationParams.sortBy);
$scope.initGrids = function(){
- $scope.botLibGridOptions={};
+ $scope.botLibGridOptions={
+ enableFiltering: false
+ };
$scope.botLibGridOptions.columnDefs= [
- { name:'Task Type', field:'botLinkedSubCategory' ,cellTemplate:'
'+
- '
'+
- '
'+
- '
',cellTooltip: true},
- { name: 'BOT Type',displayName: 'BOT Type',field:'botLinkedCategory',cellTooltip: true},
- { name: 'BOT Name',displayName: 'BOT Name',field:'botName',cellTooltip: true},
- { name: 'Category',field:'botCategory',cellTooltip: true},
- { name: 'description',field:'botDesc',cellTooltip: true},
- { name: 'Org',field:'masterDetails.orgName',cellTooltip: true},
- { name: 'Total Runs',field:'executionCount'},
- { name: 'BOT History',displayName: 'BOT History',cellTemplate:'NA'+
- ''},
- { name: 'BOT Info',displayName: 'BOT Info',cellTemplate:
- ''},
- { name: 'BOT Action',displayName: 'BOT Action',cellTemplate:
- '' +
- '' +
- ''
- }
- ]
+ { name:'Task Type', field:'botLinkedSubCategory' ,cellTemplate:'
'+
+ '
'+
+ '
'+
+ '
',cellTooltip: true},
+ { name: 'BOT Type',displayName: 'BOT Type',field:'botLinkedCategory',cellTooltip: true},
+ { name: 'BOT Name',displayName: 'BOT Name',field:'botName',cellTooltip: true},
+ { name: 'Category',field:'botCategory',cellTooltip: true},
+ { name: 'description',field:'botDesc',cellTooltip: true},
+ { name: 'Org',field:'masterDetails.orgName',cellTooltip: true},
+ { name: 'Total Runs',field:'executionCount'},
+ { name: 'BOT History',displayName: 'BOT History',cellTemplate:'NA'+
+ ''},
+ { name: 'BOT Info',displayName: 'BOT Info',cellTemplate:
+ ''},
+ { name: 'BOT Action',displayName: 'BOT Action',cellTemplate:
+ '' +
+ '' +
+ ''
+ }
+ ]
$scope.botLibGridOptions.data=[];
angular.extend($scope.botLibGridOptions,botLibraryUIGridDefaults.gridOption);
};
@@ -96,6 +98,26 @@
});
};
$scope.botLibraryGridView();
+ $scope.searchBotNameCategory = function() {
+ $scope.searchString = $scope.botLibrarySearch;
+ console.log($scope.searchString);
+ lib.gridOptions=[];
+ var param={
+ url:'/bots?page=1&pageSize=10&sortBy=' + $scope.paginationParams.sortBy +'&sortOrder=' + $scope.paginationParams.sortOrder
+ };
+ genSevs.promiseGet(param).then(function (result) {
+ $timeout(function() {
+ console.log(result);
+ $scope.botLibGridOptions.totalItems = result.metaData.totalRecords;
+ $scope.botLibGridOptions.data=result.bots;
+ }, 100);
+ $scope.isBotLibraryPageLoading = false;
+ }, function(error) {
+ $scope.isBotLibraryPageLoading = false;
+ console.log(error);
+ $scope.errorMessage = "No Records found";
+ });
+ };
var gridBottomSpace = 190;
$scope.gridHeight = workzoneUIUtils.makeTabScrollable('botLibraryPage') - gridBottomSpace;
$scope.launchInstance = function(launch){
@@ -153,7 +175,7 @@
console.log('Modal Dismissed at ' + new Date());
});
};
- $scope.botSchedule = function() {
+ $scope.botSchedule = function(bot) {
$modal.open({
templateUrl: 'src/partials/sections/dashboard/bots/view/botSchedule.html',
controller: 'botScheduleCtrl',
@@ -161,10 +183,7 @@
keyboard: false,
resolve: {
items: function () {
- return {
- chefJenkScriptTaskObj:$scope.chefJenkScriptTaskObj,
- type:$scope.type
- }
+ return bot
}
}
}).result.then(function (chefEventDetails) {
@@ -241,7 +260,7 @@
$scope.failedBotsselected = false;
lib.gridOptions.data=[];
var param={
- url:'/bots?actionStatus=running?page=1&pageSize=10&sortBy=' + $scope.paginationParams.sortBy +'&sortOrder=' + $scope.paginationParams.sortOrder
+ url:'/bots?actionStatus=running&page=1&pageSize=10&sortBy=' + $scope.paginationParams.sortBy +'&sortOrder=' + $scope.paginationParams.sortOrder
};
genSevs.promiseGet(param).then(function (result) {
$timeout(function() {
@@ -257,7 +276,7 @@
$scope.totalBotsSelected = false;
lib.gridOptions.data=[];
var param={
- url:'/bots?actionStatus=failed?page=1&pageSize=10&sortBy=' + $scope.paginationParams.sortBy +'&sortOrder=' + $scope.paginationParams.sortOrder
+ url:'/bots?actionStatus=failed&page=1&pageSize=10&sortBy=' + $scope.paginationParams.sortBy +'&sortOrder=' + $scope.paginationParams.sortOrder
};
genSevs.promiseGet(param).then(function (result) {
$timeout(function() {
@@ -287,6 +306,7 @@
};
}]).controller('botScheduleCtrl',['$scope', '$rootScope', 'genericServices', 'workzoneServices', 'toastr', '$modalInstance', 'items', '$timeout', function ($scope, $rootScope, genSevs, workzoneServices, toastr, $modalInstance, items, $timeout) {
console.log(items);
+ $scope.botId = items.botId;
$scope.defaultSelection = function() {
$scope.repeatsType = 'Minutes';//default selection.
$scope.schedulerStartOn=moment(new Date()).format('MM/DD/YYYY');
@@ -351,9 +371,7 @@
$scope.daysOfWeek = [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ];
$scope.monthOfYear = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
- $scope.cancel = function() {
- $modalInstance.dismiss('cancel');
- };
+
$scope.ok=function(){
$scope.eventParams = {
repeats: $scope.repeatsType,
@@ -366,7 +384,14 @@
selectedDayOfTheMonth: $scope.selectedDayOfTheMonth,
monthOfYear: $scope.selectedMonth
};
- $modalInstance.close($scope.eventParams);
+ var param={
+ url:'/bots/' + $scope.botId + '/scheduler',
+ reqBody: $scope.eventParams
+ };
+ genSevs.promisePut(param).then(function (response) {
+ $scope.botSummary = response;
+ $scope.totalSavedTimeForBots = parseInt($scope.botSummary.totalSavedTimeForBots);
+ });
};
$scope.cancel = function() {
@@ -386,25 +411,24 @@
$scope.taskHistoryChefGridOptions.data='taskHistoryChefData';
$scope.taskHistoryChefGridOptions.columnDefs = [
{ name:'Status',field:'status',cellTemplate:'
{{row.entity.status}}
', cellTooltip: true},
- { name:'Message', field: 'message',
- cellTemplate:'{{row.entity.message}}'},
{ name:'User',field:'user',cellTooltip: true},
{ name:'Logs',width: 70,
- cellTemplate:'
'},{ name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
+ cellTemplate:'
'},
+ { name:'Start Time',field:'startedOn',cellTemplate:'{{row.entity.startedOn | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
+ { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.endedOn | timestampToLocaleTime}}', cellTooltip: true},
+ { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.endedOn,row.entity.startedOn)}} mins'},
+ { name:'Manual Time',cellTemplate: '{{row.entity.auditTrailConfig.manualExecutionTime}} mins', cellTooltip: true},
+ { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.endedOn,row.entity.startedOn)}} mins' +
'NA', cellTooltip: true}
];
};
angular.extend($scope, {
taskHistoryChefListView: function() {
$scope.taskHistoryChefData = [];
- /*var param={
- url:'/bots/:$scope.botId/bots-history'
- };*/
- workzoneServices.getHistory(items.botId).then(function(response) {
+ var param={
+ url:'/bots/' + $scope.botId + '/bots-history'
+ };
+ genSevs.promiseGet(param).then(function (response) {
console.log(response);
$timeout(function() {
if(response.data){
@@ -419,6 +443,21 @@
$scope.errorMessage = "No Chef History Records found";
$scope.ischefTaskHistoryPageLoading = false;
});
+ /*workzoneServices.getHistory(items.botId).then(function(response) {
+ console.log(response);
+ $timeout(function() {
+ if(response.data){
+ $scope.taskHistoryChefData = response.data;
+ $scope.ischefTaskHistoryPageLoading = false;
+ }else if(response){
+ $scope.taskHistoryChefData = response;
+ $scope.ischefTaskHistoryPageLoading = false;
+ }
+ },100);
+ }, function(){
+ $scope.errorMessage = "No Chef History Records found";
+ $scope.ischefTaskHistoryPageLoading = false;
+ });*/
},
getExecutionTime: function(endTime, startTime) {
$scope.executionTimeinMS = endTime-startTime;
@@ -437,7 +476,6 @@
$scope.getExecutionTime();
$scope.getSavedTime();
};
- //$scope.initchef();
//UI Grid for chef Task ends
//UI Grid for jenkins Task starts
@@ -448,15 +486,15 @@
$scope.initJenkinsGrids = function(){
$scope.taskHistoryJenkinsGridOptions.data='taskHistoryJenkinsData';
$scope.taskHistoryJenkinsGridOptions.columnDefs = [
- { name:'Job Number',field:'buildNumber',cellTemplate:'{{row.entity.buildNumber}}', sort:{ direction: 'desc'}, cellTooltip: true},
+ { name:'Job Number',field:'auditTrailConfig.jenkinsBuildNumber',cellTemplate:'{{row.entity.auditTrailConfig.jenkinsBuildNumber}}', sort:{ direction: 'desc'}, cellTooltip: true},
{ name:'Job Output',cellTemplate:'',cellTooltip: true},
{ name:'Log Info',width: 90,cellTemplate:'',cellTooltip: true},
{ name:'Status',field:'status',cellTemplate:'{{row.entity.status.toUpperCase()}}
'},
- { name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}',cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}',cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
+ { name:'Start Time',field:'startedOn',cellTemplate:'{{row.entity.startedOn | timestampToLocaleTime}}',cellTooltip: true},
+ { name:'End Time',field:'endedOn',cellTemplate:'{{row.entity.endedOn | timestampToLocaleTime}}',cellTooltip: true},
+ { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.endedOn,row.entity.startedOn)}} mins'},
+ { name:'Manual Time',cellTemplate: '{{row.entity.auditTrailConfig.manualExecutionTime}} mins', cellTooltip: true},
+ { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.endedOn,row.entity.startedOn)}} mins' +
'NA', cellTooltip: true}
];
};
@@ -464,9 +502,9 @@
taskHistoryJenkinsListView: function() {
$scope.taskHistoryJenkinsData = [];
var param={
- url:'/bots/:$scope.botId/bots-history'
+ url:'/bots/' + $scope.botId + '/bots-history'
};
- workzoneServices.getHistory(items.botId).then(function(response) {
+ genSevs.promiseGet(param).then(function (response) {
console.log(response);
$timeout(function() {
if(response.data){
@@ -489,7 +527,6 @@
$scope.getExecutionTime();
$scope.getSavedTime();
};
- //$scope.initjenkins();
//UI Grid for jenkins Task ends
//UI Grid for script Task starts
@@ -501,26 +538,24 @@
$scope.taskHistoryScriptGridOptions.data='taskHistoryScriptData';
$scope.taskHistoryScriptGridOptions.columnDefs = [
{ name:'Status',field:'status',cellTemplate:'{{row.entity.status}}
', cellTooltip: true},
- { name:'Message', field: 'message',
- cellTemplate:'{{row.entity.message}}'},
{ name:'User',field:'user',cellTooltip: true},
{ name:'Logs',width: 70,
cellTemplate:'
'},
- { name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
+ { name:'Start Time',field:'startedOn',cellTemplate:'{{row.entity.startedOn | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
+ { name:'End Time',field:'endedOn',cellTemplate:'{{row.entity.endedOn | timestampToLocaleTime}}', cellTooltip: true},
+ { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.endedOn,row.entity.startedOn)}} mins'},
+ { name:'Manual Time',cellTemplate: '{{row.entity.auditTrailConfig.manualExecutionTime}} mins', cellTooltip: true},
+ { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.endedOn,row.entity.startedOn)}} mins' +
'NA', cellTooltip: true}
];
};
angular.extend($scope, {
taskHistoryScriptListView: function() {
$scope.taskHistoryScriptData = [];
- /*var param={
- url:'/bots/:$scope.botId/bots-history'
- };*/
- workzoneServices.getHistory(items.botId).then(function(response) {
+ var param={
+ url:'/bots/' + $scope.botId + '/bots-history'
+ };
+ genSevs.promiseGet(param).then(function (response) {
console.log(response);
$timeout(function() {
if(response.data){
@@ -543,7 +578,6 @@
$scope.getExecutionTime();
$scope.getSavedTime();
};
- //$scope.initscript();
//UI Grid for script Task ends
//UI Grid for Blueprint starts
@@ -555,26 +589,24 @@
$scope.botHistoryBlueprintGridOptions.data='botHistoryBlueprintData';
$scope.botHistoryBlueprintGridOptions.columnDefs = [
{ name:'Status',field:'status',cellTemplate:'{{row.entity.status}}
', cellTooltip: true},
- { name:'Message', field: 'message',
- cellTemplate:'{{row.entity.message}}'},
{ name:'User',field:'user',cellTooltip: true},
{ name:'Logs',width: 70,
cellTemplate:'
'},
- { name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
+ { name:'Start Time',field:'startedOn',cellTemplate:'{{row.entity.startedOn | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
+ { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true},
+ { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.endedOn,row.entity.startedOn)}} mins'},
+ { name:'Manual Time',cellTemplate: '{{row.entity.auditTrailConfig.manualExecutionTime}} mins', cellTooltip: true},
+ { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.endedOn,row.entity.startedOn)}} mins' +
'NA', cellTooltip: true}
];
};
angular.extend($scope, {
botHistoryBlueprintListView: function() {
$scope.botHistoryBlueprintData = [];
- /*var param={
- url:'/bots/:$scope.botId/bots-history'
- };*/
- workzoneServices.getHistory(items.botId).then(function(response) {
+ var param={
+ url:'/bots/' + $scope.botId + '/bots-history'
+ };
+ genSevs.promiseGet(param).then(function (response) {
console.log(response);
$timeout(function() {
if(response.data){
@@ -597,7 +629,6 @@
$scope.getExecutionTime();
$scope.getSavedTime();
};
- //$scope.initblueprint();
//UI Grid for Blueprint ends
$scope.bot=items;
@@ -605,8 +636,6 @@
case 'chef' :
$scope.ischefTaskHistoryPageLoading = true;
$scope.isjenkinsTaskHistoryPageLoading = false;
- $scope.iscompositeTaskHistoryPageLoading = false;
- $scope.ispuppetTaskHistoryPageLoading = false;
$scope.isscriptTaskHistoryPageLoading = false;
$scope.isBlueprintBotHistoryPageLoading = false;
$scope.initchef();
@@ -614,8 +643,6 @@
case 'jenkins' :
$scope.ischefTaskHistoryPageLoading = false;
$scope.isjenkinsTaskHistoryPageLoading = true;
- $scope.iscompositeTaskHistoryPageLoading = false;
- $scope.ispuppetTaskHistoryPageLoading = false;
$scope.isscriptTaskHistoryPageLoading = false;
$scope.isBlueprintBotHistoryPageLoading = false;
$scope.initjenkins();
@@ -623,8 +650,6 @@
case 'script':
$scope.ischefTaskHistoryPageLoading = false;
$scope.isjenkinsTaskHistoryPageLoading = false;
- $scope.iscompositeTaskHistoryPageLoading = false;
- $scope.ispuppetTaskHistoryPageLoading = false;
$scope.isscriptTaskHistoryPageLoading = true;
$scope.isBlueprintBotHistoryPageLoading = false;
$scope.initscript();
@@ -632,8 +657,6 @@
case 'instance_launch':
$scope.ischefTaskHistoryPageLoading = false;
$scope.isjenkinsTaskHistoryPageLoading = false;
- $scope.iscompositeTaskHistoryPageLoading = false;
- $scope.ispuppetTaskHistoryPageLoading = false;
$scope.isscriptTaskHistoryPageLoading = false;
$scope.isBlueprintBotHistoryPageLoading = true;
$scope.initblueprint();
@@ -641,18 +664,19 @@
}
$scope.historyLogs=function(hist) {
+ console.log(hist);
var modalInstance = $modal.open({
animation: true,
- templateUrl: 'src/partials/sections/dashboard/workzone/orchestration/popups/orchestrationLog.html',
- controller: 'orchestrationLogCtrl as orchLogCtrl',
+ templateUrl: 'src/partials/sections/dashboard/bots/view/botExecutionLogs.html',
+ controller: 'botExecutionLogsCtrl as botExecLogCtrl',
backdrop : 'static',
keyboard: false,
resolve: {
items: function() {
return {
- taskId : hist.taskId,
+ taskId : hist.auditId,
historyId : hist._id,
- taskType:hist.taskType
+ taskType:hist.auditTrailConfig.executionType
};
}
}
@@ -667,5 +691,21 @@
$modalInstance.dismiss('cancel');
};
}
- ]);
+ ]).controller('botHistoryLogsCtrl',['$scope', 'items', '$modalInstance', function ($scope, items, $modalInstance) {
+ $scope.botInfo = items;
+ console.log(items);
+ $scope.parentItemDetail=items;
+ var botHistLogsCtrl={};
+ botHistLogsCtrl.taskLogType=items.taskType;
+ botHistLogsCtrl.cancelAll=function(){
+ $scope.$broadcast ('closeWindow');
+ $modalInstance.dismiss('cancel');
+ return $scope.close;
+ };
+ return botHistLogsCtrl;
+
+ $scope.cancel= function() {
+ $modalInstance.dismiss('cancel');
+ };
+ }]);
})(angular);
\ No newline at end of file
diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/botExecutionLogs.html b/client/cat3/src/partials/sections/dashboard/bots/view/botExecutionLogs.html
index e2e8e4d80..8a6fc9461 100644
--- a/client/cat3/src/partials/sections/dashboard/bots/view/botExecutionLogs.html
+++ b/client/cat3/src/partials/sections/dashboard/bots/view/botExecutionLogs.html
@@ -19,10 +19,6 @@
-
diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/botHistory.html b/client/cat3/src/partials/sections/dashboard/bots/view/botHistory.html
index 82a6e9c5a..20c586642 100644
--- a/client/cat3/src/partials/sections/dashboard/bots/view/botHistory.html
+++ b/client/cat3/src/partials/sections/dashboard/bots/view/botHistory.html
@@ -14,23 +14,22 @@
- {{taskHistoryChefData.length}}
-
+
No Data Found
diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/botHistoryLogs.html b/client/cat3/src/partials/sections/dashboard/bots/view/botHistoryLogs.html
new file mode 100644
index 000000000..ceccb2d25
--- /dev/null
+++ b/client/cat3/src/partials/sections/dashboard/bots/view/botHistoryLogs.html
@@ -0,0 +1,31 @@
+
diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/editParams.html b/client/cat3/src/partials/sections/dashboard/bots/view/editParams.html
index ce379adb3..30ab2a830 100644
--- a/client/cat3/src/partials/sections/dashboard/bots/view/editParams.html
+++ b/client/cat3/src/partials/sections/dashboard/bots/view/editParams.html
@@ -82,8 +82,8 @@ Add Parameters:
| Key |
- Value |
Description |
+ Value |
@@ -91,8 +91,8 @@ Add Parameters:
{{param}}
|
- |
|
+ |
diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/library.html b/client/cat3/src/partials/sections/dashboard/bots/view/library.html
index 3cc456283..e8ce2e69d 100644
--- a/client/cat3/src/partials/sections/dashboard/bots/view/library.html
+++ b/client/cat3/src/partials/sections/dashboard/bots/view/library.html
@@ -61,5 +61,20 @@
No data Available
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
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 929669e17..4141b54a0 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
@@ -10,7 +10,7 @@
angular.module('workzone.blueprint')
.controller('blueprintLaunchCtrl', ['$scope', '$rootScope', '$modalInstance', 'bpItem', 'workzoneServices', 'workzoneEnvironment', 'instanceLogs', function($scope, $rootScope, $modalInstance, bpItem, workzoneServices, workzoneEnvironment, instanceLogs) {
console.log(bpItem);
- if(bpItem.bp.botLinkedCategory === 'Blueprint') {
+ if(bpItem.bp.blueprintType) {
$scope.isBPLogsLoading = true;
$scope.isNewInstanceLogsPromise = false;
var helper = {
@@ -44,9 +44,9 @@
}
else{
isSuccess = true;
- if (bpItem.bp.botLinkedCategory === 'aws_cf') {
+ if (bpItem.bp.blueprintType === 'aws_cf') {
msgStr = 'Stack Id : ' + $scope.launchResponse.stackId + '. You can view your stack in cloudformation tab';
- } else if (bpItem.bp.botLinkedCategory === 'azure_arm') {
+ } else if (bpItem.bp.blueprintType === 'azure_arm') {
msgStr = 'Deployment Id : ' + $scope.launchResponse.armId + '. You can view your deployment in ARM tab';
} else {
msgStr = 'Instance Id : ';
@@ -75,7 +75,6 @@
var envParams = workzoneEnvironment.getEnvParams();
var versionsList = [];
var versionOptional;
- versionOptional = 0.1;
if(bpItem.bp.blueprintConfig){
if(bpItem.bp.blueprintConfig.infraManagerData && bpItem.bp.blueprintConfig.infraManagerData.versionsList){
versionsList = bpItem.bp.blueprintConfig.infraManagerData.versionsList;
diff --git a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js
index 63815827d..b8b4e9818 100644
--- a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js
@@ -34,17 +34,16 @@
}
genericServices.getTreeNew().then(function (envData) {
angular.forEach(envData,function(val){
- console.log(val);
var orgID,bgID,projID;
if(items.organizationId === undefined) {
- orgID = (items.masterDetails.orgId)?items.masterDetails.orgId:items.organization.id;
- bgID = (items.masterDetails.bgId)?items.masterDetails.bgId:items.businessGroup.id;
- projID = (items.masterDetails.projectId)?items.masterDetails.projectId:items.project.id;
+ orgID = (items.orgId)?items.orgId:items.organization.id;
+ bgID = (items.bgId)?items.bgId:items.businessGroup.id;
+ projID = (items.projectId)?items.projectId:items.project.id;
$scope.getMonitorList(orgID);
} else {
- orgID = items.organizationId || items.masterDetails.orgId;
- bgID = items.businessGroupId || items.masterDetails.bgId;
- projID = items.projectId || items.masterDetails.projectId;
+ orgID = items.organizationId;
+ bgID = items.businessGroupId;
+ projID = items.projectId;
$scope.getMonitorList(orgID);
}
if(val.rowid === orgID){
@@ -66,7 +65,9 @@
}
});
}
+
});
+
});
$scope.stackName='';
$scope.domainName='';
@@ -75,7 +76,7 @@
$modalInstance.dismiss('cancel');
};
$scope.launchBP = function() {
- if((items.orgId === undefined) && (items.masterDetails && items.masterDetails.orgId === undefined)){
+ if(items.orgId === undefined){
var compBlue={
"blueprintId": (items.id)?items.id:items._id,
"environmentId": $scope.envSeleted
@@ -87,9 +88,9 @@
toastr.error(data.message, 'Error');
});
} else {
- if(items.blueprintType === "aws_cf" || items.botLinkedSubCategory === "aws_cf") {
+ if(items.blueprintType === "aws_cf") {
$scope.showCFTInputs = true;
- }else if(items.blueprintType === "azure_arm" || items.botLinkedSubCategory === "azure_arm") {
+ }else if(items.blueprintType === "azure_arm") {
$scope.showARMInputs = true;
}else if(items.domainNameCheck === true || items.domainNameCheck === "true") {
$scope.showBlueprintInputs = true;
diff --git a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js
index b6f842ce7..f6d484af3 100644
--- a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js
@@ -30,7 +30,6 @@
$scope.initGrids = function(){
$scope.orcheGridOptions=angular.extend(orchestrationUIGridDefaults.gridOption,{
data : 'tabData',
- enableFiltering: true,
columnDefs : [
{ name:'Job Type', width:100,field:'taskType' ,cellTemplate:'
'+
'
'+
diff --git a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/orchestrationHistoryCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/orchestrationHistoryCtrl.js
index 287cc8a24..99e7c6183 100644
--- a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/orchestrationHistoryCtrl.js
+++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/orchestrationHistoryCtrl.js
@@ -25,11 +25,7 @@
{ name:'User',field:'user',cellTooltip: true},
{ name:'Logs',width: 70,
cellTemplate:'
'},{ name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
- 'NA', cellTooltip: true}
+ { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true}
];
};
angular.extend($scope, {
@@ -49,23 +45,11 @@
$scope.errorMessage = "No Chef History Records found";
$scope.ischefTaskHistoryPageLoading = false;
});
- },
- getExecutionTime: function(endTime, startTime) {
- $scope.executionTimeinMS = endTime-startTime;
- $scope.executionTime = $scope.executionTimeinMS/(60000);
- return +(Math.round($scope.executionTime + "e+1") + "e-1");
- },
- getSavedTime: function(endTime, startTime) {
- var executionTime = $scope.getExecutionTime(endTime, startTime);
- $scope.savedTime = items.manualExecutionTime-executionTime;
- return $scope.savedTime;
- }
+ }
});
$scope.initchef = function(){
$scope.initChefGrids();
$scope.taskHistoryChefListView();
- $scope.getExecutionTime();
- $scope.getSavedTime();
};
//UI Grid for chef Task ends
@@ -82,11 +66,7 @@
{ name:'Log Info',width: 90,cellTemplate:'',cellTooltip: true},
{ name:'Status',field:'status',cellTemplate:'{{row.entity.status.toUpperCase()}}
'},
{ name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}',cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}',cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
- 'NA', cellTooltip: true}
+ { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}',cellTooltip: true}
];
};
angular.extend($scope, {
@@ -111,8 +91,6 @@
$scope.initjenkins = function(){
$scope.initJenkinsGrids();
$scope.taskHistoryJenkinsListView();
- $scope.getExecutionTime();
- $scope.getSavedTime();
};
//UI Grid for jenkins Task ends
@@ -215,11 +193,8 @@
{ name:'Logs',width: 70,
cellTemplate:'
'},
{ name:'Start Time',field:'timestampStarted',cellTemplate:'{{row.entity.timestampStarted | timestampToLocaleTime}}', sort:{ direction: 'desc'}, cellTooltip: true},
- { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true},
- { name:'Execution Time',cellTemplate:'{{grid.appScope.getExecutionTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins'},
- { name:'Manual Time',cellTemplate: '{{row.entity.manualExecutionTime}} mins', cellTooltip: true},
- { name:'Saved Time',cellTemplate:'{{grid.appScope.getSavedTime(row.entity.timestampEnded,row.entity.timestampStarted)}} mins' +
- 'NA', cellTooltip: true}
+ { name:'End Time',field:'timestampEnded',cellTemplate:'{{row.entity.timestampEnded | timestampToLocaleTime}}', cellTooltip: true}
+
];
};
angular.extend($scope, {
@@ -244,8 +219,6 @@
$scope.initscript = function(){
$scope.initScriptGrids();
$scope.taskHistoryScriptListView();
- $scope.getExecutionTime();
- $scope.getSavedTime();
};
//UI Grid for script Task ends
diff --git a/server/app/routes/v1.0/routes_bots.js b/server/app/routes/v1.0/routes_bots.js
index ba2fd4c5a..3a0ec1cdb 100644
--- a/server/app/routes/v1.0/routes_bots.js
+++ b/server/app/routes/v1.0/routes_bots.js
@@ -111,6 +111,7 @@ module.exports.setRoutes = function(app, sessionVerificationFunc) {
if (err) {
return res.status(500).send(err);
} else {
+ data.botId=req.params.botId;
return res.status(200).send(data);
}
})