Re: [pgAdmin4][Patch]: Adding connection status in Query tool

2018-01-10 Thread Murtuza Zabuawala
Hi Dave,

PFA updated patch.

On Tue, Jan 9, 2018 at 7:57 PM, Dave Page  wrote:

> Hi
>
> On Tue, Jan 9, 2018 at 6:33 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> Please find updated patch.
>>
>
> I turned off the status option, but polling is still happening. This
> should definitely stop! :-)
>
​Fixed typo in variable.

Can you also reverse the enable/disable switch and the interval setting on
> the preferences page? I think Enable/Disable should be at the top, and be
> followed by the interval.
> ​
>
 Fixed.
​
But just a heads up we won't be able to put '?' after 'Connection status'​
eg: '
Connection status
​?'​
​
​Then string sorting again puts it after 'Connection status refresh rate'
​:)

> ​
>
> Thanks.
>
>
>>
>> On Mon, Jan 8, 2018 at 7:21 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Jan 8, 2018 at 1:24 PM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 PFA updated patch.

 On Mon, Jan 8, 2018 at 5:11 PM, Dave Page  wrote:

> Hi
>
> On Fri, Jan 5, 2018 at 8:49 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch,
>>
>>
>> On Wed, Jan 3, 2018 at 10:44 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Thu, Dec 28, 2017 at 9:38 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi,

 PFA updated patch based on new design suggested by Chethana.
 The patch also includes some misc fixes related to object
 validation.
 RM#2475

>>>
>>> This seems much nicer, but I still think there are some tweaks to
>>> make:
>>>
>>> 1) If I open a query tool, and then stop the application server, the
>>> icon is updated to show the broken connection. However, unless I 
>>> execute a
>>> query in the query tool before the server is shut down, the connection
>>> status won't recover when the server is restarted. If I do run a query
>>> first (SELECT 1; will do), then the connection status will recover.
>>>
>>
>> I have logged​
>> ​
>> https://redmine.postgresql.org/issues/2983
>>
>>
>>> 2) I think the "connected" icon should be in $primary-blue
>>> (#2c76b4). The green is ugly and not overly easy to read. It's also
>>> distracting as it catches the eye, which the default, non-error state
>>> should not do.
>>>
>> ​Fixed​
>>
>>
>
> Much better.
>
>
>>
>>
>>> 3) I'm not overly happy with the the status text popover. After some
>>> thought, I think it's because there are no visual clues that you should
>>> click on the icon to see it - and Karen seems to be of a similar 
>>> opinion.
>>> Can we put a small marker there, perhaps a triangle on the bottom-right,
>>> like you get on a spreadsheet cell if you add a comment/note? We should
>>> also have a hotkey and I guess a tooltip, e.g. "Connection status
>>> Ctrl+Alt+S" or similar.
>>>
>> ​Fixed​
>> , added accesskey *'T'* for TX status tooltip shortcut as 'S' is
>> already taken for Save file option
>>
>
> Hmm - having seen it, I don't think the marker helps us.
>
> Can you remove it, and fix the tooltip (which doesn't seem to work)?
> If we always have the tooltip say "Connection status Ctrl+Alt+T" (or
> whatever is appropriate for the platform/browser), then that should give
> the user enough hint to click.
>
 ​
 Fixed​.
 I have removed the marker & added tooltip instead but it is not
 possible to add specific shortcut keys in tooltip because accesskey may
 vary depending on OS & browser.
 ​Ref: ​
 https://www.w3schools.com/tags/att_global_accesskey.asp

>>>
>>> That's better - though I think the tool tip is better as something like:
>>>
>>> Connection status (click for details) (+T)
>>>
>>> I'm still not overly happy with all the polling that's going on though.
>>> It's a lot of requests, especially with multiple QTs open. I think we need
>>> to be able to disable the feature entirely through a switch in the
>>> Preferences. In that case, no icon would be shown, and polling would be
>>> disabled - i.e. everything would be as it is now.
>>>
>>> What do you think?
>>>
>> ​Fixed
>> Made it configurable & set default polling time to 10sec.​
>>
>>
>> ​Please review.​
>>
>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py 
b/web/pgadmin/browser/server_groups/servers/__init__.py
index b2cca09.

[pgAdmin4][Patch]: RM #2993 : - [Web Based] User can not view data for View and MATERIALIZED View object.

2018-01-10 Thread Khushboo Vashi
Hi,

Please find the patch to fix RM #2993 : [Web Based] User can not view data
for View and MATERIALIZED View object.

Thanks,
Khushboo
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 84c98d3..aeca5cc 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -434,8 +434,10 @@ def start_view_data(trans_id):
 sql = trans_obj.get_sql()
 pk_names, primary_keys = trans_obj.get_primary_keys(default_conn)
 
-# Fetch OIDs status
-has_oids = trans_obj.has_oids(default_conn)
+has_oids = False
+if trans_obj.object_type == 'table':
+# Fetch OIDs status
+has_oids = trans_obj.has_oids(default_conn)
 
 # Fetch the applied filter.
 filter_applied = trans_obj.is_filter_applied()


pgAdmin 4 commit: Fix view data for views/mat views. Fixes #2993

2018-01-10 Thread Dave Page
Fix view data for views/mat views. Fixes #2993

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=def2df9028f2cee1be7f8d20ed8c107c7c0b
Author: Khushboo Vashi 

Modified Files
--
web/pgadmin/tools/sqleditor/__init__.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)



Re: [pgAdmin4][Patch]: RM #2993 : - [Web Based] User can not view data for View and MATERIALIZED View object.

2018-01-10 Thread Dave Page
Thanks, patch applied.

On Wed, Jan 10, 2018 at 9:10 AM, Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the patch to fix RM #2993 : [Web Based] User can not view data
> for View and MATERIALIZED View object.
>
> Thanks,
> Khushboo
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: RM2815: Relogin to pgAdmin from sqleditor/datadrid if session exprires

2018-01-10 Thread Harshal Dhumal
Hi,

Please find rebased patch.

-- 
*Harshal Dhumal*
*Sr. Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Tue, Jan 9, 2018 at 9:21 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch where we are notifying user about connection
> reset.
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Mon, Jan 8, 2018 at 7:39 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> On Mon, Jan 8, 2018 at 7:26 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Mon, Jan 8, 2018 at 1:18 PM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>

 On Mon, Jan 8, 2018 at 6:11 PM, Dave Page  wrote:

>
>
> On Mon, Jan 8, 2018 at 12:37 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> On Mon, Jan 8, 2018 at 5:15 PM, Dave Page  wrote:
>>
>>> HI
>>>
>>> On Mon, Jan 8, 2018 at 11:41 AM, Harshal Dhumal <
>>> harshal.dhu...@enterprisedb.com> wrote:
>>>
 On Mon, Jan 8, 2018 at 4:34 PM, Dave Page 
 wrote:

