Thread: Regression in of browser.js code
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.
Attachment
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.
Hi Khushboo,
I am already on the latest code :)
commit ec30e6ace78a813eb5215efc5c1f0e94582ffc12 (HEAD -> master, origin/master, origin/HEAD)
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.
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. :)
commit ec30e6ace78a813eb5215efc5c1f0e94582ffc12 (HEAD -> master, origin/master, origin/HEAD)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.
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)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.
Ok the commit is reverted :(
On Thu, Jul 2, 2020 at 5:45 PM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
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)$ gsOn branch masterYour 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 diffdiff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.jsindex 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)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.