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/workzone/orchestration/orchestration.scss b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestration.scss index e4e5f05e9..072247e26 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestration.scss +++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestration.scss @@ -66,6 +66,12 @@ $imagePath : "../../../../../../images"; padding-right: 0px; } } + + .my-modal-popup { + .modal-lg { + width:1056px; + } + } } #orchestrationPage { @@ -187,7 +193,17 @@ $imagePath : "../../../../../../images"; .select-nodes { border: 1px solid #dddddd; list-style: none outside none; - height: 235px; + height: 150px; + overflow-y: auto; + margin-top: 5px; + margin-bottom: 10px; + padding: 5px; + } + + .select-nodeInstance { + border: 1px solid #dddddd; + list-style: none outside none; + height: 350px; overflow-y: auto; margin-top: 5px; margin-bottom: 10px; 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 387ff5c6f..2a8119fad 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/orchestrationCtrl.js @@ -275,7 +275,8 @@ controller: 'newTaskCtrl', backdrop: 'static', keyboard: false, - size: 'lg', + size:'lg', + windowClass: 'my-modal-popup', resolve: { items: function() { return type; diff --git a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEvent.html b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEvent.html new file mode 100644 index 000000000..6cdbf04b0 --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEvent.html @@ -0,0 +1,156 @@ +
+
+ + + +
+
+ + diff --git a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEventCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEventCtrl.js new file mode 100644 index 000000000..97eee0a54 --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/addChefJobEventCtrl.js @@ -0,0 +1,103 @@ +/* Copyright (C) Relevance Lab Private Limited- All Rights Reserved + * Unauthorized copying of this file, via any medium is strictly prohibited + * Proprietary and confidential + * Written by Relevance UI Team, + * Aug 2015 + */ + +(function(angular){ + "use strict"; + angular.module('workzone.orchestration') + .controller('addChefJobEventCtrl',['$scope', '$modalInstance', 'items' ,'toastr',function($scope, $modalInstance , items , toastr){ + console.log(items); + if(items.type !== 'new'){ + $scope.schedulerStartOn = items.chefJenkScriptTaskObj.cronStart; + $scope.schedulerEndOn = items.chefJenkScriptTaskObj.cronEnd; + $scope.repeatBy = items.chefJenkScriptTaskObj.repeatBy; + $scope.repeatsType = items.chefJenkScriptTaskObj.repeats; + $scope.timeEventType = items.chefJenkScriptTaskObj.startTime; + $scope.timeEventMinute = items.chefJenkScriptTaskObj.startTimeMinute; + $scope.weekOfTheDay = items.chefJenkScriptTaskObj.dayOfWeek; + $scope.currentDate = items.chefJenkScriptTaskObj.startDate; + $scope.selectedDayOfTheMonth = items.chefJenkScriptTaskObj.selectedDayOfTheMonth; + $scope.selectedMonth = items.chefJenkScriptTaskObj.monthOfYear; + } else { + $scope.repeatsType = 'Minutes';//default selection. + $scope.schedulerStartOn=moment(new Date()).format('MM/DD/YYYY'); + $scope.schedulerEndOn=moment(new Date()).format('MM/DD/YYYY'); + } + + $scope.dateChange= function () { + var startDate = Date.parse($scope.schedulerStartOn); + var endDate = Date.parse($scope.schedulerEndOn); + if(startDate > endDate){ + $scope.validDateRange=true; + } else { + $scope.validDateRange=false; + } + }; + + $scope.repeatCount = function(max, step) { + step = step || 1; + var input = []; + for (var i = 1; i <= max; i += step) { + input.push(i); + } + return input; + }; + /*$scope.timeCount = function(max, step) { + step = step || 1; + var input = []; + for (var i = 0; i <= max; i += step) { + input.push(i); + } + return input; + }; + $scope.timeCountMinutes = function(max, step) { + step = step || 1; + var input = []; + for (var i = 0; i <= max; i += step) { + input.push(i); + } + return input; + }; + $scope.dayOfTheMonth = function(max, step) { + step = step || 1; + var input = []; + for (var i = 1; i <= max; i += step) { + input.push(i); + } + return input; + };*/ + /*$scope.currentDate = new Date(); + $scope.currentEndDate = new Date();*/ + $scope.isDaySelected = { + flag:true + } + + $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, + repeatBy: $scope.repeatBy, + cronStart: $scope.schedulerStartOn, + cronEnd: $scope.schedulerEndOn, + startTime: $scope.timeEventType, + startTimeMinute: $scope.timeEventMinute, + dayOfWeek: $scope.weekOfTheDay, + selectedDayOfTheMonth: $scope.selectedDayOfTheMonth, + monthOfYear: $scope.selectedMonth + }; + $modalInstance.close($scope.eventParams); + }; + } + ]); +})(angular); + 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 502f64228..f50b43493 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 @@ -126,6 +126,21 @@
Job Details
+ +
+ + + +
+ + +
+
+ + +
+
+