diff --git a/client/cat3/src/factory/workzoneServices.js b/client/cat3/src/factory/workzoneServices.js index 58226abef..7a7622f18 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, tagServer) { + launchBlueprint: function (blueprintID, version, envId, stackName,domainName, tagServer, monitorId) { var url = '/blueprints/' + blueprintID + '/launch?version=' + version + - '&envId=' + envId + '&stackName=' + stackName + '&domainName=' + domainName + '&tagServer=' + tagServer; + '&envId=' + envId + '&stackName=' + stackName + '&domainName=' + domainName + '&tagServer=' + tagServer + '&monitorId=' + monitorId; return $http.get(fullUrl(url), Auth.getHeaderObject()); }, getBlueprintById: function(blueprintId) { @@ -542,6 +542,13 @@ getBotCategoryList:function () { var url ='/config-data/category-type'; return $http.get(fullUrl(url),Auth.getHeaderObject()); + }, + getMonitorList:function (orgId) { + var url = '/monitors'; + if(orgId){ + url += '?filterBy=orgId:' + orgId; + } + return $http.get(fullUrl(url),Auth.getHeaderObject()); } }; return serviceInterface; 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 140d5f3e9..4141b54a0 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 @@ -82,6 +82,7 @@ } } var selectedVersionBpId = bpItem.bp.selectedVersionBpId; + var monitorId = bpItem.monitorId; if(bpItem && bpItem.bp && bpItem.bp.selectedVersionBpId){ selectedVersionBpId = bpItem.bp.selectedVersionBpId; } else { @@ -94,7 +95,7 @@ if(bpItem.launchEnv){ lEnv=bpItem.launchEnv; } - workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, lEnv, bpItem.stackName,bpItem.domainName,bpItem.tagServer).then(function(bpLaunchResponse) { + workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, lEnv, bpItem.stackName,bpItem.domainName,bpItem.tagServer,monitorId).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 12968c968..c471982d6 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 @@ -49,6 +49,16 @@ +
+ + +
+
(Only numbers,letters allowed. No spaces and underscores) diff --git a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js index b9fd89e7e..b8b4e9818 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParamsCtrl.js @@ -10,17 +10,28 @@ angular.module('workzone.blueprint') .controller('blueprintLaunchParamsCtrl', ['$scope', '$modalInstance', 'toastr', 'items','workzoneServices','genericServices','workzoneEnvironment', function($scope, $modalInstance, toastr, items,workzoneServices,genericServices,workzoneEnvironment) { console.log(items); + $scope.showMonitor = true; + if(items.blueprintType === 'azure_arm' || items.blueprintType === 'azure_launch') { + $scope.showMonitor = false; + } var launchHelper = { launch : function(){ - $modalInstance.close({bp:items,stackName:$scope.stackName,domainName:$scope.domainName,tagServer:$scope.tagSerSelected,launchEnv:$scope.envSeleted}); + $modalInstance.close({bp:items,stackName:$scope.stackName,domainName:$scope.domainName,tagServer:$scope.tagSerSelected,launchEnv:$scope.envSeleted,monitorId:$scope.monitorId}); } }; //var bPLP=this; $scope.taggingServerList=[]; $scope.envOptions=[]; + $scope.monitorList = []; workzoneServices.getTaggingServer().then(function (topSer) { $scope.taggingServerList=topSer.data; }); + $scope.monitorId = 'null'; + $scope.getMonitorList = function(orgId) { + workzoneServices.getMonitorList(orgId).then(function (response) { + $scope.monitorList = response.data; + }); + } genericServices.getTreeNew().then(function (envData) { angular.forEach(envData,function(val){ var orgID,bgID,projID; @@ -28,10 +39,12 @@ orgID = (items.orgId)?items.orgId:items.organization.id; bgID = (items.bgId)?items.bgId:items.businessGroup.id; projID = (items.projectId)?items.projectId:items.project.id; + $scope.getMonitorList(orgID); } else { orgID = items.organizationId; bgID = items.businessGroupId; projID = items.projectId; + $scope.getMonitorList(orgID); } if(val.rowid === orgID){ $scope.orgSeleted=val.name; @@ -58,7 +71,7 @@ }); $scope.stackName=''; $scope.domainName=''; - $scope.tagSerSelected = ""; + $scope.tagSerSelected = ''; $scope.cancel = function() { $modalInstance.dismiss('cancel'); }; diff --git a/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/InstanceImportByIpCtrl.js b/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/InstanceImportByIpCtrl.js index f6571a64d..0dc6e108c 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/InstanceImportByIpCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/InstanceImportByIpCtrl.js @@ -13,6 +13,7 @@ var osList = items[1].data; var configList = items[2].data; var reqBody = {}; + $scope.monitorList = []; //$scope.tagSerSelected = 'Monitoring'; if (!configAvailable.length) { $scope.cancel(); @@ -22,6 +23,11 @@ $scope.taggingServerList=[]; workzoneServices.getTaggingServer().then(function (topSer) { $scope.taggingServerList=topSer.data; + }); + $scope.monitorId = 'null'; + var p = workzoneEnvironment.getEnvParams(); + workzoneServices.getMonitorList(p.org).then(function (response) { + $scope.monitorList = response.data; }); $scope.tagServerChecking = function() { if($scope.tagServerCheck){ @@ -60,6 +66,7 @@ reqBody.fqdn = $scope.ipAddress; reqBody.os = $scope.os; reqBody.configManagmentId = $scope.selectedConfig; + reqBody.monitorId = $scope.monitorId; if($scope.tagServerCheck) { reqBody.tagServer = $scope.tagSerSelected; } diff --git a/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/instanceImportByIp.html b/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/instanceImportByIp.html index fc6ee3c13..3b014e827 100644 --- a/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/instanceImportByIp.html +++ b/client/cat3/src/partials/sections/dashboard/workzone/instance/popups/instanceImportByIp.html @@ -100,6 +100,17 @@
+
+
+ + +
+
@@ -137,7 +148,7 @@
-
+
diff --git a/client/htmls/private/ajax/Settings/CreateConfigManagement.html b/client/htmls/private/ajax/Settings/CreateConfigManagement.html index 68d797167..f10675fea 100755 --- a/client/htmls/private/ajax/Settings/CreateConfigManagement.html +++ b/client/htmls/private/ajax/Settings/CreateConfigManagement.html @@ -100,14 +100,6 @@

New Configuration Management

- -
@@ -155,40 +147,6 @@

New Configuration Management '+data[i].name+''; - } - } - $('#monitorId').html(str); - }); - } - - $('input[name="updateMonitoringInfo"]').change(function(e){ - if(this.checked){ - $('#monitorId').removeAttr('disabled').attr('cat-validation','required'); - } else { - $('#monitorId').val('').attr('selected', true).change(); - $('#monitorId').removeAttr('cat-validation').attr('disabled','disabled');; - } - }); function isUserTypeSuperAdmin(){ $.get('/d4dMasters/loggedInUser',function(data){ @@ -236,29 +194,7 @@

New Configuration Management $(document).ready(function () { var isEditActivateLocation = location.href.toString().split('?')[1]==="new"?false:true; - var rowid = url.substr(url.indexOf("?") + 1); - if(isEditActivateLocation){ - $.get('/d4dMasters/readmasterjsonrecord/10'+ '/' + rowid,function(data){ - if(data.monitor !== null){ - $('.monitoringCheck').removeClass('hidden'); - $("input[name='updateMonitoringInfo']").attr('checked', true); - $('#monitorId').removeClass('hidden'); - $.get('../monitors',function(monitorData){ - var orgValue = $('select#orgname option:selected').attr('rowid'); - var str = ''; - for(var i=0;i'+monitorData[i].name+''; - $('#monitorId').append(str).removeAttr('disabled'); - $("#monitorId").val(data.monitor.id).attr('selected', true).change(); - } - } - }); - } else { - getMonitorValues(); - } - }); - } + $("#configname").focus(); $('#myForm22').submit(function() { diff --git a/client/htmls/private/ajax/Settings/CreateProviders.html b/client/htmls/private/ajax/Settings/CreateProviders.html index 9997da7bc..15221663f 100755 --- a/client/htmls/private/ajax/Settings/CreateProviders.html +++ b/client/htmls/private/ajax/Settings/CreateProviders.html @@ -244,14 +244,6 @@

Select Organization - - @@ -288,41 +280,6 @@