> Hi
>
> On Fri, Jan 5, 2018 at 7:50 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Further details:
>>
>> 1. If session is expired and user performs any action from
>> sqleditor that makes ajax call
>> then in ajax error call back user can check and handle login
>> related error using code snippet.
>>
>> if (pgAdmin.Browser.UserManagement.is_pga_login_required(xhr)) {
>>   return pgAdmin.Browser.UserManagement.pga_login();
>> }
>>
>> Where is xhr is standard xhr or jqxhr object.
>>
>> 2. Similarly for connection lost (only maintenance db connection
>> as we can recover or reconnect other
>> connections if maintenance db connection is alive). It will
>> attempt to create/reconnect connection without
>> asking password (to handle passwordless connection, or saveed
>> password  or password from pgpass file)
>> If connection to database still fails then it'll prompt for
>> password.
>>
>> Code snippet:
>> SqlEditorController.handle_connection_lost();
>>  once connection lost is detected one can call
>> handle_connection_lost() to reconnect.
>>
>> 3. We maintain some additional data in session to maintain
>> affinity between
>> each sqleditor/datagrid instance to backend database connection.
>> However if session expires and user
>> re-loggins then we need to first restore affinity between
>> sqleditor to backend database before we can start
>> using query tool.
>>
>> Code snippet:
>>
>> if(is_new_transaction_required(xhr)) {
>>   SqlEditorController.init_transaction();
>> }
>>
>> (note: I haven't looked at the code yet)
>
> How does this handle re-establishment of the connection
> mid-transaction, or, if the user has modified any session variables?
>
> ServeManager and Connection Manager are written in a such way that
 if any connection is lost except maintenance db connection
 then we can re-connect or create new connection without prompting
 for database password and if maintenance db connection is lost
 then It prompts for password.

>>>
>>> Right.
>>>
>>>

 Regarding session variables as long as flask session is not expired
 we uses same session variables. But in case of user logout (due to
 flask session expire) we create new transaction id and sets new
 session variables for that particular Sql editor /datagrid instance.

>>>
>>> I mean DB session variables (and related things). For example, if
>>> the user executed queries such as the following, then they absolutely 
>>> need
>>> to know if the session got reset:
>>>
>>
>> Ok.
>> Then in this case can we notify user about the same. That we're
>> unable to restore old database connection and created new one and 
>> therefore
>> any DB session variables were set/modified (like SET
>> CLIENT_ENCODING..., SET DATESTYLE...) are lost (or similar message).
>>
>>
>>
>>> CREATE TEMPORARY TABLE 
>>> SET ROLE ...
>>> SET [various other options]
>>>
>>> If the user has done any of those things (or similar things that I
>>> haven't thought of), then we cannot just blindly reset the database
>>> connection.
>>>
>>
>> We only create new connection if flask session was expired as we lost
>> transaction id associated with Sql editor/datagrid an

pgAdmin 4 commit: Update version number for release.

2018-01-10 Thread Dave Page
Update version number for release.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f1e39dd20cab904dfe687e2ce7b4b486ea54a4ee

Modified Files
--
web/config.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Add release notes for 2.1

2018-01-10 Thread Dave Page
Add release notes for 2.1

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=57f4131dfe782f77e0c5013d9a90bed44e302688
Author: Karen Blatchley 

Modified Files
--
docs/en_US/release_notes.rst | 1 +
1 file changed, 1 insertion(+)



pgAdmin 4 commit: Add release notes for 2.1

2018-01-10 Thread Dave Page
Add release notes for 2.1

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e8c05fbaa5c0c2ac2c0f76cd00f8faec90ae6400
Author: Karen Blatchley 

Modified Files
--
docs/en_US/release_notes_2.1.rst | 91 
1 file changed, 91 insertions(+)



pgAdmin 4 commit: Fix name of release notes.

2018-01-10 Thread Dave Page
Fix name of release notes.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=405de592985448bad4365cb238e9f4aa142e7528

Modified Files
--
docs/en_US/release_notes_2.1.rst | 91 
docs/en_US/release_notes_2_1.rst | 91 
2 files changed, 91 insertions(+), 91 deletions(-)



Build failed in Jenkins: pgadmin4-master-python33 #436

2018-01-10 Thread pgAdmin 4 Jenkins
See 


Changes:

[Dave Page] Update version number for release.

[Dave Page] Add release notes for 2.1

[Dave Page] Add release notes for 2.1

--
[...truncated 372.40 KB...]
PhantomJS 2.1.1 (Linux 0.0.0): Executed 196 of 302 SUCCESS (0 secs / 
4.081 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 197 of 302 SUCCESS (0 secs / 
4.094 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 198 of 302 SUCCESS (0 secs / 
4.107 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 199 of 302 SUCCESS (0 secs / 
4.121 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 200 of 302 SUCCESS (0 secs / 
4.139 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 201 of 302 SUCCESS (0 secs / 
4.151 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 202 of 302 SUCCESS (0 secs / 
4.163 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 203 of 302 SUCCESS (0 secs / 
4.176 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 204 of 302 SUCCESS (0 secs / 
4.195 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 205 of 302 SUCCESS (0 secs / 
4.209 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 206 of 302 SUCCESS (0 secs / 
4.223 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 207 of 302 SUCCESS (0 secs / 
4.238 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 208 of 302 SUCCESS (0 secs / 
4.258 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 209 of 302 SUCCESS (0 secs / 
4.271 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 210 of 302 SUCCESS (0 secs / 
4.284 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 211 of 302 SUCCESS (0 secs / 
4.297 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 212 of 302 SUCCESS (0 secs / 
4.301 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 213 of 302 SUCCESS (0 secs / 
4.306 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 214 of 302 SUCCESS (0 secs / 
4.31 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 215 of 302 SUCCESS (0 secs / 
4.314 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 216 of 302 SUCCESS (0 secs / 
4.318 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 217 of 302 SUCCESS (0 secs / 
4.323 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 218 of 302 SUCCESS (0 secs / 
4.327 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 219 of 302 SUCCESS (0 secs / 
4.331 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 220 of 302 SUCCESS (0 secs / 
4.335 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 221 of 302 SUCCESS (0 secs / 
4.34 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 222 of 302 SUCCESS (0 secs / 
4.36 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 223 of 302 SUCCESS (0 secs / 
4.375 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 224 of 302 SUCCESS (0 secs / 
4.394 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 225 of 302 SUCCESS (0 secs / 
4.407 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 226 of 302 SUCCESS (0 secs / 
4.419 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 227 of 302 SUCCESS (0 secs / 
4.431 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 228 of 302 SUCCESS (0 secs / 
4.443 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 229 of 302 SUCCESS (0 secs / 
4.455 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 230 of 302 SUCCESS (0 secs / 
4.46 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 231 of 302 SUCCESS (0 secs / 
4.464 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 232 of 302 SUCCESS (0 secs / 
4.469 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 233 of 302 SUCCESS (0 secs / 
4.477 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 234 of 302 SUCCESS (0 secs / 
4.481 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 235 of 302 SUCCESS (0 secs / 
4.485 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 236 of 302 SUCCESS (0 secs / 
4.489 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 237 of 302 SUCCESS (0 secs / 
4.493 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 238 of 302 SUCCESS (0 secs / 
4.497 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 239 of 302 SUCCESS (0 secs / 
4.501 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 240 of 302 SUCCESS (0 secs / 
4.506 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 241 of 302 SUCCESS (0 secs / 
4.51 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 242 of 302 SUCCESS (0 secs / 
4.514 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 243 of 302 SUCCESS (0 secs / 
4.518 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 244 of 302 SUCCESS (0 secs / 
4.523 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 245 of 302 SUCCESS (0 secs / 
4.527 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 246 of 302 SUCCESS (0 secs / 
4.532 secs)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 247 of 302 SUCCESS (0 secs / 
4.536 secs)
PhantomJS 

Jenkins build is back to normal : pgadmin4-master-python33 #437

2018-01-10 Thread pgAdmin 4 Jenkins
See 





Re: ESLINT: On pgAdmin static javascripts

2018-01-10 Thread Ashesh Vashi
Hi Murtuza,

On Tue, Jan 9, 2018 at 4:08 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> All patches looks good to me except one issue as shown in screenshot which
> I observed while opening Preferences dialog subsequently.
>
I was able to reproduce the issue on 'master' branch without these patches
too.
I have fixed the same issue on 'WEBPACK_DEVEL2' branch.

Dependent libraries are using different versions of jQuery, and hence
loading two differct jQuery in the webpack.
And, that's causing the issue.

We can take of the issue in a separate patch.

-- Thanks, Ashesh

>
> --
> ​ Murtuza​
>
> On Tue, Jan 9, 2018 at 1:19 PM, Ashesh Vashi <
> ashesh.va...@enterprisedb.com> wrote:
>
>>
>>
>> On Tue, Jan 9, 2018 at 12:28 AM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> Please try rest of the patches...
>>> They are independent of each other.
>>>
>>> -- Thanks, Ashesh
>>>
>>> On Jan 8, 2018 23:45, "Murtuza Zabuawala" >> b.com> wrote:
>>>
 ​Hi Ashesh,

 I'm not able to apply patch :(

 murtuza@debian:~/projects/pgadmin4$ git apply ~/Desktop/*.patch
 error: patch failed: web/pgadmin/misc/file_manager/
 static/js/utility.js:10
 error: web/pgadmin/misc/file_manager/static/js/utility.js: patch does
 not apply

  murtuza@debain:~/projects/pgadmin4$ git status | grep '\.rej' | wc -l
   55

>>> Please find the updated patch for "Browser-specific javascript files",
>> which was having diff for 'web/pgadmin/misc/file_manager/
>> static/js/utility.js'.
>>
>> --
>>
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>> 
>>
>>
>> *http://www.linkedin.com/in/asheshvashi*
>> 
>>
>>>
 --
 Regards,
 Murtuza Zabuawala
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company


 On Mon, Jan 8, 2018 at 9:11 PM, Ashesh Vashi <
 ashesh.va...@enterprisedb.com> wrote:

>
> On Mon, Jan 8, 2018 at 8:52 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Mon, Jan 8, 2018 at 3:18 PM, Ashesh Vashi <
>> ashesh.va...@enterprisedb.com> wrote:
>>
>>> On Mon, Jan 8, 2018 at 8:31 PM, Dave Page  wrote:
>>>
 Hi

 I think these are impossibly big to properly review by hand,
 especially where much of them are whitespace changes.

>>> I ran both jasmine test framework, and feature tests.
>>> Both are running fine.
>>>

 I think the best option is to check the regression tests all pass,
 do some manual testing yourself, and then commit.

>>> Done some manual testing.
>>> It would be helpful, If somebody can help with some more testing,
>>> which I may have missed.
>>>
>>
>> Please ask one of the team (other than me) :-)
>>
> :-)
>
> -- Thanks, Ashesh
>
>>
>>
>>>
>>> -- Thanks, Ashesh
>>>
>>>

 On Mon, Jan 8, 2018 at 1:55 PM, Ashesh Vashi <
 ashesh.va...@enterprisedb.com> wrote:

> Hi Dave/Team,
>
> I found many problems while 'eslint' utility on all the static
> javascript files of pgAdmin 4.
> i.e. /web/node_module/.bin/eslint 
>
> I had fixed all errors reported by eslint for those files.
>
> I have created six patches for ease of maintenance, as
> possibilities of conflicting with other patches.
> * Browser nodes javascript files
> * Browser specific javascript files
> * pgAdmin common javascript files
> * SQLEditor/DataGrid javascript files
> * Tools javascript files
> * Miscellaneous modules javascript files
>
> All patches are independent of each other.
>
> Please review it, and share your opinion.
>
>
> --
>
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise PostgreSQL Company
> 
>
>
> *http://www.linkedin.com/in/asheshvashi*
> 
>



 --
 Dave Page
 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

 EnterpriseDB UK: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>

>>
>


pgAdmin 4 commit: Clear the messages tab when running EXPLAIN/EXPLAIN A

2018-01-10 Thread Ashesh Vashi
Clear the messages tab when running EXPLAIN/EXPLAIN ANALYZE. Fixes #2974

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=47db3a2d71a0db8c4c3286a6fbafba828cc0e2ef
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/static/js/sqleditor/query_tool_actions.js | 2 ++
1 file changed, 2 insertions(+)



pgAdmin 4 commit: Use the correct lexer in the Apache/Windows docs.

2018-01-10 Thread Ashesh Vashi
Use the correct lexer in the Apache/Windows docs.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c53212b886de348ead2c04392bd1ed2c15649899
Author: Dave Page 

Modified Files
--
docs/en_US/server_deployment.rst | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)



pgAdmin 4 commit: Add the ability to build a basic Docker container.

2018-01-10 Thread Ashesh Vashi
Add the ability to build a basic Docker container.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8a8a35533d7f4836f5636e4a0aff40f8acd2708a
Author: Dave Page 

Modified Files
--
pkg/docker/pgadmin4.conf | 22 ++
1 file changed, 22 insertions(+)



pgAdmin 4 commit: Ensure invalid options can't be selected on triggers

2018-01-10 Thread Ashesh Vashi
Ensure invalid options can't be selected on triggers on views. Fixes #2945

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=06634715c879f04eedd51a7a8ef706e007a964ce
Author: Khushboo Vashi 

Modified Files
--
.../tables/templates/trigger/sql/default/properties.sql   |  2 +-
.../databases/schemas/tables/triggers/static/js/trigger.js| 11 +--
2 files changed, 6 insertions(+), 7 deletions(-)



pgAdmin 4 commit: Only allow specification of a pgpass file if libpq >=

2018-01-10 Thread Ashesh Vashi
Only allow specification of a pgpass file if libpq >= 10. Fixes #2768

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a6fb536cb6429cc89234e7236e1ea9961f9dc1c7
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/browser/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Correct alignment of the X button on dismissable aler

2018-01-10 Thread Ashesh Vashi
Correct alignment of the X button on dismissable alerts.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8e18711ac224410c9d4e765c02f385440d6231d8
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/static/css/bootstrap.overrides.css | 87 --
1 file changed, 87 deletions(-)



pgAdmin 4 commit: Do not decrypt the password when the password is 'Non

2018-01-10 Thread Ashesh Vashi
Do not decrypt the password when the password is 'None'. Fixes #2765

This should avoid the common but harmless exception "ValueError: IV must be 16 
bytes long while decrypting the password."

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=795a71396b61ac4b00bbcdae572541ec484a06a1
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/utils/driver/psycopg2/__init__.py | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Enable webpackaging the pgadmin javascript files in d

2018-01-10 Thread Ashesh Vashi
Enable webpackaging the pgadmin javascript files in different small
modules, which can be referred from other modules.

We can have two types of webpack modules.
1. Reference (using the dll plugin of webpack)
   This type of webpack module can be referred from the other webpack
   modules. And, it will export the entry point for the javascript
   files, just like the so/dll (shared object/dynamic link library)
   file, which exports function & class entries. In the process, it
   creates a reference file, which can be referenced by another webpack
   module using the 'dll-reference' plugin. It allows us to share the
   javascript files between different webpack modules, and decrease the
   size of an individual webpack modules, which shares multiple
   javascript modules.

   This type of webpack module does not expose any entry, hence - no
   javascript gets executed directly, when it is loaded. In our case, a
   reference module can refer to file from another reference too. We
   just need to mention the name of the reference in the dependency
   list.

2. Entry (A regular webpack module)
   This type of webpack module exports the entry-point within it, and
   will always executes the javascript code from the entry point. In our
   case, we generally refer to multiple reference webpack modules.

We have created number of modules, based on size, functionalities, and
execution points, etc.

- codemirror (Entry)
  It imports all codemirror functionality used by pgAdmin in a single
  entry, and exports the CodeMirror object to be used directly by other
  javascript modules.

- react (Reference)
  It contains react, and react-dom in the single module to be referred
  by different entry modules.

- vendor (Reference)
  It contains all the vendor specific javascript modules (except for
  codemirror, react, react-dom, & slickgrid). And, will be referred
  almost all the entries, and references (except CodeMirror, & react).

- slickgrid (Entry)
  It contains all the slickgrid specific javascript modules, and some of
  custom formatters, and editors defined by pgAdmin itself, and exports
  the 'Slick' object.

- core (Reference)
  It contains all the core functionality defined by pgAdmin, and should
  be shared among different modules.

- nodes (Reference)
  It refers to all the nodes of pgAdmin.

- tools (Reference)
  It refers to all the tools of pgAdmin.

- app (Entry)
  It is the main app entry.

- tools_nodes (Entry)
  In order to load all the nodes, and tools, we need to load them some
  webpack entry, which is loaded as webpack entry as app at run time.

- sqleditor (Entry)
  As we need to load the sqleditor in a separate HTML page, we need
  separate webpack entry for the same.

- debugger (Entry)
  Same as sqleditor, debugger too loaded in a separate HTML page, we
  need separate webpack entry.

These, webpack modules, are exposed as AMD modules. It allows us to load
dynamically at runtime, and it resolves all our dependency issue without
much effort.

Earlier, all the webpack entries has its own set of images, fonts.
This approach resolves all that problem.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=6e139ceab417bfb4b0e0379c8c0671cf85bd859b

Modified Files
--
web/pgadmin/tools/__init__.py |   3 +-
web/yarn.lock | 144 +-
2 files changed, 101 insertions(+), 46 deletions(-)



pgAdmin 4 commit: When selecting an SSL cert or key, update only the ex

2018-01-10 Thread Ashesh Vashi
When selecting an SSL cert or key, update only the expected path in the UI, not 
all of them. Fixes #2760. Fixes #2867

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a9ac6f77ff17ea78ab9fe766cae82dc5038e2fa9
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 2 ++
1 file changed, 2 insertions(+)



pgAdmin 4 commit: Show complete SQL for FTS dictionaries. Fixes #2949

2018-01-10 Thread Ashesh Vashi
Show complete SQL for FTS dictionaries. Fixes #2949

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=8dcf6dc1363d13fab1a0a00b289ffb1f83ecaf86
Author: Khushboo Vashi 

Modified Files
--
.../servers/databases/schemas/fts_dictionaries/__init__.py| 8 
1 file changed, 8 insertions(+)



pgAdmin 4 commit: Allow use of transition tables in PG 10 triggers. Fix

2018-01-10 Thread Ashesh Vashi
Allow use of transition tables in PG 10 triggers. Fixes #2933

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1eb18b6529f06bd78497e782b820ba0a216ddb8f
Author: Khushboo Vashi 

Modified Files
--
.../templates/trigger/sql/10_plus/create.sql   | 36 +++
.../templates/trigger/sql/10_plus/properties.sql   | 25 ++
.../schemas/tables/triggers/static/js/trigger.js   | 53 ++
3 files changed, 114 insertions(+)



pgAdmin 4 commit: Fixing the on the javascript files - 'web/pgadmin/sta

2018-01-10 Thread Ashesh Vashi
Fixing the on the javascript files - 'web/pgadmin/static/js/*.js' for
the errors reported by the eslint.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=204a7113dee5a802cc5c951b144b602b6a6c3055

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js |  2 --
web/pgadmin/static/js/backgrid.pgadmin.js | 15 ---
2 files changed, 8 insertions(+), 9 deletions(-)



pgAdmin 4 commit: Fix user manager role handling. Fixes #2641

2018-01-10 Thread Ashesh Vashi
Fix user manager role handling. Fixes #2641

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=1dcf12675055b2e2f39cfd6a0c0881a91bdaf7e3
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/tools/user_management/static/js/user_management.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)



pgAdmin 4 commit: Upgraded the font-mfizz to latest version (v:2.4.1) t

2018-01-10 Thread Ashesh Vashi
Upgraded the font-mfizz to latest version (v:2.4.1) to resolve an issue,
about showing the PostgreSQL logo in italic in runtime on windows.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=66383c13fa850866a051366a9f99a3f1e79cb036

Modified Files
--
web/package.json |   1 +
web/yarn.lock| 148 ++-
2 files changed, 50 insertions(+), 99 deletions(-)



pgAdmin 4 commit: Allow selection of SSL certificates and pgpass files

2018-01-10 Thread Ashesh Vashi
Allow selection of SSL certificates and pgpass files in connection properties. 
Fixes #2649. Fixes #2650

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a20715047abb21f2c31ad299bea4727685bd36cb
Author: Murtuza Zabuawala 

Modified Files
--
docs/en_US/images/server_general.png | Bin
1 file changed, 0 insertions(+), 0 deletions(-)



pgAdmin 4 commit: Close user language preference drop down when it lose

2018-01-10 Thread Ashesh Vashi
Close user language preference drop down when it loses focus. Fixes #2956

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f11e5260f412968263bb69807bcc509ec0c00d87
Author: Khushboo Vashi 

Modified Files
--
web/pgadmin/preferences/static/js/preferences.js | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)



pgAdmin 4 commit: Allow connections to be coloured in the treeview and

2018-01-10 Thread Ashesh Vashi
Allow connections to be coloured in the treeview and query tool. Fixes #1383. 
Fixes #2802

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=2458f3c4517b9b102411044a85f4903f2ebea849
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/static/css/bootstrap.overrides.css | 58 ++
1 file changed, 58 insertions(+)



pgAdmin 4 commit: Prevent multiple connections to new slow-to-respond s

2018-01-10 Thread Ashesh Vashi
Prevent multiple connections to new slow-to-respond servers being initiated in 
error. Fixes #2928

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=149e651fc6cc90e69307d1689c7a3263a04671d7
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/browser/static/js/node.js | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)



pgAdmin 4 commit: Ensure the switch animation is consistent on the tabl

2018-01-10 Thread Ashesh Vashi
Ensure the switch animation is consistent on the table dialogue and avoid 
displaying an error incorrectly. Fixes #2624

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=cf17bbeaa591772360fe03bad64f7853528c36a2
Author: Murtuza Zabuawala 

Modified Files
--
.../servers/databases/schemas/tables/static/js/table.js  | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)



pgAdmin 4 commit: Update copyright notices for 2018.

2018-01-10 Thread Ashesh Vashi
Update copyright notices for 2018.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=28fac6755bf45ae6868e1825373035c8069e395c
Author: Dave Page 

Modified Files
--
LICENSE|  38 ++---
Makefile   |   2 +-
docs/en_US/code_review.rst |   2 +-
docs/en_US/coding_standards.rst|   2 +-
pkg/docker/Dockerfile  |   2 +-
pkg/docker/build.sh|   2 +-
pkg/docker/entry.sh|   2 +-
pkg/docker/pgadmin4.conf.j2|   2 +-
pkg/mac/licence.rtf|   2 +-
pkg/pip/build.sh   |   2 +-
pkg/pip/setup_pip.py   |   2 +-
pkg/src/build.sh   |   2 +-
pkg/win32/Resources/license.rtf| Bin 1262 -> 1262 bytes
runtime/BrowserWindow.cpp  |   2 +-
runtime/BrowserWindow.h|   2 +-
runtime/ConfigWindow.cpp   |   2 +-
runtime/ConfigWindow.h |   2 +-
runtime/Info.plist |   2 +-
runtime/Server.cpp |   2 +-
runtime/Server.h   |   2 +-
runtime/TabWindow.cpp  |   2 +-
runtime/TabWindow.h|   2 +-
runtime/WebViewWindow.cpp  |   2 +-
runtime/WebViewWindow.h|   2 +-
runtime/pgAdmin4.cpp   |   2 +-
runtime/pgAdmin4.h |   2 +-
runtime/pgAdmin4.pro   |   2 +-
web/config.py  |   4 +--
web/migrations/alembic.ini |   2 +-
web/migrations/env.py  |   2 +-
web/migrations/script.py.mako  |   2 +-
web/migrations/versions/02b9dccdcfcb_.py   |   2 +-
web/migrations/versions/09d53fca90c7_.py   |   2 +-
web/migrations/versions/fdc58d9bd449_.py   |   2 +-
web/pgAdmin4.py|   2 +-
web/pgAdmin4.wsgi  |   2 +-
web/pgadmin/__init__.py|   2 +-
web/pgadmin/about/__init__.py  |   2 +-
web/pgadmin/browser/__init__.py|   2 +-
web/pgadmin/browser/collection.py  |   2 +-
web/pgadmin/browser/server_groups/__init__.py  |   2 +-
.../browser/server_groups/servers/__init__.py  |   2 +-
.../server_groups/servers/databases/__init__.py|   2 +-
.../servers/databases/casts/__init__.py|   2 +-
.../servers/databases/casts/tests/__init__.py  |   2 +-
.../servers/databases/casts/tests/test_cast_add.py |   2 +-
.../databases/casts/tests/test_cast_delete.py  |   2 +-
.../servers/databases/casts/tests/test_cast_get.py |   2 +-
.../servers/databases/casts/tests/test_cast_put.py |   2 +-
.../servers/databases/casts/tests/utils.py |   2 +-
.../servers/databases/event_triggers/__init__.py   |   2 +-
.../databases/event_triggers/tests/__init__.py |   2 +-
.../event_triggers/tests/test_event_trigger_add.py |   2 +-
.../tests/test_event_trigger_delete.py |   2 +-
.../event_triggers/tests/test_event_trigger_get.py |   2 +-
.../event_triggers/tests/test_event_trigger_put.py |   2 +-
.../databases/event_triggers/tests/utils.py|   2 +-
.../servers/databases/extensions/__init__.py   |   2 +-
.../servers/databases/extensions/tests/__init__.py |   4 +--
.../extensions/tests/test_extension_add.py |   2 +-
.../extensions/tests/test_extension_delete.py  |   2 +-
.../extensions/tests/test_extension_get.py |   2 +-
.../extensions/tests/test_extension_put.py |   2 +-
.../servers/databases/extensions/tests/utils.py|   2 +-
.../databases/foreign_data_wrappers/__init__.py|   2 +-
.../foreign_servers/__init__.py|   2 +-
.../foreign_servers/tests/__init__.py  |   4 +--
.../tests/test_foreign_servers_add.py  |   2 +-
.../tests/test_foreign_servers_delete.py   |   2 +-
.../tests/test_foreign_servers_get.py  |   2 +-
.../tests/test_foreign_servers_put.py  |   2 +-
.../foreign_servers/tests/utils.py |   2 +-
.../foreign_servers/user_mapping/__init__.py   |   2 +-
.../foreign_servers/user_mapping/tests/__init__.py |   4 +--
.../user_mapping/tests/test_user_mapping_add.py|   2 +-
.../user_mapping/tests/test_user_mapping_delete.py |   2 +-
.../user_mapping/tests/test_user_mapping_get.py|   2 +-
.../user_mapping/tests/test_user_mapping_put.py|   2 +-
.../foreign_servers/user_mapping/tests/util

pgAdmin 4 commit: When selecting an SSL cert or key, update only the ex

2018-01-10 Thread Ashesh Vashi
When selecting an SSL cert or key, update only the expected path in the UI, not 
all of them. Fixes #2760. Fixes #2867

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=517cf177ceee1762d7573a9ba1d59e2fbe1796be
Author: Harshal Dhumal 

Modified Files
--
web/pgadmin/static/js/backform.pgadmin.js | 2 ++
1 file changed, 2 insertions(+)



pgAdmin 4 commit: Resolved the logo issue.

2018-01-10 Thread Ashesh Vashi
Resolved the logo issue.

For some unknown reason, font-mfizz was showing the slonik icon in
italic. Even after upgrading it to the latest version of font-mfizz, the
problem was not resolved.

So - instead of using the vector font, using the PostgreSQL SVG logo as
the application icon, and documentation link on dashboard now.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=401c0b6519e4f81b71939a19788545706d10cb91

Modified Files
--
web/package.json | 1 -
web/yarn.lock| 4 
2 files changed, 5 deletions(-)



pgAdmin 4 commit: Add ALT tags to images for accessibility. Fixes #2902

2018-01-10 Thread Ashesh Vashi
Add ALT tags to images for accessibility. Fixes #2902

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4b832a2fa3a0706fb7f84b2214bcb476baf02387
Author: Murtuza Zabuawala 

Modified Files
--
web/pgadmin/about/templates/about/index.html   |  3 ++-
web/pgadmin/browser/static/js/wizard.js| 25 +-
web/pgadmin/browser/templates/browser/index.html   |  3 ++-
.../templates/dashboard/welcome_dashboard.html |  3 ++-
web/pgadmin/misc/file_manager/static/js/utility.js |  2 +-
.../file_manager/templates/file_manager/index.html |  3 ++-
.../templates/security/change_password.html|  3 ++-
.../templates/security/forgot_password.html|  3 ++-
web/pgadmin/templates/security/login_user.html |  3 ++-
web/pgadmin/templates/security/reset_password.html |  3 ++-
web/pgadmin/templates/security/watermark.html  |  4 +++-
11 files changed, 35 insertions(+), 20 deletions(-)



pgAdmin 4 commit: Clarify how virtual envs can be used in WSGI mode, an

2018-01-10 Thread Ashesh Vashi
Clarify how virtual envs can be used in WSGI mode, and ensure we ship the 
required bits on Windows.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d71d258caa0de84b4cb15c8d651af7736044e95f
Author: Surinder Kumar 

Modified Files
--
docs/en_US/server_deployment.rst | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)



pgAdmin 4 commit: Improve icon alignment.

2018-01-10 Thread Ashesh Vashi
Improve icon alignment.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f1012bcff5232d53124066736501c0f1294045fb
Author: Chethana Kumar 

Modified Files
--
.../browser/server_groups/servers/databases/casts/static/img/cast.svg   | 2 +-
.../server_groups/servers/databases/casts/static/img/coll-cast.svg  | 2 +-
.../servers/databases/event_triggers/static/img/coll-event_trigger.svg  | 2 +-
.../servers/databases/event_triggers/static/img/event_trigger.svg   | 2 +-
.../servers/databases/event_triggers/static/img/triggerbad.svg  | 2 +-
.../servers/databases/extensions/static/img/coll-extension.svg  | 2 +-
.../server_groups/servers/databases/extensions/static/img/extension.svg | 2 +-
.../foreign_servers/static/img/coll-foreign_server.svg  | 2 +-
.../foreign_data_wrappers/foreign_servers/static/img/foreign_server.svg | 2 +-
.../foreign_servers/user_mapping/static/img/coll-user_mapping.svg   | 2 +-
.../foreign_servers/user_mapping/static/img/user_mapping.svg| 2 +-
.../foreign_data_wrappers/static/img/coll-foreign_data_wrapper.svg  | 2 +-
.../databases/foreign_data_wrappers/static/img/foreign_data_wrapper.svg | 2 +-
.../servers/databases/languages/static/img/coll-language.svg| 2 +-
.../server_groups/servers/databases/languages/static/img/language.svg   | 2 +-
.../catalog_objects/columns/static/img/catalog_object_column.svg| 2 +-
.../catalog_objects/columns/static/img/coll-catalog_object_column.svg   | 2 +-
.../databases/schemas/catalog_objects/static/img/catalog_object.svg | 2 +-
.../schemas/catalog_objects/static/img/coll-catalog_object.svg  | 2 +-
.../servers/databases/schemas/collations/static/img/coll-collation.svg  | 2 +-
.../servers/databases/schemas/collations/static/img/collation.svg   | 2 +-
.../domains/domain_constraints/static/img/coll-domain_constraints.svg   | 2 +-
.../domains/domain_constraints/static/img/domain_constraints-bad.svg| 2 +-
.../domains/domain_constraints/static/img/domain_constraints.svg| 2 +-
.../servers/databases/schemas/domains/static/img/coll-domain.svg| 2 +-
.../servers/databases/schemas/domains/static/img/domain.svg | 2 +-
.../databases/schemas/foreign_tables/static/img/coll-foreign_table.svg  | 2 +-
.../databases/schemas/foreign_tables/static/img/foreign_table.svg   | 2 +-
.../schemas/fts_configurations/static/img/coll-fts_configuration.svg| 2 +-
.../schemas/fts_configurations/static/img/fts_configuration.svg | 2 +-
.../databases/schemas/fts_dictionaries/static/img/fts_dictionary.svg| 2 +-
.../servers/databases/schemas/fts_parser/static/img/coll-fts_parser.svg | 2 +-
.../servers/databases/schemas/fts_parser/static/img/fts_parser.svg  | 2 +-
.../databases/schemas/fts_templates/static/img/coll-fts_template.svg| 2 +-
.../servers/databases/schemas/fts_templates/static/img/fts_template.svg | 2 +-
.../servers/databases/schemas/functions/static/img/coll-function.svg| 2 +-
.../servers/databases/schemas/functions/static/img/coll-procedure.svg   | 2 +-
.../databases/schemas/functions/static/img/coll-trigger_function.svg| 2 +-
.../servers/databases/schemas/functions/static/img/function.svg | 2 +-
.../servers/databases/schemas/functions/static/img/procedure.svg| 2 +-
.../servers/databases/schemas/functions/static/img/trigger_function.svg | 2 +-
.../databases/schemas/packages/edbfuncs/static/img/coll-edbfunc.svg | 2 +-
.../databases/schemas/packages/edbfuncs/static/img/coll-edbproc.svg | 2 +-
.../servers/databases/schemas/packages/edbfuncs/static/img/edbfunc.svg  | 2 +-
.../servers/databases/schemas/packages/edbfuncs/static/img/edbproc.svg  | 2 +-
.../databases/schemas/packages/edbvars/static/img/coll-edbvar.svg   | 2 +-
.../servers/databases/schemas/packages/edbvars/static/img/edbvar.svg| 2 +-
.../servers/databases/schemas/packages/static/img/coll-package.svg  | 2 +-
.../servers/databases/schemas/packages/static/img/package.svg   | 2 +-
.../servers/databases/schemas/sequences/static/img/coll-sequence.svg| 2 +-
.../servers/databases/schemas/sequences/static/img/sequence.svg | 2 +-
.../server_groups/servers/databases/schemas/static/img/catalog.svg  | 2 +-
.../server_groups/servers/databases/schemas/static/img/coll-catalog.svg | 2 +-
.../server_groups/servers/databases/schemas/static/img/coll-schema.svg  | 2 +-
.../server_groups/servers/databases/schemas/static/img/schema.svg   | 2 +-
.../servers/databases/schemas/synonyms/static/img/coll-synonym.svg  | 2 +-
.../servers/databases/schemas/synonyms/static/img/synonym.svg   | 2 +-
.../servers/databases/schemas/tables/column/static/img/coll-column.svg  | 2 +-
.../servers/databases/schemas/tables/column/static/img/column.svg   | 2 +-
.../constraints/check_constraint/static/img/check-constraint-bad.svg| 2 +-
.../tables/constraints/check

pgAdmin 4 commit: No longer using the 'get_own_javascripts' method for

2018-01-10 Thread Ashesh Vashi
No longer using the 'get_own_javascripts' method for refering the
javascript modules exposed through a module, instead added them in the
webpack (shim) configuration directly.

Instead - exposed a new method - 'get_javascript_entries' to be used
later by the new implementation of the webpack configuration. It will
utilize it to refer it as pluggable javascript module entry for any
particular module. It will allow us to reintroduce the pluggable
architecture.

Introduce a new browser tools javascript module, and will act as base
class for all tools, which needs to be registerd with the browser for
better initialization, and integration.

Branch
--
WEBPACK_DEVEL2

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=98ac78916a8718667cd88cfe10eeb830f3237e0d

Modified Files
--
web/pgadmin/tools/__init__.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)



Re: [pgAdmin4][Patch]: Adding connection status in Query tool

2018-01-10 Thread Harshal Dhumal
Murtuza, I think we should only poll if sqleditor/datagrid is visible.
We've *wcDocker.EVENT.VISIBILITY_CHANGED *event when panel visibility
changes.

-- 
*Harshal Dhumal*
*Sr. Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Wed, Jan 10, 2018 at 1:55 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> PFA updated patch.
>
> On Tue, Jan 9, 2018 at 7:57 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Tue, Jan 9, 2018 at 6:33 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> Please find updated patch.
>>>
>>
>> I turned off the status option, but polling is still happening. This
>> should definitely stop! :-)
>>
> ​Fixed typo in variable.
>
> Can you also reverse the enable/disable switch and the interval setting on
>> the preferences page? I think Enable/Disable should be at the top, and be
>> followed by the interval.
>> ​
>>
>  Fixed.
> ​
> But just a heads up we won't be able to put '?' after 'Connection
> status'​  eg: '
> Connection status
> ​?'​
> ​
> ​Then string sorting again puts it after 'Connection status refresh rate'
> ​:)
>
>> ​
>>
>> Thanks.
>>
>>
>>>
>>> On Mon, Jan 8, 2018 at 7:21 PM, Dave Page  wrote:
>>>


 On Mon, Jan 8, 2018 at 1:24 PM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> PFA updated patch.
>
> On Mon, Jan 8, 2018 at 5:11 PM, Dave Page  wrote:
>
>> Hi
>>
>> On Fri, Jan 5, 2018 at 8:49 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> PFA updated patch,
>>>
>>>
>>> On Wed, Jan 3, 2018 at 10:44 PM, Dave Page 
>>> wrote:
>>>
 Hi

 On Thu, Dec 28, 2017 at 9:38 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi,
>
> PFA updated patch based on new design suggested by Chethana.
> The patch also includes some misc fixes related to object
> validation.
> RM#2475
>

 This seems much nicer, but I still think there are some tweaks to
 make:

 1) If I open a query tool, and then stop the application server,
 the icon is updated to show the broken connection. However, unless I
 execute a query in the query tool before the server is shut down, the
 connection status won't recover when the server is restarted. If I do 
 run a
 query first (SELECT 1; will do), then the connection status will 
 recover.

>>>
>>> I have logged​
>>> ​
>>> https://redmine.postgresql.org/issues/2983
>>>
>>>
 2) I think the "connected" icon should be in $primary-blue
 (#2c76b4). The green is ugly and not overly easy to read. It's also
 distracting as it catches the eye, which the default, non-error state
 should not do.

>>> ​Fixed​
>>>
>>>
>>
>> Much better.
>>
>>
>>>
>>>
 3) I'm not overly happy with the the status text popover. After
 some thought, I think it's because there are no visual clues that you
 should click on the icon to see it - and Karen seems to be of a similar
 opinion. Can we put a small marker there, perhaps a triangle on the
 bottom-right, like you get on a spreadsheet cell if you add a 
 comment/note?
 We should also have a hotkey and I guess a tooltip, e.g. "Connection 
 status
 Ctrl+Alt+S" or similar.

>>> ​Fixed​
>>> , added accesskey *'T'* for TX status tooltip shortcut as 'S' is
>>> already taken for Save file option
>>>
>>
>> Hmm - having seen it, I don't think the marker helps us.
>>
>> Can you remove it, and fix the tooltip (which doesn't seem to work)?
>> If we always have the tooltip say "Connection status Ctrl+Alt+T" (or
>> whatever is appropriate for the platform/browser), then that should give
>> the user enough hint to click.
>>
> ​
> Fixed​.
> I have removed the marker & added tooltip instead but it is not
> possible to add specific shortcut keys in tooltip because accesskey may
> vary depending on OS & browser.
> ​Ref: ​
> https://www.w3schools.com/tags/att_global_accesskey.asp
>

 That's better - though I think the tool tip is better as something like:

 Connection status (click for details) (+T)

 I'm still not overly happy with all the polling that's going on though.
 It's a lot of requests, especially with multiple QTs open. I think we need
 to be able to disable the feature entirely through a switch in the
 Preferences. In that case, no icon would be shown, and polling would be
 disabled - i.e. everything would be as it is now.

 What do you think?

>>> ​Fixed
>>> M

Re: [pgAdmin4][Patch]: Adding connection status in Query tool

2018-01-10 Thread Murtuza Zabuawala
User can open Query tool in new browser window where we'll not have
wcDocker panel.

On Thu, Jan 11, 2018 at 12:00 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Murtuza, I think we should only poll if sqleditor/datagrid is visible.
> We've *wcDocker.EVENT.VISIBILITY_CHANGED *event when panel visibility
> changes.
>
> --
> *Harshal Dhumal*
> *Sr. Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jan 10, 2018 at 1:55 PM, Murtuza Zabuawala  enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch.
>>
>> On Tue, Jan 9, 2018 at 7:57 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Tue, Jan 9, 2018 at 6:33 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 Please find updated patch.

>>>
>>> I turned off the status option, but polling is still happening. This
>>> should definitely stop! :-)
>>>
>> ​Fixed typo in variable.
>>
>> Can you also reverse the enable/disable switch and the interval setting
>>> on the preferences page? I think Enable/Disable should be at the top, and
>>> be followed by the interval.
>>> ​
>>>
>>  Fixed.
>> ​
>> But just a heads up we won't be able to put '?' after 'Connection
>> status'​  eg: '
>> Connection status
>> ​?'​
>> ​
>> ​Then string sorting again puts it after 'Connection status refresh rate'
>> ​:)
>>
>>> ​
>>>
>>> Thanks.
>>>
>>>

 On Mon, Jan 8, 2018 at 7:21 PM, Dave Page  wrote:

>
>
> On Mon, Jan 8, 2018 at 1:24 PM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi Dave,
>>
>> PFA updated patch.
>>
>> On Mon, Jan 8, 2018 at 5:11 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Fri, Jan 5, 2018 at 8:49 AM, Murtuza Zabuawala <
>>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>>
 Hi Dave,

 PFA updated patch,


 On Wed, Jan 3, 2018 at 10:44 PM, Dave Page 
 wrote:

> Hi
>
> On Thu, Dec 28, 2017 at 9:38 AM, Murtuza Zabuawala <
> murtuza.zabuaw...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA updated patch based on new design suggested by Chethana.
>> The patch also includes some misc fixes related to object
>> validation.
>> RM#2475
>>
>
> This seems much nicer, but I still think there are some tweaks to
> make:
>
> 1) If I open a query tool, and then stop the application server,
> the icon is updated to show the broken connection. However, unless I
> execute a query in the query tool before the server is shut down, the
> connection status won't recover when the server is restarted. If I do 
> run a
> query first (SELECT 1; will do), then the connection status will 
> recover.
>

 I have logged​
 ​
 https://redmine.postgresql.org/issues/2983


> 2) I think the "connected" icon should be in $primary-blue
> (#2c76b4). The green is ugly and not overly easy to read. It's also
> distracting as it catches the eye, which the default, non-error state
> should not do.
>
 ​Fixed​


>>>
>>> Much better.
>>>
>>>


> 3) I'm not overly happy with the the status text popover. After
> some thought, I think it's because there are no visual clues that you
> should click on the icon to see it - and Karen seems to be of a 
> similar
> opinion. Can we put a small marker there, perhaps a triangle on the
> bottom-right, like you get on a spreadsheet cell if you add a 
> comment/note?
> We should also have a hotkey and I guess a tooltip, e.g. "Connection 
> status
> Ctrl+Alt+S" or similar.
>
 ​Fixed​
 , added accesskey *'T'* for TX status tooltip shortcut as 'S' is
 already taken for Save file option

>>>
>>> Hmm - having seen it, I don't think the marker helps us.
>>>
>>> Can you remove it, and fix the tooltip (which doesn't seem to work)?
>>> If we always have the tooltip say "Connection status Ctrl+Alt+T" (or
>>> whatever is appropriate for the platform/browser), then that should give
>>> the user enough hint to click.
>>>
>> ​
>> Fixed​.
>> I have removed the marker & added tooltip instead but it is not
>> possible to add specific shortcut keys in tooltip because accesskey may
>> vary depending on OS & browser.
>> ​Ref: ​
>> https://www.w3schools.com/tags/att_global_accesskey.asp
>>
>
> That's better - though I think the tool tip is better as something
> like:
>
> Connection status (click for details) (+T)
>
> I'm still not overly happy with all the polling that's going o

Re: [pgAdmin4][Patch]: Adding connection status in Query tool

2018-01-10 Thread Harshal Dhumal
On Thu, Jan 11, 2018 at 12:06 PM, Murtuza Zabuawala <
murtuza.zabuaw...@enterprisedb.com> wrote:

> User can open Query tool in new browser window where we'll not have
> wcDocker panel.
>

In that case we can use window onfocus and onblur events
.
In sqleditor there are cases where we've written conditional code based on
whether sqleditor is opened in new window or not.


On Thu, Jan 11, 2018 at 12:00 PM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Murtuza, I think we should only poll if sqleditor/datagrid is visible.
>> We've *wcDocker.EVENT.VISIBILITY_CHANGED *event when panel visibility
>> changes.
>>
>> --
>> *Harshal Dhumal*
>> *Sr. Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jan 10, 2018 at 1:55 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> PFA updated patch.
>>>
>>> On Tue, Jan 9, 2018 at 7:57 PM, Dave Page  wrote:
>>>
 Hi

 On Tue, Jan 9, 2018 at 6:33 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> Please find updated patch.
>

 I turned off the status option, but polling is still happening. This
 should definitely stop! :-)

>>> ​Fixed typo in variable.
>>>
>>> Can you also reverse the enable/disable switch and the interval setting
 on the preferences page? I think Enable/Disable should be at the top, and
 be followed by the interval.
 ​

>>>  Fixed.
>>> ​
>>> But just a heads up we won't be able to put '?' after 'Connection
>>> status'​  eg: '
>>> Connection status
>>> ​?'​
>>> ​
>>> ​Then string sorting again puts it after 'Connection status refresh
>>> rate' ​:)
>>>
 ​

 Thanks.


>
> On Mon, Jan 8, 2018 at 7:21 PM, Dave Page  wrote:
>
>>
>>
>> On Mon, Jan 8, 2018 at 1:24 PM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi Dave,
>>>
>>> PFA updated patch.
>>>
>>> On Mon, Jan 8, 2018 at 5:11 PM, Dave Page  wrote:
>>>
 Hi

 On Fri, Jan 5, 2018 at 8:49 AM, Murtuza Zabuawala <
 murtuza.zabuaw...@enterprisedb.com> wrote:

> Hi Dave,
>
> PFA updated patch,
>
>
> On Wed, Jan 3, 2018 at 10:44 PM, Dave Page 
> wrote:
>
>> Hi
>>
>> On Thu, Dec 28, 2017 at 9:38 AM, Murtuza Zabuawala <
>> murtuza.zabuaw...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA updated patch based on new design suggested by Chethana.
>>> The patch also includes some misc fixes related to object
>>> validation.
>>> RM#2475
>>>
>>
>> This seems much nicer, but I still think there are some tweaks to
>> make:
>>
>> 1) If I open a query tool, and then stop the application server,
>> the icon is updated to show the broken connection. However, unless I
>> execute a query in the query tool before the server is shut down, the
>> connection status won't recover when the server is restarted. If I 
>> do run a
>> query first (SELECT 1; will do), then the connection status will 
>> recover.
>>
>
> I have logged​
> ​
> https://redmine.postgresql.org/issues/2983
>
>
>> 2) I think the "connected" icon should be in $primary-blue
>> (#2c76b4). The green is ugly and not overly easy to read. It's also
>> distracting as it catches the eye, which the default, non-error state
>> should not do.
>>
> ​Fixed​
>
>

 Much better.


>
>
>> 3) I'm not overly happy with the the status text popover. After
>> some thought, I think it's because there are no visual clues that you
>> should click on the icon to see it - and Karen seems to be of a 
>> similar
>> opinion. Can we put a small marker there, perhaps a triangle on the
>> bottom-right, like you get on a spreadsheet cell if you add a 
>> comment/note?
>> We should also have a hotkey and I guess a tooltip, e.g. "Connection 
>> status
>> Ctrl+Alt+S" or similar.
>>
> ​Fixed​
> , added accesskey *'T'* for TX status tooltip shortcut as 'S' is
> already taken for Save file option
>

 Hmm - having seen it, I don't think the marker helps us.

 Can you remove it, and fix the tooltip (which doesn't seem to
 work)? If we always have the tooltip say "Connection status 
 Ctrl+Alt+T" (or
 whatever is appropriate for the platform/browser), then that should 
 give
 the user