Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/cat3/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
<script src="src/partials/sections/dashboard/bots/botsCtrl.js"></script>
<script src="src/partials/sections/dashboard/bots/controller/audittrailCtrl.js"></script>
<script src="src/partials/sections/dashboard/bots/controller/botLogsCtrl.js"></script>
<script src="src/partials/sections/dashboard/bots/controller/botInfoCtrl.js"></script>
<script src="src/partials/sections/dashboard/bots/controller/botScheduleCtrl.js"></script>
<script src="src/partials/sections/dashboard/bots/controller/libraryCtrl.js"></script>
<script src="src/partials/sections/dashboard/bots/controller/editParamsCtrl.js"></script>
<script src="src/partials/sections/dashboard/design/aDesignCtrl.js"></script>
Expand Down
11 changes: 11 additions & 0 deletions client/cat3/src/partials/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,10 @@ accordion .panel-heading {
margin-top: 10px;
}

.margintop8 {
margin-top: 8px;
}

.marginleft15 {
margin-left: 15px;
}
Expand All @@ -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*/
Expand Down
20 changes: 18 additions & 2 deletions client/cat3/src/partials/sections/dashboard/bots/bots.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
};
genSevs.promiseGet(param).then(function (response) {
$scope.botLogs = response;
helper.scrollBottom();
$scope.isBotLogsLoading = false;
});
};
Expand Down Expand Up @@ -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;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:'<span ng-show="row.entity.blueprintType">NA</span>'+
'<span class="btn cat-btn-update control-panel-button" title="History" ng-show="row.entity.taskType" ng-click="grid.appScope.botLogs(row.entity);"><i class="fa fa-header white"></i></span>'},
{ name: 'BOT Info',displayName: 'BOT Info',cellTemplate:
'<span class="btn cat-btn-update control-panel-button" title="Info" ng-click="grid.appScope.botInfo(row.entity);"><i class="fa fa-info white"></i></span>'},
{ name: 'BOT Action',displayName: 'BOT Action',cellTemplate:'<span class="btn cat-btn-update control-panel-button" title="Execute" ng-click="grid.appScope.launchInstance(row.entity);"><i class="fa fa-play white"></i></span>' +
'<span class="btn btn-danger control-panel-button" title="Delete Task" ng-show="row.entity.taskType" ng-click="grid.appScope.deleteBotTask(row.entity);"><i class="fa fa-trash-o white"></i></span>' +
'<span class="btn btn-danger control-panel-button" title="Delete Blueprint" ng-show="row.entity.blueprintType" ng-click="grid.appScope.deleteBotBP(row.entity);"><i class="fa fa-trash-o white"></i></span>'
Expand All @@ -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',
Expand Down Expand Up @@ -160,6 +182,7 @@
};
genSevs.promiseGet(param).then(function (response) {
$scope.botSummary = response;
$scope.totalSavedTimeForBots = parseInt($scope.botSummary.totalSavedTimeForBots);
});
};
lib.summary();
Expand All @@ -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);
90 changes: 90 additions & 0 deletions client/cat3/src/partials/sections/dashboard/bots/view/botInfo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<div id='botInfoPage'>
<div class="modal-header">
<span class="close" ng-click="cancel()">×</span>
<h4 class="modal-title">
<i class="fa fa-bar-chart-o"></i> Bot Info - {{botInfo.name}}
</h4>
</div>

<div class="modal-body">
<fieldset>
<table class="table table-bordered">
<thead>
<tr>
<th class="th-parameters">Parameters</th>
<th class="th-values">Values</th>
</tr>
</thead>
<tbody>
<tr>
<td class="td-padding">BOT Name</td>
<td>
<input class="form-control" disabled="disabled" ng-model="botInfo.name">
</td>
</tr>
<tr>
<td class="td-padding">Task Type:</td>
<td>
<input disabled="disabled" class="form-control" ng-model="botInfo.taskType">
</td>
</tr>
<tr>
<td class="td-padding">Bot Type</td>
<td>
<input disabled="disabled" class="form-control" ng-model="botInfo.botType">
</td>
</tr>
<tr>
<td class="td-padding">Category</td>
<td>
<input disabled="disabled" class="form-control" ng-model="botInfo.botCategory">
</td>
</tr>
<tr>
<td class="td-padding">Description</td>
<td>
<input disabled="disabled" class="form-control" ng-model="botInfo.shortDesc">
</td>
</tr>
<tr>
<td class="td-padding">Last BOT Execution</td>
<td ng-show="botInfo.lastTaskStatus">
<input class="form-control" disabled="disabled" ng-model="botInfo.lastTaskStatus">
</td>
<td ng-hide="botInfo.lastTaskStatus">
<input class="form-control" disabled="disabled" value="NA">
</td>
</tr>
</tbody>
<tbody ng-show="botInfo.taskType==='jenkins'">
<tr>
<td class="td-padding">Job Name</td>
<td>
<input class="form-control" disabled="disabled" ng-model="botInfo.taskConfig.jobName">
</td>
</tr>
<tr>
<td class="td-padding">Job URL</td>
<td>
<input disabled="disabled" class="form-control" ng-model="botInfo.taskConfig.jobURL">
</td>
</tr>
</tbody>
<tbody ng-show="botInfo.taskType==='script'">
<tr>
<td class="td-padding">Script Type Name</td>
<td>
<input class="form-control" disabled="disabled" ng-model="botInfo.taskConfig.scriptTypeName">
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>

