public inbox for [email protected]
help / color / mirror / Atom feedPATCH: RM#1733
2+ messages / 2 participants
[nested] [flat]
* PATCH: RM#1733
@ 2016-09-23 22:41 Ashesh Vashi <[email protected]>
2016-09-26 09:50 ` Re: PATCH: RM#1733 Dave Page <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Ashesh Vashi @ 2016-09-23 22:41 UTC (permalink / raw)
To: pgadmin-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);
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PATCH: RM#1733
2016-09-23 22:41 PATCH: RM#1733 Ashesh Vashi <[email protected]>
@ 2016-09-26 09:50 ` Dave Page <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2016-09-26 09:50 UTC (permalink / raw)
To: Ashesh Vashi <[email protected]>; +Cc: pgadmin-hackers
Thanks, applied.
On Fri, Sep 23, 2016 at 11:41 PM, Ashesh Vashi <
[email protected]> wrote:
> 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
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-09-26 09:50 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23 22:41 PATCH: RM#1733 Ashesh Vashi <[email protected]>
2016-09-26 09:50 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox