diff --git a/client/cat3/Gruntfile.js b/client/cat3/Gruntfile.js index 8028c9b59..06a759423 100644 --- a/client/cat3/Gruntfile.js +++ b/client/cat3/Gruntfile.js @@ -89,7 +89,7 @@ module.exports = function(grunt) { {'catalyst/partials/sections/dashboard/workzone/orchestration/orchestration.css':'src/partials/sections/dashboard/workzone/orchestration/orchestration.scss'}, {'catalyst/partials/sections/dashboard/workzone/application/application.css':'src/partials/sections/dashboard/workzone/application/application.scss'}, {'catalyst/partials/sections/dashboard/analytics/analytics.css':'src/partials/sections/dashboard/analytics/analytics.scss'}, - {'catalyst/partials/sections/dashboard/service/service.css':'src/partials/sections/dashboard/service/service.scss'}, + {'catalyst/partials/sections/dashboard/bots/bots.css':'src/partials/sections/dashboard/bots/bots.scss'}, {'catalyst/partials/sections/dashboard/setting/setting.css':'src/partials/sections/dashboard/setting/setting.scss'} ] } diff --git a/client/cat3/main.html b/client/cat3/main.html index 928f4c73a..476a55985 100644 --- a/client/cat3/main.html +++ b/client/cat3/main.html @@ -102,7 +102,8 @@ - + + diff --git a/client/cat3/src/clientRoutes.js b/client/cat3/src/clientRoutes.js index 9d2e187d3..d9a6198b2 100644 --- a/client/cat3/src/clientRoutes.js +++ b/client/cat3/src/clientRoutes.js @@ -88,10 +88,10 @@ function routeConfig($stateProvider, $urlRouterProvider, $httpProvider, modulePe }] } - }).state('dashboard.service', { - url: "/service/", - templateUrl: "src/partials/sections/dashboard/service/service.html", - controller: "serviceCtrl", + }).state('dashboard.bots', { + url: "/bots", + templateUrl: "src/partials/sections/dashboard/bots/bots.html", + controller: "botsCtrl as bts", resolve: { auth: ["$q", function ($q) { var deferred = $q.defer(); diff --git a/client/cat3/src/factory/workzoneServices.js b/client/cat3/src/factory/workzoneServices.js index c3bca326a..2ee297eb5 100644 --- a/client/cat3/src/factory/workzoneServices.js +++ b/client/cat3/src/factory/workzoneServices.js @@ -99,9 +99,9 @@ var url = '/blueprints/' + blueprintID; return $http.delete(fullUrl(url), Auth.getHeaderObject()); }, - launchBlueprint: function (blueprintID, version, envId, stackName,domainName) { + launchBlueprint: function (blueprintID, version, envId, stackName,domainName, tagServer) { var url = '/blueprints/' + blueprintID + '/launch?version=' + version + - '&envId=' + envId + '&stackName=' + stackName + '&domainName=' + domainName; + '&envId=' + envId + '&stackName=' + stackName + '&domainName=' + domainName + '&tagServer=' + tagServer; return $http.get(fullUrl(url), Auth.getHeaderObject()); }, getBlueprintById: function(blueprintId) { @@ -527,6 +527,10 @@ getUnassignedInstances:function (providerId) { var url ='/providers/'+providerId+'/unassigned-instances'; return $http.get(fullUrl(url),Auth.getHeaderObject()); + }, + getBotTypeList:function () { + var url ='/config-data/bot-type'; + return $http.get(fullUrl(url),Auth.getHeaderObject()); } }; return serviceInterface; diff --git a/client/cat3/src/partials/global.scss b/client/cat3/src/partials/global.scss index 7a29b39c0..d5b0a1221 100644 --- a/client/cat3/src/partials/global.scss +++ b/client/cat3/src/partials/global.scss @@ -112,6 +112,7 @@ $imagePath : "../../../../../../cat3/images"; z-index: 10; transition: all .4s ease 0s; left: -254px; + height: 100%; &.show-left-tree { left: 0px; @@ -121,6 +122,7 @@ $imagePath : "../../../../../../cat3/images"; background: linear-gradient(to right, #2c3638 99%, #2c3638 100%); color: #fff; overflow-y: auto; + height: 100%; } div[data-angular-treeview] { diff --git a/client/cat3/src/partials/globals/header/header.scss b/client/cat3/src/partials/globals/header/header.scss index 208df0beb..481632dd3 100755 --- a/client/cat3/src/partials/globals/header/header.scss +++ b/client/cat3/src/partials/globals/header/header.scss @@ -176,6 +176,30 @@ } } +.header-right { + .dropdown { + margin: 11px 0px 0 10px; + } + + .dropdown-toggle { + font-size: 18px; + margin-top: 5px; + } + + .dropdown-menu { + color: #000; + background: #fff; + padding: 6px; + min-width: 100px; + line-height: 2; + } + + a { + color: #000; + text-decoration: none; + } +} + /*Styles for Logout Confirmation starts here*/ .divMessageBox { width: 100%; diff --git a/client/cat3/src/partials/globals/header/headerDashboard.html b/client/cat3/src/partials/globals/header/headerDashboard.html index d6244e8d5..b62130a64 100644 --- a/client/cat3/src/partials/globals/header/headerDashboard.html +++ b/client/cat3/src/partials/globals/header/headerDashboard.html @@ -40,7 +40,7 @@
  • -
    +
    BOTS
  • diff --git a/client/cat3/src/partials/sections/dashboard/bots/bots.html b/client/cat3/src/partials/sections/dashboard/bots/bots.html new file mode 100644 index 000000000..f2dec4d06 --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/bots/bots.html @@ -0,0 +1,14 @@ + + +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/service/service.scss b/client/cat3/src/partials/sections/dashboard/bots/bots.scss similarity index 100% rename from client/cat3/src/partials/sections/dashboard/service/service.scss rename to client/cat3/src/partials/sections/dashboard/bots/bots.scss diff --git a/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js new file mode 100644 index 000000000..fb1542003 --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/bots/botsCtrl.js @@ -0,0 +1,29 @@ +(function (angular) { + "use strict"; + angular.module('dashboard.bots', ['library.bots']).config(['$stateProvider', '$urlRouterProvider', '$httpProvider', 'modulePermissionProvider', function($stateProvider, $urlRouterProvider, $httpProvider, modulePermissionProvider) { + var modulePerms = modulePermissionProvider.$get(); + $stateProvider.state('dashboard.bots.library', { + url: "/library", + templateUrl: "src/partials/sections/dashboard/bots/view/library.html", + controller: "libraryCtrl as libr", + resolve: { + auth: ["$q", function ($q) { + var deferred = $q.defer(); + // instead, go to a different page + if (modulePerms.analyticsBool()) { + // everything is fine, proceed + deferred.resolve(); + } else { + deferred.reject({redirectTo: 'dashboard'}); + } + return deferred.promise; + }] + } + }) + }]) + .controller('botsCtrl',['$scope', '$rootScope','$state', function ($scope, $rootScope,$state) { + var treeNames = ['Bots']; + $rootScope.$emit('treeNameUpdate', treeNames); + $state.go('dashboard.bots.library'); + }]); +})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js new file mode 100644 index 000000000..e28d40b6d --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/bots/controller/libraryCtrl.js @@ -0,0 +1,38 @@ +(function (angular) { + "use strict"; + angular.module('library.bots', []) + .controller('libraryCtrl',['$scope', '$rootScope','$state','genericServices', function ($scope, $rootScope,$state,genSevs) { + var treeNames = ['Bots','Library']; + $rootScope.$emit('treeNameUpdate', treeNames); + var lib=this; + lib.gridOptions={ + gridOption:{ + paginationPageSizes: [25, 50, 75], + paginationPageSize: 25, + enableColumnMenus:false, + multiSelect :false, + }, + columnDefs: [ + { name: 'type'}, + { name: 'name'}, + { name: 'description'}, + { name: 'run Bot' }, + { name: 'history' }, + { name: 'last run'}, + { name: 'bot Action'} + ], + data:[{},{}] + }; + + lib.int =function(){ + var param={ + url:'/config-data/bot-type' + }; + genSevs.promiseGet(param).then(function (result) { + + }); + }; + lib.int(); + + }]); +})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/service/view/serviceTreeMenu.html b/client/cat3/src/partials/sections/dashboard/bots/view/botsTreeMenu.html similarity index 50% rename from client/cat3/src/partials/sections/dashboard/service/view/serviceTreeMenu.html rename to client/cat3/src/partials/sections/dashboard/bots/view/botsTreeMenu.html index 3d1f51af9..b796404bd 100644 --- a/client/cat3/src/partials/sections/dashboard/service/view/serviceTreeMenu.html +++ b/client/cat3/src/partials/sections/dashboard/bots/view/botsTreeMenu.html @@ -1,7 +1,7 @@ -
    +
    - - - diff --git a/client/cat3/src/partials/sections/dashboard/bots/view/library.html b/client/cat3/src/partials/sections/dashboard/bots/view/library.html new file mode 100644 index 000000000..32fc54891 --- /dev/null +++ b/client/cat3/src/partials/sections/dashboard/bots/view/library.html @@ -0,0 +1,2 @@ +
    +
    \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/dashboardCtrl.js b/client/cat3/src/partials/sections/dashboard/dashboardCtrl.js index bca69a726..972322e1a 100644 --- a/client/cat3/src/partials/sections/dashboard/dashboardCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/dashboardCtrl.js @@ -8,7 +8,7 @@ 'dashboard.track', 'dashboard.settings', 'dashboard.design', - 'dashboard.service', + 'dashboard.bots', 'apis.workzone','dashboard.genericServices']) .controller('dashboardCtrl', ['$rootScope', '$scope', '$http', 'uac', '$location', '$state', function ($rootScope, $scope, $http, uac, $location, $state) { $rootScope.isBreadCrumbAvailable = true; diff --git a/client/cat3/src/partials/sections/dashboard/service/service.html b/client/cat3/src/partials/sections/dashboard/service/service.html deleted file mode 100644 index 31e898ca6..000000000 --- a/client/cat3/src/partials/sections/dashboard/service/service.html +++ /dev/null @@ -1,13 +0,0 @@ - - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/service/service.js b/client/cat3/src/partials/sections/dashboard/service/service.js deleted file mode 100644 index 929e302a1..000000000 --- a/client/cat3/src/partials/sections/dashboard/service/service.js +++ /dev/null @@ -1,7 +0,0 @@ -(function (angular) { - "use strict"; - angular.module('dashboard.service', ['ngTouch', 'ui.grid']) - .controller('serviceCtrl',['$scope', '$rootScope', 'uiGridOptionsClient', 'uiGridConstants', 'workzoneServices', function ($scope, $rootScope, uiGridOptionsClient, uiGridConstants, workzoneServices) { - - }]); -})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js index 6527ef150..505484c33 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchCtrl.js @@ -9,6 +9,7 @@ "use strict"; angular.module('workzone.blueprint') .controller('blueprintLaunchCtrl', ['$scope', '$rootScope', '$modalInstance', 'bpItem', 'workzoneServices', 'workzoneEnvironment', 'instanceLogs', function($scope, $rootScope, $modalInstance, bpItem, workzoneServices, workzoneEnvironment, instanceLogs) { + console.log(bpItem); $scope.isBPLogsLoading = true; $scope.isNewInstanceLogsPromise = false; var helper = { @@ -79,7 +80,7 @@ versionOptional = versionsList[versionsList.length-1].ver; } var selectedVersionBpId = bpItem.bp.selectedVersionBpId; - workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, envParams.env, bpItem.stackName,bpItem.domainName).then(function(bpLaunchResponse) { + workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, envParams.env, bpItem.stackName,bpItem.domainName,bpItem.tagServer).then(function(bpLaunchResponse) { $scope.isBPLogsLoading = false; var launchingInstance; if(bpLaunchResponse.data.id && bpLaunchResponse.data.id.length>0){ diff --git a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParams.html b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParams.html index 1e9c339da..9f7775c77 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParams.html +++ b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParams.html @@ -9,27 +9,48 @@
    Add Application URL -
    - - -
    +
    + + +
    +
    + +
    + +
    +
    diff --git a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js index 2c1b5ddec..88d673ae0 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/orchestration/popups/newTaskCtrl.js @@ -176,6 +176,11 @@ var idx = $scope.jenkinsParamsList.indexOf(params); $scope.jenkinsParamsList.splice(idx,1); }, + botTypeList : function() { + workzoneServices.getBotTypeList().then(function (response) { + $scope.botTypeList = response; + }); + }, removeScriptParams: function (scriptObject,params) { var idx = $scope.scriptParamsObj[scriptObject].indexOf(params); $scope.scriptParamsObj[scriptObject].splice(idx,1); @@ -253,18 +258,23 @@ }, ok: function () { //these values are common across all task types - var taskJSON = { - taskType: $scope.taskType, - name: $scope.name, - botType: $scope.botType, - shortDesc: $scope.shortDesc, - description: $scope.description - }; + var taskJSON={} if($scope.checkBotType){ - taskJSON.botType = $scope.botType; - taskJSON.shortDesc= $scope.shortDesc; + taskJSON = { + taskType: $scope.taskType, + name: $scope.name, + description: $scope.description, + botType:$scope.botType, + shortDesc:$scope.shortDesc, + serviceDeliveryCheck:$scope.checkBotType + }; $scope.taskSaving = true; }else{ + taskJSON = { + taskType: $scope.taskType, + name: $scope.name, + description: $scope.description + }; $scope.taskSaving = true; } //checking for name of the task @@ -580,12 +590,12 @@ $scope.description = items.description; $scope.taskType = items.taskType; $scope.name = items.name; - if(items.shortDesc && (items.shortDesc !== '' || items.shortDesc !== null)){ + if(items.serviceDeliveryCheck && items.serviceDeliveryCheck === true){ $scope.checkBotStatus = true; $scope.checkBotType = true; + $scope.botType = items.botType; + $scope.shortDesc = items.shortDesc; } - $scope.botType = items.botType; - $scope.shortDesc = items.shortDesc; //properties specific to jenkins if (items.taskType === "jenkins") { $scope.jobUrl = items.taskConfig.jobURL; diff --git a/client/htmls/private/ajax/Settings/chefSync.html b/client/htmls/private/ajax/Settings/chefSync.html index 10236f3b7..35d07e690 100755 --- a/client/htmls/private/ajax/Settings/chefSync.html +++ b/client/htmls/private/ajax/Settings/chefSync.html @@ -232,9 +232,24 @@ -
    +
    +
    - + +
    +
    + + +
    + + + +