<div class="modal-footer">
<button type="button" class="btn cat-btn-close" ng-click="cancel()">
<i class="fa fa-times black"></i> Close
</button>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<link rel='stylesheet' href='catalyst/partials/sections/dashboard/bots/bots.css'>

<div id="editParamsPage">
<div class="modal-header">
<span class="close" ng-click="cancel()">×</span>
<h4 class="modal-title"> <i class="fa fa-share-square-o"></i>&nbsp;&nbsp;Execute Bot</h4>
<h4 class="modal-title"> <i class="fa fa-share-square-o"></i>&nbsp;&nbsp;Execute Bot - {{botName}}</h4>
</div>

<div class="modal-body">
Expand Down Expand Up @@ -50,6 +52,7 @@ <h4 style="margin-top: 0px;">Edit Parameters:</h4>
<thead>
<tr>
<th class="header-name">Name</th>
<th class="header-name">Description</th>
<th class="header-name">Value</th>
</tr>
</thead>
Expand All @@ -58,6 +61,9 @@ <h4 style="margin-top: 0px;">Edit Parameters:</h4>
<td>
<span style="vertical-align: -webkit-baseline-middle;">{{params.name}}</span>
</td>
<td>
<span style="vertical-align: -webkit-baseline-middle;">{{params.description}}</span>
</td>
<td ng-init="jenparams[params.name]=params.defaultValue[0]">
<input ng-if="params.parameterName !== 'Choice'" type="text" ng-model="jenparams[params.name]" class="form-control" ng-value="params.defaultValue[0]">
<select ng-if="params.parameterName === 'Choice'" ng-model="jenparams[params.name]" class="cookbook-edit-text">
Expand Down Expand Up @@ -103,26 +109,4 @@ <h4 style="margin-top: 0px;">Add Parameters:</h4>
<i class="fa fa-check white"></i> Ok
</button>
</div>
</div>

<style>
.header-name {
text-align: center;
}

.marginleft23 {
margin-left: 23px;
}

.paddingbottom10 {
padding-bottom: 10px;
}

.margintop8 {
margin-top: 8px;
}

.cookbook-edit-text {
background: #fff;
}
</style>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</span>
<div class="info-box-content">
<span class="info-box-text">Total Time saved</span>
<span class="info-box-number">{{botSummary.totalSavedTimeForBots}} mins</span>
<span class="info-box-number">{{totalSavedTimeForBots}} mins</span>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@
blueprintCreateJSON.botType = blueprintCreation.newEnt.botTypeValue;
blueprintCreateJSON.shortDesc = blueprintCreation.newEnt.botDescription;
blueprintCreateJSON.botCategory = blueprintCreation.newEnt.botCategoryValue;
blueprintCreateJSON.manualExecutionTime = blueprintCreation.newEnt.manualExecutionTime;
blueprintCreateJSON.serviceDeliveryCheck = true;
}
if(blueprintCreation.newEnt.appDeployCheck_isChecked){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,8 @@
<select ng-model="bpCreate.newEnt.botTypeValue" name="" class=" width-100 form-control">
<option selected="selected" value="Task">Task</option>
<option value="Check">Check</option>
<option value="Learning">Learning</option>
<option value="Composite">Composite</option>
<option value="Built with other">Built with other</option>
<option value="Run">Run</option>
<option value="UI">UI</option>
</select>
</div>

Expand All @@ -290,6 +289,12 @@
<option value="Installation">Installation</option>
</select>
</div>
<div class="col-lg-4 col-md-4 margintop15" ng-show="botTypes">
<label for="">Standard Time:<span class="red">*</span>
</label>
<input ng-model="bpCreate.newEnt.manualExecutionTime" style="width: 70%;" name="" class=" width-100 form-control">
<span class="pull-right" style="margin: -30px 50px 0 0px;">mins</span>
</div>
<!-- Docker Image selection table -->
<div ng-if="templateSelected.templatetypename === 'Docker'" class="col-lg-12 col-md-12" style="margin-top:9px;">
<label for="category">Docker Images<span class="red">&nbsp;*</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
Loading