Re: Regression in of browser.js code - Mailing list pgadmin-hackers

From Murtuza Zabuawala
Subject Re: Regression in of browser.js code
Date
Msg-id CAKKotZRi-TyfzPD9njjU8Q5WXW9ALEdnyZ4xtACAL5osRSQ=UA@mail.gmail.com
Whole thread Raw
In response to Re: Regression in of browser.js code  (Khushboo Vashi <khushboo.vashi@enterprisedb.com>)
Responses Re: Regression in of browser.js code  (Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com>)
List pgadmin-hackers



On Thu, Jul 2, 2020 at 5:41 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Thu, Jul 2, 2020 at 5:33 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Khushboo,

I am already on the latest code :)
Then your patch will not work. :) 

It is applying and I'm able to see the diff,

------

(venv3_pg) murtuza@ubuntu:~/projects/pgadmin4 (master)$ git apply browser_regression.diff
(venv3_pg) murtuza@ubuntu:~/projects/pgadmin4 (master)$ gs
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

modified:   web/pgadmin/browser/static/js/browser.js


-----

(venv3_pg) murtuza@ubuntu:~/projects/pgadmin4 (master)$ git diff
diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js
index 9db31de59..dc6c26920 100644
--- a/web/pgadmin/browser/static/js/browser.js
+++ b/web/pgadmin/browser/static/js/browser.js
@@ -278,16 +278,16 @@ define('pgadmin.browser', [
       /* Add hooked-in panels by extensions */
       var panels = JSON.parse(pgBrowser.panels_items);
       _.each(panels, function(panel) {
-        if (panel.isIframe) {
+        if (panel.is_iframe) {
           pgBrowser.frames[panel.name] = new pgBrowser.Frame({
             name: panel.name,
             title: panel.title,
             icon: panel.icon,
             width: panel.width,
             height: panel.height,
-            showTitle: panel.showTitle,
-            isCloseable: panel.isCloseable,
-            isPrivate: panel.isPrivate,
+            showTitle: panel.show_title,
+            isCloseable: panel.is_closeable,
+            isPrivate: panel.is_private,
             url: panel.content,
           });
         } else {
@@ -297,12 +297,12 @@ define('pgadmin.browser', [
             icon: panel.icon,
             width: panel.width,
             height: panel.height,
-            showTitle: panel.showTitle,
-            isCloseable: panel.isCloseable,
-            isPrivate: panel.isPrivate,
+            showTitle: panel.show_title,
+            isCloseable: panel.is_closeable,
+            isPrivate: panel.is_private,
             content: (panel.content) ? panel.content : '',
             events: (panel.events) ? panel.events : '',
-            canHide: (panel.canHide) ? panel.canHide : '',
+            canHide: (panel.can_hide) ? panel.can_hide : '',
           });
         }
       });


 

commit ec30e6ace78a813eb5215efc5c1f0e94582ffc12 (HEAD -> master, origin/master, origin/HEAD)


--
Regards,
Murtuza Zabuawala
EDB
POWER TO POSTGRES


On Thu, Jul 2, 2020 at 5:25 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Thu, Jul 2, 2020 at 5:16 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

There was a regression where we have changed the panel variables in menu.py but we did not change their respective reference in JS which is causing issues while loading wcDocker Panel/Frames which are defined in python side.

This has been fixed, please get the latest pgAdmin code.


--
Regards,
Murtuza Zabuawala
EDB
POWER TO POSTGRES

pgadmin-hackers by date:

Previous
From: Khushboo Vashi
Date:
Subject: Re: Regression in of browser.js code
Next
From: Murtuza Zabuawala
Date:
Subject: Re: Regression in of browser.js code