From 9dc3750ba3199bab0022c39193fb1998966f1241 Mon Sep 17 00:00:00 2001 From: Durgesh1988 Date: Thu, 15 Sep 2016 12:05:28 +0530 Subject: [PATCH 1/3] CAT-2333 Fixed --- client/htmls/private/ajax/Settings/CreateOrg.html | 2 +- server/app/routes/v1.0/routes_provider.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/htmls/private/ajax/Settings/CreateOrg.html b/client/htmls/private/ajax/Settings/CreateOrg.html index cc371df58..46b67c0dc 100755 --- a/client/htmls/private/ajax/Settings/CreateOrg.html +++ b/client/htmls/private/ajax/Settings/CreateOrg.html @@ -37,7 +37,7 @@

Create Organization

- + diff --git a/server/app/routes/v1.0/routes_provider.js b/server/app/routes/v1.0/routes_provider.js index c0cee7cde..cd0ab9175 100644 --- a/server/app/routes/v1.0/routes_provider.js +++ b/server/app/routes/v1.0/routes_provider.js @@ -2162,6 +2162,9 @@ module.exports.setRoutes = function(app, sessionVerificationFunc) { var orgId = req.body.orgId; var s3BucketName=req.body.s3BucketName; var plannedCost=req.body.plannedCost; + if(plannedCost === null || plannedCost ===''){ + plannedCost=0.0; + } var isDefault = (req.body.isDefault === 'true') ? true : false; var hasDefaultProvider = false; @@ -2457,6 +2460,9 @@ module.exports.setRoutes = function(app, sessionVerificationFunc) { var orgId = req.body.orgId; var s3BucketName = req.body.s3BucketName; var plannedCost = req.body.plannedCost; + if(plannedCost === null || plannedCost ===''){ + plannedCost=0.0; + } if (typeof providerId === 'undefined' || providerId.length === 0) { res.status(400).send("{Please Enter ProviderId.}"); return; From c417743204a07ca7890a31aaa24c405a56b0a637 Mon Sep 17 00:00:00 2001 From: Durgesh1988 Date: Thu, 15 Sep 2016 16:55:36 +0530 Subject: [PATCH 2/3] CAT-2333/CAT-2335/CAT-2334 Fixed --- .../private/ajax/Settings/providerSync.html | 34 +++++++++++++++-- client/htmls/private/js/settingscommon.js | 4 +- client/htmls/public/instanceLog.html | 2 +- client/htmls/public/js/awsCapacity.js | 37 +++++++++++++++---- server/app/model/classes/instance/instance.js | 20 +++++----- .../unassigned-instances.js | 12 +++--- .../unmanaged-instance/unmanaged-instance.js | 14 +++---- .../app/routes/v1.0/routes_cloudformation.js | 2 +- server/app/services/instanceService.js | 6 ++- 9 files changed, 94 insertions(+), 37 deletions(-) diff --git a/client/htmls/private/ajax/Settings/providerSync.html b/client/htmls/private/ajax/Settings/providerSync.html index bfb4727f6..48a1e19a7 100644 --- a/client/htmls/private/ajax/Settings/providerSync.html +++ b/client/htmls/private/ajax/Settings/providerSync.html @@ -780,7 +780,19 @@ "columns": [ {"data": "platformId","orderable" : true }, {"data": "hardware.os","orderable" : false }, - {"data": "instanceIP","orderable" : true }, + {"data": "instanceIP","orderable" : true, + "render":function(data, type, full, meta) { + if(full.instanceIP === null){ + if(full.privateIpAddress === null){ + return '-'; + }else{ + return full.privateIpAddress; + } + }else{ + return full.instanceIP; + } + } + }, {"data": "","orderable" : true, "render":function(data, type, full, meta) { return full.region?full.region:full.providerData?full.providerData.region:'-'; @@ -1697,7 +1709,15 @@ {"data": "os","orderable" : false }, {"data": "","orderable" : true, "render":function(data, type, full, meta) { - return full.ip !== null ? full.ip:full.privateIpAddress; + if(full.ip === null){ + if(full.privateIpAddress === null){ + return '-'; + }else{ + return full.privateIpAddress; + } + }else{ + return full.ip; + } } }, {"data": "","orderable" : true, @@ -1866,7 +1886,15 @@ {"data": "os","orderable" : false }, {"data": "","orderable" : true, "render":function(data, type, full, meta) { - return full.ip !== null ? full.ip:full.privateIpAddress; + if(full.ip === null){ + if(full.privateIpAddress === null){ + return '-'; + }else{ + return full.privateIpAddress; + } + }else{ + return full.ip; + } } }, {"data": "state","orderable" : true }, diff --git a/client/htmls/private/js/settingscommon.js b/client/htmls/private/js/settingscommon.js index 2a258ad94..72feb9ac4 100755 --- a/client/htmls/private/js/settingscommon.js +++ b/client/htmls/private/js/settingscommon.js @@ -3441,11 +3441,11 @@ function isFormValid(formid) { currCtrl.focus(); } - if (!/[!@#$%^&*]/.test(str)) { + /*if (!/[!@#$%^&*]/.test(str)) { isValid = false; errormessageforInput(currCtrl.attr('id'), "Atleast a special char is required."); currCtrl.focus(); - } + }*/ } break; diff --git a/client/htmls/public/instanceLog.html b/client/htmls/public/instanceLog.html index dc1892ac7..4f13795fe 100644 --- a/client/htmls/public/instanceLog.html +++ b/client/htmls/public/instanceLog.html @@ -280,7 +280,7 @@