public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ashesh Vashi <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: PATCH: RM#1733
Date: Sat, 24 Sep 2016 04:11:42 +0530
Message-ID: <CAG7mmowteePMQap_KVxh2mw5j4Q5wz9TMfNcza_WAk+-1NeNDQ@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi Dave/Team,
Please find the patch for the issue - 'Filter option taking too much time
to load'.
Actually - it wasn't taking any time, but - we did not hide the loading div
properly.
Please find the patch, which also takes care of other similar possible
issue along with the above issue.
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com;
*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi;
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM1733.patch (4.6K, 3-RM1733.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
index f7cf0ab..83c70f2 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js
@@ -1601,10 +1601,12 @@ define(
self._poll();
}
else {
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
self.update_msg_history(false, res.data.result);
}
},
error: function(e) {
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
if (e.readyState == 0) {
self.update_msg_history(false,
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
@@ -1668,6 +1670,7 @@ define(
$("#btn-cancel-query").prop('disabled', true);
}
is_query_running = false;
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
}
else if (res.data.status === 'Busy') {
// If status is Busy then poll the result by recursive call to the poll function
@@ -1678,7 +1681,7 @@ define(
}
}
else if (res.data.status === 'NotConnected') {
-
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
// Enable/Disable query tool button only if is_query_tool is true.
if (self.is_query_tool) {
self.disable_tool_buttons(false);
@@ -1687,11 +1690,13 @@ define(
self.update_msg_history(false, res.data.result, true);
}
else if (res.data.status === 'Cancel') {
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
self.update_msg_history(false, "Execution Cancelled!", true)
}
},
error: function(e) {
// Enable/Disable query tool button only if is_query_tool is true.
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
if (self.is_query_tool) {
self.disable_tool_buttons(false);
$("#btn-cancel-query").prop('disabled', true);
@@ -2208,13 +2213,12 @@ define(
'query': r.sql, 'row_affected': r.rows_affected,
'total_time': self.total_time, 'message': r.result
});
- self.trigger('pgadmin-sqleditor:loading-icon:hide');
});
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
grid.invalidate();
},
error: function(e) {
- self.trigger('pgadmin-sqleditor:loading-icon:hide');
if (e.readyState == 0) {
self.update_msg_history(false,
'{{ _('Not connected to the server or the connection to the server has been closed.') }}'
@@ -2430,6 +2434,7 @@ define(
url: "{{ url_for('sqleditor.index') }}" + "filter/get/" + self.transId,
method: 'GET',
success: function(res) {
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
if (res.data.status) {
$('#filter').removeClass('hidden');
$('#editor-panel').addClass('sql-editor-busy-fetching');
@@ -2439,9 +2444,7 @@ define(
self.gridView.filter_obj.setValue('');
else
self.gridView.filter_obj.setValue(res.data.result);
- }
- else {
- self.trigger('pgadmin-sqleditor:loading-icon:hide');
+ } else {
setTimeout(
function() {
alertify.alert('Get Filter Error', res.data.result);
@@ -2995,6 +2998,7 @@ define(
self._poll();
}
else {
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
self.disable_tool_buttons(false);
$("#btn-cancel-query").prop('disabled', true);
self.update_msg_history(false, res.data.result);
@@ -3004,6 +3008,7 @@ define(
}
},
error: function(e) {
+ self.trigger('pgadmin-sqleditor:loading-icon:hide');
self.disable_tool_buttons(false);
$("#btn-cancel-query").prop('disabled', true);
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: PATCH: RM#1733
In-Reply-To: <CAG7mmowteePMQap_KVxh2mw5j4Q5wz9TMfNcza_WAk+-1NeNDQ@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