mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
1) 'Only Table' should be disabled unless the table value is changed. Fixes #6862.
2) 'ALTER' statement should not be generated every time a user updates the password in edit mode. Fixes #6835 3) Connection timeout and sslmode value is getting updated after subscription update. Fixes #6835.
This commit is contained in:
parent
d2d819529d
commit
4bbc811aed
@ -8,6 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
import gettext from 'sources/gettext';
|
||||
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
|
||||
import _ from 'lodash';
|
||||
|
||||
|
||||
export class DefaultWithSchema extends BaseUISchema {
|
||||
@ -97,9 +98,10 @@ export default class PublicationSchema extends BaseUISchema {
|
||||
state.only_table = false;
|
||||
return true;
|
||||
}
|
||||
if (!_.isUndefined(table) && table.length > 0){
|
||||
if (!_.isUndefined(table) && table.length > 0 && !_.isEqual(this._origData.pubtable, state.pubtable)){
|
||||
return false;
|
||||
}
|
||||
state.only_table = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ class SubscriptionView(PGChildNodeView, SchemaDiffObjectCompare):
|
||||
required_args = ['name']
|
||||
|
||||
required_connection_args = ['host', 'port', 'username', 'db',
|
||||
'connect_timeout', 'passfile']
|
||||
'connect_timeout', 'passfile', 'sslmode']
|
||||
|
||||
# Set connection time out to zero if initial set
|
||||
# value is replaced to ''
|
||||
|
@ -163,7 +163,7 @@ export default class SubscriptionSchema extends BaseUISchema{
|
||||
{
|
||||
id: 'password', label: gettext('Password'), type: 'password', maxlength: null,
|
||||
group: gettext('Connection'),
|
||||
mode: ['create', 'edit'],
|
||||
mode: ['create', 'edit'], skipChange: true,
|
||||
deps: ['connect_now'],
|
||||
},
|
||||
{
|
||||
|
@ -47,9 +47,9 @@ ALTER SUBSCRIPTION {{ conn|qtIdent(o_data.name) }}
|
||||
|
||||
{% endif %}
|
||||
{### Alter subscription connection info ###}
|
||||
{% if data.host or data.port or data.username or data.password or data.db or data.connect_timeout or data.passfile or data.sslmode or data.sslcompression or data.sslcert or data.sslkey or data.sslrootcert or data.sslcrl %}
|
||||
{% if data.host or data.port or data.username or data.db or data.connect_timeout or data.passfile or data.sslmode or data.sslcompression or data.sslcert or data.sslkey or data.sslrootcert or data.sslcrl %}
|
||||
ALTER SUBSCRIPTION {{ conn|qtIdent(o_data.name) }}
|
||||
CONNECTION 'host={{ o_data.host}} port={{ o_data.port }} user={{ o_data.username }} dbname={{ o_data.db }}{% if data.connect_timeout %} connect_timeout={{ o_data.connect_timeout }}{% endif %}{% if data.passfile %} passfile={{ o_data.passfile }}{% endif %}{% if data.password %} {% if dummy %}password=xxxxxx{% else %} password={{ data.password}}{% endif %}{% endif %}{% if data.sslmode %} sslmode={{ data.sslmode }}{% endif %}{% if data.sslcompression %} sslcompression={{ data.sslcompression }}{% endif %}{% if data.sslcert %} sslcert={{ data.sslcert }}{% endif %}{% if data.sslkey %} sslkey={{ data.sslkey }}{% endif %}{% if data.sslrootcert %} sslrootcert={{ data.sslrootcert }}{% endif %}{% if data.sslcrl %} sslcrl={{ data.sslcrl }}{% endif %}';
|
||||
CONNECTION 'host={{ o_data.host}} port={{ o_data.port }} user={{ o_data.username }} dbname={{ o_data.db }} connect_timeout={{ o_data.connect_timeout }} {% if data.passfile %} passfile={{ o_data.passfile }}{% endif %} sslmode={{ o_data.sslmode }}{% if data.sslcompression %} sslcompression={{ data.sslcompression }}{% endif %}{% if data.sslcert %} sslcert={{ data.sslcert }}{% endif %}{% if data.sslkey %} sslkey={{ data.sslkey }}{% endif %}{% if data.sslrootcert %} sslrootcert={{ data.sslrootcert }}{% endif %}{% if data.sslcrl %} sslcrl={{ data.sslcrl }}{% endif %}';
|
||||
{% endif %}
|
||||
{### Alter subscription name ###}
|
||||
{% if data.name and data.name != o_data.name %}
|
||||
|
Loading…
Reference in New Issue
Block a user