Skip to content

Commit fc1a161

Browse files
committed
Ensure the newly added parameters in the server dialog are incorporated into the Import/Export Servers functionality. #8514
1 parent 47eca9a commit fc1a161

File tree

3 files changed

+45
-16
lines changed

3 files changed

+45
-16
lines changed

docs/en_US/import_export_servers.rst

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,41 +148,50 @@ The following example shows both a minimally defined and a fully defined server:
148148
"Port": 5432,
149149
"Username": "postgres",
150150
"Host": "localhost",
151-
"SSLMode": "prefer",
152-
"MaintenanceDB": "postgres"
151+
"MaintenanceDB": "postgres",
152+
"ConnectionParameters": {
153+
"sslmode": "prefer",
154+
"connect_timeout": 10
155+
}
153156
},
154157
"2": {
155158
"Name": "Fully Defined Server",
156159
"Group": "Server Group 2",
157160
"Host": "host.domain.com",
158-
"HostAddr": "192.168.1.2",
159161
"Port": 5432,
160162
"MaintenanceDB": "postgres",
161163
"Username": "postgres",
162164
"Role": "my_role_name",
163-
"SSLMode": "require",
164165
"Comment": "This server has every option configured in the JSON",
165166
"DBRestriction": "live_db test_db",
166-
"PassFile": "/path/to/pgpassfile",
167-
"SSLCert": "/path/to/sslcert.crt",
168-
"SSLKey": "/path/to/sslcert.key",
169-
"SSLRootCert": "/path/to/sslroot.crt",
170-
"SSLCrl": "/path/to/sslcrl.crl",
171-
"SSLCompression": 1,
172167
"Shared": false,
173168
"SharedUsername": "postgres",
174169
"BGColor": "#ff9900",
175170
"FGColor": "#000000",
176171
"Service": "postgresql-10",
177-
"Timeout": 60,
178172
"UseSSHTunnel": 1,
179173
"TunnelHost": "192.168.1.253",
180174
"TunnelPort": 22,
181175
"TunnelUsername": "username",
182-
"TunnelAuthentication": 0,
176+
"TunnelAuthentication": 1,
177+
"TunnelIdentityFile": "/Users/<user>/.ssh/id_rsa.pub",
178+
"TunnelKeepAlive": 30,
183179
"PasswordExecCommand": "echo 'test'",
184-
"PasswordExecExpiration": 100
180+
"PasswordExecExpiration": 100,
181+
"KerberosAuthentication": true,
182+
"ConnectionParameters": {
183+
"sslmode": "prefer",
184+
"connect_timeout": 10,
185+
"passfile": "/Users/<user>/.pgpass",
186+
"sslcert": "/Users/<user>/.ssh/cert"
187+
},
188+
"Tags": [
189+
{
190+
"color": "#EC0BB4",
191+
"text": "Development"
192+
}
193+
],
194+
"PostConnectionSQL": "set timezone='America/New_York'"
185195
}
186196
}
187-
}
188-
197+
}

docs/en_US/release_notes_9_2.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ Bug fixes
4040
| `Issue #8437 <https://github.com/pgadmin-org/pgadmin4/issues/8437>`_ - Fixed an issue where the PSQL terminal displays keyname for non alphanumeric keys.
4141
| `Issue #8462 <https://github.com/pgadmin-org/pgadmin4/issues/8462>`_ - Fixed an issue where geometries in the geometry viewer will render partially when the container was resized.
4242
| `Issue #8473 <https://github.com/pgadmin-org/pgadmin4/issues/8473>`_ - Change the stop/terminate icon at all the places for better UX.
43-
| `Issue #8479 <https://github.com/pgadmin-org/pgadmin4/issues/8479>`_ - Fixed an issue where the Schema Diff was not displaying the difference query when a table had a UNIQUE NULLS NOT DISTINCT constraint.
43+
| `Issue #8479 <https://github.com/pgadmin-org/pgadmin4/issues/8479>`_ - Fixed an issue where the Schema Diff was not displaying the difference query when a table had a UNIQUE NULLS NOT DISTINCT constraint.
44+
| `Issue #8514 <https://github.com/pgadmin-org/pgadmin4/issues/8514>`_ - Ensure the newly added parameters in the server dialog are incorporated into the Import/Export Servers functionality.
45+
| `Issue #8546 <https://github.com/pgadmin-org/pgadmin4/issues/8546>`_ - Fixed an issue where updating the grantee was not correctly applying the privileges.

web/pgadmin/utils/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,19 @@ def dump_database_servers(output_file, selected_servers,
522522
add_value(attr_dict, "TunnelUsername", server.tunnel_username)
523523
add_value(attr_dict, "TunnelAuthentication",
524524
server.tunnel_authentication)
525+
add_value(attr_dict, "TunnelIdentityFile",
526+
server.tunnel_identity_file)
527+
add_value(attr_dict, "TunnelKeepAlive",
528+
server.tunnel_keep_alive)
525529
add_value(attr_dict, "KerberosAuthentication",
526530
server.kerberos_conn),
527531
add_value(attr_dict, "ConnectionParameters",
528532
server.connection_params)
529533
add_value(attr_dict, "Tags", server.tags)
534+
add_value(attr_dict, "PrepareThreshold",
535+
server.prepare_threshold)
536+
add_value(attr_dict, "PostConnectionSQL",
537+
server.post_connection_sql)
530538

531539
# if desktop mode or server mode with
532540
# ENABLE_SERVER_PASS_EXEC_CMD flag is True
@@ -759,6 +767,12 @@ def load_database_servers(input_file, selected_servers,
759767
new_server.tunnel_authentication = \
760768
obj.get("TunnelAuthentication", None)
761769

770+
new_server.tunnel_identity_file = \
771+
obj.get("TunnelIdentityFile", None)
772+
773+
new_server.tunnel_keep_alive = \
774+
obj.get("TunnelKeepAlive", None)
775+
762776
new_server.shared = obj.get("Shared", None)
763777

764778
new_server.shared_username = obj.get("SharedUsername", None)
@@ -767,6 +781,10 @@ def load_database_servers(input_file, selected_servers,
767781

768782
new_server.tags = obj.get("Tags", None)
769783

784+
new_server.prepare_threshold = obj.get("PrepareThreshold", None)
785+
786+
new_server.post_connection_sql = obj.get("PostConnectionSQL", None)
787+
770788
# if desktop mode or server mode with
771789
# ENABLE_SERVER_PASS_EXEC_CMD flag is True
772790
if not current_app.config['SERVER_MODE'] or \

0 commit comments

Comments
 (0)