public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin] RM4892 pgAdmin "Inception"
5+ messages / 2 participants
[nested] [flat]

* [pgAdmin] RM4892 pgAdmin "Inception"
@ 2020-12-23 14:46 Rahul Shirsat <[email protected]>
  2020-12-23 14:52 ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Rahul Shirsat @ 2020-12-23 14:46 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

Please find the attached patch which resolves the issue of pgadmin
Inception in Firefox browser.

The fix is tested on:

   1. MacOS 10.13.6 Firefox Browser 84.0 (64-bit)
   2. Windows 2016 Firefox Browser 84.0.1 (64-bit)

-- 
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.


Attachments:

  [application/octet-stream] RM4892.patch (2.6K, 3-RM4892.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
index d7e3da9b6..7c1f16523 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
@@ -148,7 +148,8 @@ def check_precondition(f):
         self.datistemplate = \
             self.manager.db_info[kwargs['did']]['datistemplate'] \
             if self.manager.db_info is not None and \
-            kwargs['did'] in self.manager.db_info else False
+            kwargs['did'] in self.manager.db_info and \
+            'datistemplate' in self.manager.db_info[kwargs['did']] else False
 
         # Set the template path for the SQL scripts
         if self.manager.server_type == 'gpdb':
diff --git a/web/pgadmin/tools/datagrid/static/js/datagrid.js b/web/pgadmin/tools/datagrid/static/js/datagrid.js
index 20ed9da4b..b698c08e7 100644
--- a/web/pgadmin/tools/datagrid/static/js/datagrid.js
+++ b/web/pgadmin/tools/datagrid/static/js/datagrid.js
@@ -299,7 +299,7 @@ define('pgadmin.datagrid', [
             ).set({'title': gettext('Rename Panel')});
           });
 
