Fixed an issue where Grant wizard unable to handle multiple objects when the query string parameter exceeds its limit. Fixes #4511

This commit is contained in:
Aditya Toshniwal
2020-01-20 17:53:21 +05:30
committed by Akshay Joshi
parent b4b54d6b94
commit fde8e4054a
5 changed files with 15 additions and 19 deletions

View File

@@ -24,6 +24,7 @@ Bug fixes
********* *********
| `Issue #3812 <https://redmine.postgresql.org/issues/3812>`_ - Ensure that path file name should not disappear when changing ext from the dropdown in file explorer dialog. | `Issue #3812 <https://redmine.postgresql.org/issues/3812>`_ - Ensure that path file name should not disappear when changing ext from the dropdown in file explorer dialog.
| `Issue #4511 <https://redmine.postgresql.org/issues/4511>`_ - Fixed an issue where Grant wizard unable to handle multiple objects when the query string parameter exceeds its limit.
| `Issue #4827 <https://redmine.postgresql.org/issues/4827>`_ - Fix column resizable issue in the file explorer dialog. | `Issue #4827 <https://redmine.postgresql.org/issues/4827>`_ - Fix column resizable issue in the file explorer dialog.
| `Issue #5000 <https://redmine.postgresql.org/issues/5000>`_ - Logout the pgAdmin session when no user activity of mouse move, click or keypress. | `Issue #5000 <https://redmine.postgresql.org/issues/5000>`_ - Logout the pgAdmin session when no user activity of mouse move, click or keypress.
| `Issue #5025 <https://redmine.postgresql.org/issues/5025>`_ - Fix an issue where setting STORAGE_DIR to empty should show all the volumes on Windows in server mode. | `Issue #5025 <https://redmine.postgresql.org/issues/5025>`_ - Fix an issue where setting STORAGE_DIR to empty should show all the volumes on Windows in server mode.

View File

@@ -341,13 +341,18 @@ define([
backgridDivTop = backgridDiv.offset().top, backgridDivTop = backgridDiv.offset().top,
backgridDivHeight = backgridDiv.height(), backgridDivHeight = backgridDiv.height(),
backformTab = $(this).closest(cls), // Backform-tab backformTab = $(this).closest(cls), // Backform-tab
gridScroll = backformTab[0].offsetHeight - backgridDivTop; gridScroll = null;
if(backformTab.length == 0) {
return false;
}
gridScroll = backformTab[0].offsetHeight - backgridDivTop;
if (backgridDivHeight > gridScroll) { if (backgridDivHeight > gridScroll) {
var top = elem.get(0).offsetTop + elem.height(); var top = elem.get(0).offsetTop + elem.height();
backformTab.find('.tab-content').scrollTop(top); backformTab.find('.tab-content').scrollTop(top);
} }
return; return true;
}); });
}; };

View File

@@ -1421,13 +1421,10 @@ define([
newRow = self.grid.body.rows[idx].$el; newRow = self.grid.body.rows[idx].$el;
newRow.addClass('new'); newRow.addClass('new');
try { if(!$(newRow).pgMakeBackgridVisible('.backform-tab')){
$(newRow).pgMakeBackgridVisible('.backform-tab');
} catch(err) {
// We can have subnode controls in Panels // We can have subnode controls in Panels
$(newRow).pgMakeBackgridVisible('.set-group'); $(newRow).pgMakeBackgridVisible('.set-group');
} }
return false; return false;
} }
}); });
@@ -1692,9 +1689,8 @@ define([
newRow.attr('class', 'new').on('click',() => { newRow.attr('class', 'new').on('click',() => {
$(this).attr('class', 'editable'); $(this).attr('class', 'editable');
}); });
try {
$(newRow).pgMakeBackgridVisible('.backform-tab'); if(!$(newRow).pgMakeBackgridVisible('.backform-tab')){
} catch(err) {
// We can have subnode controls in Panels // We can have subnode controls in Panels
$(newRow).pgMakeBackgridVisible('.set-group'); $(newRow).pgMakeBackgridVisible('.set-group');
} }

View File

@@ -336,7 +336,7 @@ def properties(sid, did, node_id, node_type):
@blueprint.route( @blueprint.route(
'/sql/<int:sid>/<int:did>/', '/sql/<int:sid>/<int:did>/',
methods=['GET'], endpoint='modified_sql' methods=['POST'], endpoint='modified_sql'
) )
@login_required @login_required
@check_precondition @check_precondition
@@ -346,13 +346,7 @@ def msql(sid, did):
""" """
server_prop = server_info server_prop = server_info
data = {} data = request.form if request.form else json.loads(request.data.decode())
for k, v in request.args.items():
try:
data[k] = json.loads(v)
except ValueError:
data[k] = v
# Form db connection # Form db connection
manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(sid) manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(sid)
conn = manager.connection(did=did) conn = manager.connection(did=did)

View File

@@ -1012,9 +1012,9 @@ define([
// Fetches modified SQL // Fetches modified SQL
$.ajax({ $.ajax({
url: this.msql_url, url: this.msql_url,
type: 'GET', type: 'POST',
cache: false, cache: false,
data: self.model.toJSON(true, 'GET'), data: JSON.stringify(self.model.toJSON(true)),
dataType: 'json', dataType: 'json',
contentType: 'application/json', contentType: 'application/json',
}).done(function(res) { }).done(function(res) {