From d0bafe5a8e1ae20b093577f0f9e6e642c8b8d383 Mon Sep 17 00:00:00 2001 From: Divakar Konakalla Date: Thu, 2 Feb 2017 19:06:30 +0530 Subject: [PATCH 1/2] Resolved issue with blueprint logs. --- .../dashboard/bots/controller/libraryCtrl.js | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 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 59624ca07..34f39ce28 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -551,8 +551,8 @@ $scope.cancel = function() { $modalInstance.dismiss('cancel'); }; - }]).controller('botHistoryCtrl',["items", '$scope', '$modalInstance', '$modal', '$timeout', 'uiGridOptionsClient', 'genericServices', - function(items, $scope, $modalInstance, $modal, $timeout, uiGridOptionsClient, genSevs){ + }]).controller('botHistoryCtrl',["items", '$scope', '$modalInstance', '$modal', '$timeout', 'uiGridOptionsClient', 'genericServices', 'toastr', + function(items, $scope, $modalInstance, $modal, $timeout, uiGridOptionsClient, genSevs, toastr){ //UI Grid for chef Task starts $scope.botHistory = items; $scope.botId = items.botId; @@ -802,27 +802,31 @@ } $scope.historyLogs=function(hist) { - var modalInstance = $modal.open({ - animation: true, - templateUrl: 'src/partials/sections/dashboard/bots/view/botExecutionLogs.html', - controller: 'botExecutionLogsCtrl as botExecLogCtrl', - backdrop : 'static', - keyboard: false, - resolve: { - items: function() { - return { - taskId : hist.auditId, - historyId : hist.auditHistoryId ? hist.auditHistoryId : hist.auditTrailConfig.nodeIdsWithActionLog[0] && hist.auditTrailConfig.nodeIdsWithActionLog[0].actionLogId, - taskType:hist.auditTrailConfig.executionType - }; + if(hist.auditHistoryId || (hist.auditTrailConfig.nodeIdsWithActionLog[0] && hist.auditTrailConfig.nodeIdsWithActionLog[0].actionLogId)) { + var modalInstance = $modal.open({ + animation: true, + templateUrl: 'src/partials/sections/dashboard/bots/view/botExecutionLogs.html', + controller: 'botExecutionLogsCtrl as botExecLogCtrl', + backdrop : 'static', + keyboard: false, + resolve: { + items: function() { + return { + taskId : hist.auditId, + historyId : hist.auditHistoryId ? hist.auditHistoryId : hist.auditTrailConfig.nodeIdsWithActionLog[0] && hist.auditTrailConfig.nodeIdsWithActionLog[0].actionLogId, + taskType:hist.auditTrailConfig.executionType + }; + } } - } - }); - modalInstance.result.then(function(selectedItem) { - $scope.selected = selectedItem; - }, function() { - console.log('Modal Dismissed at ' + new Date()); - }); + }); + modalInstance.result.then(function(selectedItem) { + $scope.selected = selectedItem; + }, function() { + console.log('Modal Dismissed at ' + new Date()); + }); + } else { + toastr.error("Logs are getting generated. Please wait"); + } } $scope.cancel= function() { From 344f84be006c12c215046a123ca62cacae8add58 Mon Sep 17 00:00:00 2001 From: srikanthv02 Date: Fri, 10 Feb 2017 11:00:31 +0530 Subject: [PATCH 2/2] Changed the month of creation --- .../partials/sections/dashboard/bots/controller/libraryCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 917cc35c5..bf660d73d 100644 --- a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -2,7 +2,7 @@ * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * Written by Relevance UI Team, - * Jan 2017 + * Feb 2017 */ (function (angular) {