-          var openQueryToolURL = function(j) {
+          var openQueryToolURL = function(j, panel_url) {
             // add spinner element
             let $spinner_el =
               $(`<div class="pg-sp-container">
@@ -315,9 +315,20 @@ define('pgadmin.datagrid', [
               if (frameInitialized) {
                 clearInterval(init_poller_id);
                 var frame = $(j).data('embeddedFrame');
+
                 if (frame) {
                   frame.onLoaded(()=>{
                     $spinner_el.remove();
+                    // Fix for firefox backspace click causes pgadmin Inception - RM4892
+                    // start of code
+                    var current_browser = pgAdmin.Browser.get_browser();
+                    if (current_browser.name === 'Firefox') {
+                      frame.$iFrame[0].contentWindow.history.pushState(null, null, panel_url);
+                      frame.$iFrame[0].contentWindow.onpopstate = function () {
+                        frame.$iFrame[0].contentWindow.history.go(1);
+                      };
+                    }
+                    // end of code
                   });
                   frame.openHTML(queryToolForm);
                 }
@@ -325,7 +336,7 @@ define('pgadmin.datagrid', [
             }, 100);
           };
 
-          openQueryToolURL(queryToolPanel);
+          openQueryToolURL(queryToolPanel, panel_url);
         }
         return true;
       },


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [pgAdmin] RM4892 pgAdmin "Inception"
  2020-12-23 14:46 [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
@ 2020-12-23 14:52 ` Rahul Shirsat <[email protected]>
  2020-12-24 07:44   ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Rahul Shirsat @ 2020-12-23 14:52 UTC (permalink / raw)
  To: pgadmin-hackers

Just forgot to mention, patch consists of one more fix of a schema not
loading on several refresh of browser or startup of application - *FIXED*

[image: image.png]

On Wed, Dec 23, 2020 at 8:16 PM Rahul Shirsat <
[email protected]> wrote:

> Hi Hackers,
>
> Please find the attached patch which resolves the issue of pgadmin
> Inception in Firefox browser.
>
> The fix is tested on:
>
>    1. MacOS 10.13.6 Firefox Browser 84.0 (64-bit)
>    2. Windows 2016 Firefox Browser 84.0.1 (64-bit)
>
> --
> *Rahul Shirsat*
> Senior Software Engineer | EnterpriseDB Corporation.
>


-- 
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.


Attachments:

  [image/png] image.png (85.9K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [pgAdmin] RM4892 pgAdmin "Inception"
  2020-12-23 14:46 [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  2020-12-23 14:52 ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
@ 2020-12-24 07:44   ` Akshay Joshi <[email protected]>
  2021-01-12 13:30     ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Akshay Joshi @ 2020-12-24 07:44 UTC (permalink / raw)
  To: Rahul Shirsat <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Wed, Dec 23, 2020 at 8:23 PM Rahul Shirsat <
[email protected]> wrote:

> Just forgot to mention, patch consists of one more fix of a schema not
> loading on several refresh of browser or startup of application - *FIXED*
>
> [image: image.png]
>
> On Wed, Dec 23, 2020 at 8:16 PM Rahul Shirsat <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Please find the attached patch which resolves the issue of pgadmin
>> Inception in Firefox browser.
>>
>> The fix is tested on:
>>
>>    1. MacOS 10.13.6 Firefox Browser 84.0 (64-bit)
>>    2. Windows 2016 Firefox Browser 84.0.1 (64-bit)
>>
>> --
>> *Rahul Shirsat*
>> Senior Software Engineer | EnterpriseDB Corporation.
>>
>
>
> --
> *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] image.png (85.9K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [pgAdmin] RM4892 pgAdmin "Inception"
  2020-12-23 14:46 [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  2020-12-23 14:52 ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  2020-12-24 07:44   ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Akshay Joshi <[email protected]>
@ 2021-01-12 13:30     ` Rahul Shirsat <[email protected]>
  2021-01-13 06:53       ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Akshay Joshi <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Rahul Shirsat @ 2021-01-12 13:30 UTC (permalink / raw)
  To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers

Hi Hackers,

Please find the patch which reverts the previous changes. Code changes do
not solve the issue, so a workaround is mentioned in the RM to cater the
issue.

On Thu, Dec 24, 2020 at 1:15 PM Akshay Joshi <[email protected]>
wrote:

> Thanks, patch applied.
>
> On Wed, Dec 23, 2020 at 8:23 PM Rahul Shirsat <
> [email protected]> wrote:
>
>> Just forgot to mention, patch consists of one more fix of a schema not
>> loading on several refresh of browser or startup of application - *FIXED*
>>
>> [image: image.png]
>>
>> On Wed, Dec 23, 2020 at 8:16 PM Rahul Shirsat <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please find the attached patch which resolves the issue of pgadmin
>>> Inception in Firefox browser.
>>>
>>> The fix is tested on:
>>>
>>>    1. MacOS 10.13.6 Firefox Browser 84.0 (64-bit)
>>>    2. Windows 2016 Firefox Browser 84.0.1 (64-bit)
>>>
>>> --
>>> *Rahul Shirsat*
>>> Senior Software Engineer | EnterpriseDB Corporation.
>>>
>>
>>
>> --
>> *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*
>


-- 
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.


Attachments:

  [image/png] image.png (85.9K, 3-image.png)
  download | view image

  [application/octet-stream] RM4892_v2.patch (1.8K, 4-RM4892_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/datagrid/static/js/datagrid.js b/web/pgadmin/tools/datagrid/static/js/datagrid.js
index 18cfb8cc2..a7d056683 100644
--- a/web/pgadmin/tools/datagrid/static/js/datagrid.js
+++ b/web/pgadmin/tools/datagrid/static/js/datagrid.js
@@ -299,7 +299,7 @@ define('pgadmin.datagrid', [
             ).set({'title': gettext('Rename Panel')});
           });
 
-          var openQueryToolURL = function(j, panel_url) {
+          var openQueryToolURL = function(j) {
             // add spinner element
             let $spinner_el =
               $(`<div class="pg-sp-container">
@@ -315,20 +315,9 @@ define('pgadmin.datagrid', [
               if (frameInitialized) {
                 clearInterval(init_poller_id);
                 var frame = $(j).data('embeddedFrame');
-
                 if (frame) {
                   frame.onLoaded(()=>{
                     $spinner_el.remove();
-                    // Fix for firefox backspace click causes pgadmin Inception - RM4892
-                    // start of code
-                    var current_browser = pgAdmin.Browser.get_browser();
-                    if (current_browser.name === 'Firefox') {
-                      frame.$iFrame[0].contentWindow.history.pushState(null, null, panel_url);
-                      frame.$iFrame[0].contentWindow.onpopstate = function () {
-                        frame.$iFrame[0].contentWindow.history.go(1);
-                      };
-                    }
-                    // end of code
                   });
                   frame.openHTML(queryToolForm);
                 }
@@ -336,7 +325,7 @@ define('pgadmin.datagrid', [
             }, 100);
           };
 
-          openQueryToolURL(queryToolPanel, panel_url);
+          openQueryToolURL(queryToolPanel);
         }
         return true;
       },


^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [pgAdmin] RM4892 pgAdmin "Inception"
  2020-12-23 14:46 [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  2020-12-23 14:52 ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
  2020-12-24 07:44   ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Akshay Joshi <[email protected]>
  2021-01-12 13:30     ` Re: [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
@ 2021-01-13 06:53       ` Akshay Joshi <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: Akshay Joshi @ 2021-01-13 06:53 UTC (permalink / raw)
  To: Rahul Shirsat <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Tue, Jan 12, 2021 at 7:01 PM Rahul Shirsat <
[email protected]> wrote:

> Hi Hackers,
>
> Please find the patch which reverts the previous changes. Code changes do
> not solve the issue, so a workaround is mentioned in the RM to cater the
> issue.
>
> On Thu, Dec 24, 2020 at 1:15 PM Akshay Joshi <
> [email protected]> wrote:
>
>> Thanks, patch applied.
>>
>> On Wed, Dec 23, 2020 at 8:23 PM Rahul Shirsat <
>> [email protected]> wrote:
>>
>>> Just forgot to mention, patch consists of one more fix of a schema not
>>> loading on several refresh of browser or startup of application -
>>> *FIXED*
>>>
>>> [image: image.png]
>>>
>>> On Wed, Dec 23, 2020 at 8:16 PM Rahul Shirsat <
>>> [email protected]> wrote:
>>>
>>>> Hi Hackers,
>>>>
>>>> Please find the attached patch which resolves the issue of pgadmin
>>>> Inception in Firefox browser.
>>>>
>>>> The fix is tested on:
>>>>
>>>>    1. MacOS 10.13.6 Firefox Browser 84.0 (64-bit)
>>>>    2. Windows 2016 Firefox Browser 84.0.1 (64-bit)
>>>>
>>>> --
>>>> *Rahul Shirsat*
>>>> Senior Software Engineer | EnterpriseDB Corporation.
>>>>
>>>
>>>
>>> --
>>> *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*
>>
>
>
> --
> *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] image.png (85.9K, 3-image.png)
  download | view image

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2021-01-13 06:53 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 14:46 [pgAdmin] RM4892 pgAdmin "Inception" Rahul Shirsat <[email protected]>
2020-12-23 14:52 ` Rahul Shirsat <[email protected]>
2020-12-24 07:44   ` Akshay Joshi <[email protected]>
2021-01-12 13:30     ` Rahul Shirsat <[email protected]>
2021-01-13 06:53       ` 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