public inbox for [email protected]
help / color / mirror / Atom feedFrom: Khushboo Vashi <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch] - BigAnimal Fixes
Date: Wed, 27 Apr 2022 11:20:02 +0530
Message-ID: <CAFOhELdTUz=B1w2XPACEyL6q+zvpKzOyLbjSmaBNgdcO+cOciQ@mail.gmail.com> (raw)
Hi,
While deploying the PostgreSQL on the BigAnimal cloud, the Public IP
addresses were not added, fixed this issue in the attached patch.
Thanks,
Khushboo
Attachments:
[application/octet-stream] cloud_public_ip_fixe.patch (3.6K, 3-cloud_public_ip_fixe.patch)
download | inline diff:
diff --git a/web/pgadmin/misc/cloud/biganimal/__init__.py b/web/pgadmin/misc/cloud/biganimal/__init__.py
index efbc494ee..4b4d0b55b 100644
--- a/web/pgadmin/misc/cloud/biganimal/__init__.py
+++ b/web/pgadmin/misc/cloud/biganimal/__init__.py
@@ -389,9 +389,9 @@ def deploy_on_biganimal(data):
_private_network
]
- if 'public_ip' in data['instance_details']:
+ if 'biganimal_public_ip' in data['instance_details']:
args.append('--public-ip')
- args.append(str(data['instance_details']['public_ip']))
+ args.append(str(data['instance_details']['biganimal_public_ip']))
_cmd_msg = '{0} {1} {2}'.format(_cmd, _cmd_script, ' '.join(args))
try:
diff --git a/web/pgadmin/misc/cloud/static/js/biganimal.js b/web/pgadmin/misc/cloud/static/js/biganimal.js
index b7b763ade..85d41e90a 100644
--- a/web/pgadmin/misc/cloud/static/js/biganimal.js
+++ b/web/pgadmin/misc/cloud/static/js/biganimal.js
@@ -157,7 +157,7 @@ export function getBigAnimalSummary(cloud, bigAnimalInstanceData, bigAnimalDatab
createData('Instance name', bigAnimalInstanceData.name),
createData('Region', bigAnimalInstanceData.region),
createData('Cluster type', bigAnimalInstanceData.cloud_type),
- createData('Public IPs', bigAnimalInstanceData.public_ip),
+ createData('Public IPs', bigAnimalInstanceData.biganimal_public_ip),
];
let instance_size = bigAnimalInstanceData.instance_size.split('||');
diff --git a/web/pgadmin/misc/cloud/static/js/cloud.js b/web/pgadmin/misc/cloud/static/js/cloud.js
index b57337d87..22f74ce6d 100644
--- a/web/pgadmin/misc/cloud/static/js/cloud.js
+++ b/web/pgadmin/misc/cloud/static/js/cloud.js
@@ -142,7 +142,7 @@ define('pgadmin.misc.cloud', [
onrestore:function(){
Alertify.cloudWizardDialog().elements.modal.style.maxHeight=0;
},
- }).resizeTo(920, 620);
+ }).resizeTo(920, 650);
},
diff --git a/web/pgadmin/misc/cloud/static/js/cloud_db_details_schema.ui.js b/web/pgadmin/misc/cloud/static/js/cloud_db_details_schema.ui.js
index ef906b5f5..69768239a 100644
--- a/web/pgadmin/misc/cloud/static/js/cloud_db_details_schema.ui.js
+++ b/web/pgadmin/misc/cloud/static/js/cloud_db_details_schema.ui.js
@@ -464,7 +464,7 @@ class BigAnimalNetworkSchema extends BaseUISchema {
super({
oid: undefined,
cloud_type: '',
- public_ip: '',
+ biganimal_public_ip: '',
...initValues
});
@@ -488,8 +488,10 @@ class BigAnimalNetworkSchema extends BaseUISchema {
{'label': gettext('Private'), 'value': 'private'},
{'label': gettext('Public'), 'value': 'public'},
], noEmpty: true,
+ helpMessage: gettext('Private networking allows only IP addresses within your private network to connect to your cluster.'
+ + ' Public means that any client can connect to your cluster’s public IP address over the internet.')
},{
- id: 'public_ip', label: gettext('Public IP range'), type: 'text',
+ id: 'biganimal_public_ip', label: gettext('Public IP range'), type: 'text',
mode: ['create'], deps: ['cloud_type'],
disabled: (state) => {
if (state.cloud_type == 'public') return false;
@@ -498,9 +500,9 @@ class BigAnimalNetworkSchema extends BaseUISchema {
depChange: (state, source)=> {
if(source[0] == 'cloud_type') {
if (state.cloud_type == 'public') {
- return {public_ip: obj.initValues.hostIP};
+ return {biganimal_public_ip: obj.initValues.hostIP};
} else {
- return {public_ip: ''};
+ return {biganimal_public_ip: ''};
}
}
},
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin4][Patch] - BigAnimal Fixes
In-Reply-To: <CAFOhELdTUz=B1w2XPACEyL6q+zvpKzOyLbjSmaBNgdcO+cOciQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox