diff --git a/client/cat3/main.html b/client/cat3/main.html index cbae61cdf..876f4b049 100644 --- a/client/cat3/main.html +++ b/client/cat3/main.html @@ -175,6 +175,7 @@ + diff --git a/client/cat3/src/factory/chefDataFormatterService.js b/client/cat3/src/factory/chefDataFormatterService.js index a95acf332..ac4874db4 100644 --- a/client/cat3/src/factory/chefDataFormatterService.js +++ b/client/cat3/src/factory/chefDataFormatterService.js @@ -101,6 +101,19 @@ } return list; }, + formatInstanceList: function (obj) { + var list = []; + for (var i = 0; i < obj.length; i++) { + if (obj[i].instanceState === "running" || obj[i].instanceState === "pending" || obj[i].instanceState === "unknown") { + list.push({ + className: 'chef', + value: obj[i].name, + data: obj[i]._id + }); + } + } + return list; + }, formatRunListFromComponent: function (nodesList) { var reqBody = { cookbooks: [], diff --git a/client/cat3/src/partials/global.scss b/client/cat3/src/partials/global.scss index fa856dad7..5b15ebc15 100644 --- a/client/cat3/src/partials/global.scss +++ b/client/cat3/src/partials/global.scss @@ -724,6 +724,10 @@ accordion .panel-heading { margin-top: 15px; } +.margintop10 { + margin-top: 10px; +} + .marginleft15 { margin-left: 15px; } @@ -1365,20 +1369,22 @@ label { line-height: 34; font-size: 13px !important; } - .btnDay{ - border-radius: 15px; - margin: 0 3px; - height: 24px; - width: 24px; - font-weight: 600; - padding: 1px 5px; - } - .activeDay { - background: #0B5475 !important; - } +} + +.btnDay{ + border-radius: 15px; + margin: 0 3px; + height: 24px; + width: 24px; + font-weight: 600; + padding: 1px 5px; } +.activeDay { + background: #0B5475 !important; +} + .form-control-date{ display: block; width: 100%; diff --git a/client/cat3/src/partials/sections/dashboard/bots/bots.scss b/client/cat3/src/partials/sections/dashboard/bots/bots.scss index e4177a055..8a1d84145 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/bots.scss +++ b/client/cat3/src/partials/sections/dashboard/bots/bots.scss @@ -20,16 +20,18 @@ height: 50px; } -#botLibraryPage { +#botAuditTrailPage { + .ui-grid-column-menu-button { + display: none; + } +} + +#botLibraryPage, #botAuditTrailPage { .page-name { font-size: 18px; margin: 5px 0 5px 10px; } - .borderTop { - border-top: 1px dashed #ddd; - } - .btn-xs { padding: 1px 5px; font-size: 12px; @@ -39,23 +41,44 @@ margin: 2px 10px 0 0; } + .borderTop { + border-top: 1px dashed #ddd; + } +} + +#botLibraryPage { .summary-container { width: 100%; } .selected { - border: 2px solid #000; - height: 94px !important; - margin-top: 13px !important; + height: 92px !important; + margin-top: 14px !important; + } + + .selected-blue { + color: #00c0ef !important; + border: 1px solid #00c0ef !important; + } + + .selected-green { + color: #00a65a !important; + border: 1px solid #00a65a !important; + } + + .selected-red { + color: #dd4b39 !important; + border: 1px solid #dd4b39 !important; } .info-box { display: block; min-height: 90px; - background: #ecf0f5; + background: #fff; width: 100%; box-shadow: 0 1px 1px rgba(0,0,0,0.1); margin: 15px 0; + border: 1px solid #ccc; } .info-box-content { @@ -84,8 +107,8 @@ .info-box-icon { display: block; float: left; - height: 90px; - width: 90px; + height: 88px; + width: 88px; text-align: center; font-size: 45px; line-height: 90px; diff --git a/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js index 8aa97d902..34b9e2b0a 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js @@ -48,8 +48,6 @@ }); }]) .controller('botsCtrl',['$scope', '$rootScope', '$state', function ($scope, $rootScope, $state) { - /*var treeNames = ['Bots']; - $rootScope.$emit('treeNameUpdate', treeNames);*/ $state.go('dashboard.bots.library'); $rootScope.stateItems = $state.params; }]); 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 2237353a2..3ea895ba0 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/audittrailCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/audittrailCtrl.js @@ -45,7 +45,7 @@ ], data:[] }; - var gridBottomSpace = 5; + var gridBottomSpace = 40; $scope.gridHeight = workzoneUIUtils.makeTabScrollable('botAuditTrailPage') - gridBottomSpace; $scope.botAuditTrailLogs=function(hist) { @@ -68,6 +68,10 @@ }); }; + $scope.RefreshBotsAuditTrail = function() { + audit.init(); + }; + audit.init =function(){ audit.gridOptions.data=[]; var param={ 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 57d1ca9f3..b7ecc0482 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js @@ -33,8 +33,10 @@ } }; $scope.instanceChange =function(){ + $scope.isBotLogsLoading = true; $scope.botLogs=[]; var param={ + inlineLoader: true, url:'/audit-trail/' + $scope.selectedInstance.actionLogId + '/logs' }; genSevs.promiseGet(param).then(function (response) { @@ -65,14 +67,15 @@ }); if($scope.taskType === 'jenkins') { var param={ + inlineLoader: true, url:'/jenkins/' + $scope.jenkinsActionLogId + '/jobs/testmail/builds/' + $scope.jenkinsBuildNumber + '/output' }; genSevs.promiseGet(param).then(function (response) { - if (response.data) { - $scope.jenkinsLogs = helper.formatLogs(response.data.output); + if (response) { + $scope.jenkinsLogs = helper.formatLogs(response.output); $scope.isBotLogsLoading = false; } else { - $scope.jenkinsLogs = helper.formatLogs(response.output); + $scope.jenkinsLogs = helper.formatLogs(response.data.output); $scope.isBotLogsLoading = false; } }); 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 dd78cb560..86403d016 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -21,7 +21,7 @@ multiSelect :false, }, columnDefs: [ - { name:'Task Type', width:100,field:'taskType' ,cellTemplate:'row.entity.taskType'+ + { name:'Task Type', field:'taskType' ,cellTemplate:'row.entity.taskType'+ 'row.entity.taskType'+ 'row.entity.taskType'+ 'row.entity.botType',cellTooltip: true}, @@ -30,7 +30,7 @@ { name: 'Category',field:'botCategory'}, { name: 'description',field:'shortDesc'}, { name: 'BOT History',displayName: 'BOT History',cellTemplate:'NA'+ - ''}, + ''}, { name: 'BOT Action',displayName: 'BOT Action',cellTemplate:'' + '' + '' @@ -65,7 +65,16 @@ genSevs.promiseDelete(param).then(function (response) { if (response) { toastr.success('Successfully deleted'); - lib.init(); + if($scope.totalBotsSelected) { + lib.init(); + } else if($scope.runningBotsselected) { + $scope.showBotsRunning(); + } else if($scope.failedBotsselected) { + $scope.showFailedBots(); + } else { + lib.init(); + } + lib.summary(); } }, function(data) { toastr.error('error:: ' + data.toString()); @@ -87,7 +96,16 @@ genSevs.promiseDelete(param).then(function (response) { if (response) { toastr.success('Successfully deleted'); - lib.init(); + if($scope.totalBotsSelected) { + lib.init(); + } else if($scope.runningBotsselected) { + $scope.showBotsRunning(); + } else if($scope.failedBotsselected) { + $scope.showFailedBots(); + } else { + lib.init(); + } + lib.summary(); } }, function(data) { toastr.error('error:: ' + data.toString()); @@ -95,12 +113,14 @@ }); }; $rootScope.$on('BOTS_LIBRARY_REFRESH', function() { + lib.summary(); lib.init(); }); $scope.RefreshBotsLibrary = function() { $scope.totalBotsSelected = true; $scope.runningBotsselected = false; $scope.failedBotsselected = false; + lib.summary(); lib.init(); }; $scope.showBotsRunning = function() { diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/audittrail.html b/client/cat3/src/partials/sections/dashboard/bots/view/audittrail.html index a63c7ce99..9941d03e9 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/view/audittrail.html +++ b/client/cat3/src/partials/sections/dashboard/bots/view/audittrail.html @@ -1,6 +1,14 @@
+
+ BOTs Audit Trail  + +
+
+
No data Available diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/botLogs.html b/client/cat3/src/partials/sections/dashboard/bots/view/botLogs.html index 9c4f75a5e..3317ca531 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/view/botLogs.html +++ b/client/cat3/src/partials/sections/dashboard/bots/view/botLogs.html @@ -7,30 +7,32 @@