1) Source/Target database and schema should be selected by default when the user selects any server in the schema diff tool.

2) Added line break for the generated script if select multiple objects.
3) Remove reactivated RM from the release notes.
This commit is contained in:
Akshay Joshi 2020-02-05 14:36:05 +05:30
parent 520b03cb0a
commit 26cdda090e
3 changed files with 53 additions and 10 deletions

View File

@ -40,5 +40,4 @@ Bug fixes
| `Issue #5066 <https://redmine.postgresql.org/issues/5066>`_ - Fix an issue where refreshing a package results in the change in the object completely.
| `Issue #5074 <https://redmine.postgresql.org/issues/5074>`_ - Fix an issue where select, insert and update scripts on tables throwing an error.
| `Issue #5076 <https://redmine.postgresql.org/issues/5076>`_ - Ensure Postfix starts in the container, now it runs as non-root by default.
| `Issue #5107 <https://redmine.postgresql.org/issues/5107>`_ - Set proper focus on tab navigation for file manager dialog.
| `Issue #5116 <https://redmine.postgresql.org/issues/5116>`_ - Fixed an issue where Save Password control disappears after clicking on it while creating a server.

View File

@ -555,7 +555,7 @@ def generate_script(trans_id):
comp_status=comp_status,
generate_script=True)
diff_ddl += sql['diff_ddl']
diff_ddl += sql['diff_ddl'] + '\n\n'
return ajax_response(
status=200,
@ -585,10 +585,6 @@ def ddl_compare(trans_id, source_sid, source_did, source_scid,
if error_msg == gettext('Transaction ID not found in the session.'):
return make_json_response(success=0, errormsg=error_msg, status=404)
source_ddl = ''
target_ddl = ''
diff_ddl = ''
view = SchemaDiffRegistry.get_node_view(node_type)
if view and hasattr(view, 'ddl_compare'):
sql = view.ddl_compare(source_sid=source_sid, source_did=source_did,

View File

@ -600,8 +600,20 @@ export default class SchemaDiffUI {
placeholder: gettext('Select database...'),
},
disabled: function(m) {
if (!_.isUndefined(m.get('source_sid')) && !_.isNull(m.get('source_sid')))
let self = this;
if (!_.isUndefined(m.get('source_sid')) && !_.isNull(m.get('source_sid'))
&& m.get('source_sid') !== '') {
setTimeout(function() {
if (self.options.length > 0) {
m.set('source_did', self.options[0].value);
}
}, 10);
return false;
}
setTimeout(function() {
m.set('source_did', undefined);
}, 10);
return true;
},
connect: function() {
@ -622,8 +634,20 @@ export default class SchemaDiffUI {
placeholder: gettext('Select schema...'),
},
disabled: function(m) {
if (!_.isUndefined(m.get('source_did')) && !_.isNull(m.get('source_did')))
let self = this;
if (!_.isUndefined(m.get('source_did')) && !_.isNull(m.get('source_did'))
&& m.get('source_did') !== '') {
setTimeout(function() {
if (self.options.length > 0) {
m.set('source_scid', self.options[0].value);
}
}, 10);
return false;
}
setTimeout(function() {
m.set('source_scid', undefined);
}, 10);
return true;
},
}, {
@ -656,8 +680,20 @@ export default class SchemaDiffUI {
placeholder: gettext('Select database...'),
},
disabled: function(m) {
if (!_.isUndefined(m.get('target_sid')) && !_.isNull(m.get('target_sid')))
let self = this;
if (!_.isUndefined(m.get('target_sid')) && !_.isNull(m.get('target_sid'))
&& m.get('target_sid') !== '') {
setTimeout(function() {
if (self.options.length > 0) {
m.set('target_did', self.options[0].value);
}
}, 10);
return false;
}
setTimeout(function() {
m.set('target_did', undefined);
}, 10);
return true;
},
connect: function() {
@ -678,8 +714,20 @@ export default class SchemaDiffUI {
placeholder: gettext('Select schema...'),
},
disabled: function(m) {
if (!_.isUndefined(m.get('target_did')) && !_.isNull(m.get('target_did')))
let self = this;
if (!_.isUndefined(m.get('target_did')) && !_.isNull(m.get('target_did'))
&& m.get('target_did') !== '') {
setTimeout(function() {
if (self.options.length > 0) {
m.set('target_scid', self.options[0].value);
}
}, 10);
return false;
}
setTimeout(function() {
m.set('target_scid', undefined);
}, 10);
return true;
},
}],