public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][patch] RM5555 Wrong displayed row order
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][patch] RM5555 Wrong displayed row order
@ 2021-04-28 08:37 Rahul Shirsat <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Rahul Shirsat @ 2021-04-28 08:37 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
I was able to partially reproduce the issue, find the image below for your
reference.
[image: Screen Shot 2021-04-28 at 12.40.58 PM.png]
If a user tries clicking the button simultaneously, this issue is rarely
occurring. I don't think so any user will try to click with such a speed
to get the records.
The issue reproduced consists of only partial data displayed in the Data
Output, but was not able to reproduce the wrong sorting order of records.
I have added delays on the execute button so users won't be able to click
the button simultaneously.
--
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.
Attachments:
[image/png] Screen Shot 2021-04-28 at 12.40.58 PM.png (931.3K, 3-Screen%20Shot%202021-04-28%20at%2012.40.58%20PM.png)
download | view image
[application/octet-stream] RM5555.patch (1.9K, 4-RM5555.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index b5503255c..fa0685fab 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -1417,7 +1417,9 @@ define('tools.querytool', [
})
.done(function(res) {
self.handler.has_more_rows = res.data.has_more_rows;
- $('#btn-flash').prop('disabled', false);
+ setTimeout(() => {
+ $('#btn-flash').prop('disabled', false);
+ }, 700);
$('#btn-save-results-to-file').prop('disabled', false);
self.handler.trigger('pgadmin-sqleditor:loading-icon:hide');
self.update_grid_data(res.data.result);
@@ -1813,6 +1815,7 @@ define('tools.querytool', [
// Callback function for the flash button click.
on_flash: function() {
+ $('#btn-flash').prop('disabled', true);
let data_click_counter = $('#btn-flash').attr('data-click-counter');
data_click_counter = (parseInt(data_click_counter) + 1)%10;
$('#btn-flash').attr('data-click-counter', data_click_counter);
@@ -3099,7 +3102,8 @@ define('tools.querytool', [
// Hide the loading icon
self_col.trigger('pgadmin-sqleditor:loading-icon:hide');
- $('#btn-flash').prop('disabled', false);
+
+ // Enable/Disable download button based on query result
if (!_.isUndefined(data) && Array.isArray(data.result) && data.result.length > 0) {
self.enable_disable_download_btn(false);
}
@@ -3285,7 +3289,10 @@ define('tools.querytool', [
}
if (status != 'Busy') {
- $('#btn-flash').prop('disabled', false);
+ setTimeout(() => {
+ $('#btn-flash').prop('disabled', false);
+ }, 400);
+
self.trigger('pgadmin-sqleditor:loading-icon:hide');
if(!self.total_time) {
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][patch] RM5555 Wrong displayed row order
@ 2021-04-29 07:50 Akshay Joshi <[email protected]>
parent: Rahul Shirsat <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2021-04-29 07:50 UTC (permalink / raw)
To: Rahul Shirsat <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Wed, Apr 28, 2021 at 8:41 PM Rahul Shirsat <
[email protected]> wrote:
> Hi Hackers,
>
> I was able to partially reproduce the issue, find the image below for your
> reference.
>
> [image: Screen Shot 2021-04-28 at 12.40.58 PM.png]
>
> If a user tries clicking the button simultaneously, this issue is rarely
> occurring. I don't think so any user will try to click with such a speed
> to get the records.
>
> The issue reproduced consists of only partial data displayed in the Data
> Output, but was not able to reproduce the wrong sorting order of records.
>
> I have added delays on the execute button so users won't be able to click
> the button simultaneously.
>
> --
> *Rahul Shirsat*
> Senior Software Engineer | EnterpriseDB Corporation.
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
Attachments:
[image/png] Screen Shot 2021-04-28 at 12.40.58 PM.png (931.3K, 3-Screen%20Shot%202021-04-28%20at%2012.40.58%20PM.png)
download | view image
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-04-29 07:50 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 08:37 [pgAdmin][patch] RM5555 Wrong displayed row order Rahul Shirsat <[email protected]>
2021-04-29 07:50 ` Akshay Joshi <[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