From 416709621cecff78a9f4c6b597a408050b29a046 Mon Sep 17 00:00:00 2001 From: Divakar Konakalla Date: Mon, 5 Dec 2016 12:12:13 +0530 Subject: [PATCH 1/3] Bots Library, Summary enhancements. --- client/cat3/main.html | 2 + client/cat3/src/partials/global.scss | 11 +++ .../sections/dashboard/bots/bots.scss | 20 ++++- .../dashboard/bots/controller/botLogsCtrl.js | 3 + .../bots/controller/editParamsCtrl.js | 1 + .../dashboard/bots/controller/libraryCtrl.js | 32 ++++++- .../sections/dashboard/bots/view/botInfo.html | 90 +++++++++++++++++++ .../dashboard/bots/view/editParams.html | 32 ++----- .../sections/dashboard/bots/view/library.html | 2 +- .../design/view/blueprintCreate.html | 5 +- .../workzone/blueprint/blueprint.scss | 13 +-- .../dashboard/workzone/instance/instance.scss | 10 +-- .../orchestration/popups/newTask.html | 21 ++++- .../orchestration/popups/newTaskCtrl.js | 3 + 14 files changed, 196 insertions(+), 49 deletions(-) create mode 100644 client/cat3/src/partials/sections/dashboard/bots/view/botInfo.html diff --git a/client/cat3/main.html b/client/cat3/main.html index 876f4b049..47e20ce9d 100644 --- a/client/cat3/main.html +++ b/client/cat3/main.html @@ -111,6 +111,8 @@ + + diff --git a/client/cat3/src/partials/global.scss b/client/cat3/src/partials/global.scss index 5b15ebc15..b85ade95c 100644 --- a/client/cat3/src/partials/global.scss +++ b/client/cat3/src/partials/global.scss @@ -728,6 +728,10 @@ accordion .panel-heading { margin-top: 10px; } +.margintop8 { + margin-top: 8px; +} + .marginleft15 { margin-left: 15px; } @@ -740,6 +744,13 @@ accordion .panel-heading { margin-left: 5px; } +#blueprintInfoPage, #botInfoPage { + .td-padding { + padding-left: 18px; + padding-top:16px; + } +} + /* global styles for logs display across workzone ends here*/ /*ui grid css starts here*/ diff --git a/client/cat3/src/partials/sections/dashboard/bots/bots.scss b/client/cat3/src/partials/sections/dashboard/bots/bots.scss index 8a1d84145..75a7f2895 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/bots.scss +++ b/client/cat3/src/partials/sections/dashboard/bots/bots.scss @@ -4,14 +4,30 @@ font-size: 15px !important; } -.marginbottom10{ - margin-bottom: 10px !important; +.header-name { + text-align: center; +} + +.marginleft23 { + margin-left: 23px; +} + +.paddingbottom10 { + padding-bottom: 10px; } .margintop8 { margin-top: 8px; } +.cookbook-edit-text { + background: #fff; +} + +.marginbottom10{ + margin-bottom: 10px !important; +} + .task-type-img, .bot-status-icon { height: 30px; } 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 b7ecc0482..a74ada9e6 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/botLogsCtrl.js @@ -41,6 +41,7 @@ }; genSevs.promiseGet(param).then(function (response) { $scope.botLogs = response; + helper.scrollBottom(); $scope.isBotLogsLoading = false; }); }; @@ -73,9 +74,11 @@ genSevs.promiseGet(param).then(function (response) { if (response) { $scope.jenkinsLogs = helper.formatLogs(response.output); + helper.scrollBottom(); $scope.isBotLogsLoading = false; } else { $scope.jenkinsLogs = helper.formatLogs(response.data.output); + helper.scrollBottom(); $scope.isBotLogsLoading = false; } }); 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 1454f81c4..29be3d631 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/editParamsCtrl.js @@ -9,6 +9,7 @@ "use strict"; angular.module('library.params', []) .controller('editParamsCtrl',['$scope', '$rootScope', 'genericServices', 'workzoneServices', 'toastr', '$modalInstance', 'items', 'responseFormatter', function ($scope, $rootScope, genSevs, workzoneServices, toastr, $modalInstance, items, responseFormatter) { + $scope.botName = items.name; $scope.taskType = items.taskType; $scope.taggingServerList=[]; $scope.envOptions=[]; 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 86403d016..2ffd2c656 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -8,7 +8,7 @@ (function (angular) { "use strict"; angular.module('dashboard.bots') - .controller('libraryCtrl',['$scope', '$rootScope', '$state', 'genericServices', 'confirmbox', 'toastr', 'workzoneUIUtils', function ($scope, $rootScope, $state, genSevs, confirmbox, toastr, workzoneUIUtils) { + .controller('libraryCtrl',['$scope', '$rootScope', '$state', 'genericServices', 'confirmbox', 'toastr', 'workzoneUIUtils', '$modal', function ($scope, $rootScope, $state, genSevs, confirmbox, toastr, workzoneUIUtils, $modal) { var treeNames = ['Bots','Library']; $rootScope.$emit('treeNameUpdate', treeNames); var lib=this; @@ -29,8 +29,11 @@ { name: 'BOT Name',displayName: 'BOT Name',field:'name'}, { name: 'Category',field:'botCategory'}, { name: 'description',field:'shortDesc'}, + { 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:'' + '' + '' @@ -50,6 +53,25 @@ $scope.botLogs = function(bot){ genSevs.botHistory(bot); }; + $scope.botInfo=function(bot) { + var modalInstance = $modal.open({ + animation: true, + templateUrl: 'src/partials/sections/dashboard/bots/view/botInfo.html', + controller: 'botInfoCtrl', + backdrop : 'static', + keyboard: false, + resolve: { + items: function() { + return bot; + } + } + }); + modalInstance.result.then(function(selectedItem) { + $scope.selected = selectedItem; + }, function() { + console.log('Modal Dismissed at ' + new Date()); + }); + }; $scope.deleteBotTask = function(task) { var modalOptions = { closeButtonText: 'Cancel', @@ -160,6 +182,7 @@ }; genSevs.promiseGet(param).then(function (response) { $scope.botSummary = response; + $scope.totalSavedTimeForBots = parseInt($scope.botSummary.totalSavedTimeForBots); }); }; lib.summary(); @@ -185,5 +208,12 @@ }); }; lib.init(); + }]).controller('botInfoCtrl',['$scope', 'items', '$modalInstance', function ($scope, items, $modalInstance) { + $scope.botInfo = 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/view/botInfo.html b/client/cat3/src/partials/sections/dashboard/bots/view/botInfo.html new file mode 100644 index 000000000..b16ae05ce --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/bots/view/botInfo.html @@ -0,0 +1,90 @@ +
+ + + + + +
\ No newline at end of file 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 08e1c9fda..60d344947 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/view/editParams.html +++ b/client/cat3/src/partials/sections/dashboard/bots/view/editParams.html @@ -1,7 +1,9 @@ + +
diff --git a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/blueprint.scss b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/blueprint.scss index 3b62220a4..52cac0044 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/blueprint.scss +++ b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/blueprint.scss @@ -50,19 +50,14 @@ word-wrap: break-word; } - .td-padding { - padding-left: 18px; - padding-top:16px; - } - .th-parameters { - width:11%; - text-align:center; + width:11%; + text-align:center; } .th-values { - width:27%; - text-align:center; + width:27%; + text-align:center; } } diff --git a/client/cat3/src/partials/sections/dashboard/workzone/instance/instance.scss b/client/cat3/src/partials/sections/dashboard/workzone/instance/instance.scss index 0e8eda4c1..fa4e95d80 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/instance/instance.scss +++ b/client/cat3/src/partials/sections/dashboard/workzone/instance/instance.scss @@ -883,7 +883,7 @@ $imagePath: "../../../../../../images"; margin: -13px 0 0 10px; } .cp-container { - height: 400px; + height: 500px; overflow-y: auto; width: 85%; } @@ -941,7 +941,7 @@ $imagePath: "../../../../../../images"; .app-url-section { border: 1px solid #ccc; min-height: 160px; - max-height: 400px; + max-height: 500px; overflow-y: auto; } .app-url-header { @@ -990,7 +990,7 @@ $imagePath: "../../../../../../images"; } #cpLogsPage { .logsArea { - height: 400px; + height: 500px; border-left: 1px solid #ddd; } } @@ -999,12 +999,12 @@ $imagePath: "../../../../../../images"; margin: 0 0 10px 0; } .ui-grid { - height: 352px; + height: 452px; } } #cpActionHistoryPage { .ui-grid { - height: 396px; + height: 496px; } } #stopInstancePage { diff --git a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTask.html b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTask.html index 04c648cd4..fc6a4d71b 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTask.html +++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTask.html @@ -66,9 +66,6 @@
Job Details
- - -
@@ -85,7 +82,7 @@
Job Details
-
+
+
+ +
+ + + + + + minutes + + +
+
+ + + mins +