Re: [pgadmin-hackers] [pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active

2016-07-13 Thread Dave Page
Won't this result in incorrect graphs? I.e. chunks of data being missing (but 
not obviously so)?

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

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

> On 13 Jul 2016, at 07:47, Surinder Kumar  
> wrote:
> 
> Hi
> 
> In Dashboard, the ajax calls to render data grid should only made, if 
> dashboard panel is active.
> Currently it make ajax calls even if other panels like properties, sql are 
> active.
> 
> Please find attached patch and review.
> 
> Thanks,
> Surinder Kumar
> 
> 
> -- 
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Render data grid only if Dashboard Panel is active

2016-07-13 Thread Surinder Kumar
On Wed, Jul 13, 2016 at 12:32 PM, Dave Page  wrote:

> Won't this result in incorrect graphs? I.e. chunks of data being missing
> (but not obviously so)?
>
 Oh I see.. It might result in incorrect graphs..
Please ignore the patch.

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK:http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On 13 Jul 2016, at 07:47, Surinder Kumar 
> wrote:
>
> Hi
>
> In Dashboard, the ajax calls to *render data grid* should only made, if
> dashboard panel is active.
> Currently it make ajax calls even if other panels like properties, sql are
> active.
>
> Please find attached patch and review.
>
> Thanks,
> Surinder Kumar
>
> 
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>


[pgadmin-hackers] PATCH: To fix issue using PUBLIC as role (pgAdmin4)

2016-07-13 Thread Murtuza Zabuawala
Hi,

PFA patch to fix the issue where user was not able to select 'PUBLIC' as
role in privileges.
(RM#1416)

This issue was due to previous commit: b78b3904cd7e5a8edf


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


RM_1416.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [Patch] Fix Unicode in errmsg

2016-07-13 Thread Magnun Leno

What error are you getting?
Can you please share the exact error message to understand the issue 
properly?

Sorry, my bad. Here is the traceback:

2016-07-12 16:12:22,366: ERRORpgadmin:Exception on 
/browser/server-group/obj/ [POST]

Traceback (most recent call last):
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1817, in wsgi_app

response = self.full_dispatch_request()
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1477, in full_dispatch_request

rv = self.handle_user_exception(e)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1381, in handle_user_exception

reraise(exc_type, exc_value, tb)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1475, in full_dispatch_request

rv = self.dispatch_request()
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1461, in dispatch_request

return self.view_functions[rule.endpoint](**req.view_args)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/views.py", 
line 84, in view

return self.dispatch_request(*args, **kwargs)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/browser/utils.py", 
line 235, in dispatch_request

return method(*args, **kwargs)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/browser/server_groups/__init__.py", 
line 204, in create
data = request.form if request.form else 
json.loads(request.data.decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: 
ordinal not in range(128)


How to reproduce:

1. Start PgAdmin4;
2. Access localhost:5050
3. Login
4. In the left panel, right click in Servers. Then, "Create > Server
   Group", or "Create > Server" (both share the same error)
5. In the "Name field", write any non ASCII word. In my case I was
   using the following name: Produção
6. Click "Save"

More info about my env:

$ env | grep LANG
LANG=pt_BR.UTF-8
GDM_LANG=pt_BR.UTF-8

$ python --version
Python 2.7.11

$ pip freeze
Babel==1.3
beautifulsoup4==4.4.1
blinker==1.3
django-htmlmin==0.8.0
extras==0.0.3
fixtures==2.0.0
Flask==0.10.1
Flask-Babel==0.9
Flask-Gravatar==0.4.2
Flask-Login==0.2.11
Flask-Mail==0.9.1
Flask-Principal==0.4.0
Flask-Security==1.7.4
Flask-SQLAlchemy==2.0
Flask-WTF==0.11
html5lib==1.0b3
importlib==1.0.3
itsdangerous==0.24
Jinja2==2.7.3
linecache2==1.0.0
MarkupSafe==0.23
passlib==1.6.2
pbr==1.9.1
pgadmin4==1.0b2
psycopg2==2.5.2
pycrypto==2.6.1
pyrsistent==0.11.13
python-dateutil==2.5.0
python-mimeparse==1.5.1
pytz==2014.10
simplejson==3.6.5
six==1.9.0
speaklater==1.3
SQLAlchemy==0.9.8
sqlparse==0.1.19
testscenarios==0.5.0
testtools==2.0.0
traceback2==1.4.0
unittest2==1.1.0
Werkzeug==0.9.6
WTForms==2.0.2



We will need to change too many places by this logic.
I've attached patch for it.
I'm not familiar with the code base yet, but not necessarily all 
occurrences of "decode()" need to be patched, just the ones that deal 
with user input.


I've done some further testing and noticed that even running an insert 
or update with non ASCII text runs into failure. This "update users set 
cidade='Brasília' where id=1;", results in the following traceback:


2016-07-12 16:32:59,964: ERRORpgadmin:Exception on 
/sqleditor/query_tool/start/2760583 [POST]

Traceback (most recent call last):
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1817, in wsgi_app

response = self.full_dispatch_request()
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1477, in full_dispatch_request

rv = self.handle_user_exception(e)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1381, in handle_user_exception

reraise(exc_type, exc_value, tb)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1475, in full_dispatch_request

rv = self.dispatch_request()
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask/app.py", 
line 1461, in dispatch_request

return self.view_functions[rule.endpoint](**req.view_args)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/flask_login.py", 
line 758, in decorated_view

return func(*args, **kwargs)
  File 
"/home/magnun/venv/pgadmin4/lib/python2.7/site-packages/pgadmin4/pgadmin/tools/sqleditor/__init__.py", 
line 241, in start_query_tool

sql = json.loads(request.data.decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48: 
ordinal not in range(128)


But, the other way around isn't true. Executing the update mentioned 
above in psql and then running a select in PgAdmin4 (select * from users 
where id=1) works fine.


I'll give it a try with Python 3 as soon as possible, it might solve all 
the issues since it uses unicode by default.


Thanks in advance.

---
Magnun Len

[pgadmin-hackers] pgAdmin 4 commit: Properly support file downloads in the desktop runtim

2016-07-13 Thread Dave Page
Properly support file downloads in the desktop runtime. Fixes #1405. Fixes #1342

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=d22ea8bf61b1d644c9add7880b4dbea6d1e3c1d6
Author: Neel Patel 

Modified Files
--
runtime/BrowserWindow.cpp  | 445 -
runtime/BrowserWindow.h|  16 +
.../sqleditor/templates/sqleditor/js/sqleditor.js  |   4 +-
3 files changed, 462 insertions(+), 3 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][runtime]: Download feature in runtime

2016-07-13 Thread Dave Page
Thanks - applied.

On Fri, Jul 8, 2016 at 7:17 AM, Neel Patel  wrote:
> Hi Dave,
>
> Please find attached patch file for the fix of crash and comment text.
> Downloading cancel request was not handled properly and due to that
> application was getting crashed.
>
> Do review it and let us know for comments.
>
> Thanks,
> Neel Patel
>
> On Thu, Jul 7, 2016 at 2:13 PM, Dave Page  wrote:
>>
>> Hi
>>
>> On Wed, Jul 6, 2016 at 9:12 AM, Neel Patel 
>> wrote:
>> > Hi Dave,
>> >
>> > I have tried to fix most of the review comments.  I have modified the
>> > patch
>> > on top of your changes. Please find attached updated patch file.
>> > Find my comments inline. Can you please review and let us know your
>> > feedback
>> > ?
>>
>> That's definitely getting there;
>>
>> - Please make sure you follow the code style requirements, e.g.
>> //Comment text
>>
>> - In your comments, typically you should refer to the user as "the
>> user" not just "user". e.g.
>>   // Check that *the* user has given *a* valid file name or not
>>
>>   The same applies to other cases where you miss the article
>> (https://en.wikipedia.org/wiki/Article_(grammar)):
>>   // Check that *the* request contains the data download at client side
>>
>> NOTE: This isn't a criticism of you in particular - most of the team
>> do this, I assume because it's more like the way you'd phrase things
>> in Hindi. I just find myself correcting such mistakes regularly, and
>> it's good for us all to continue to improve in general.
>>
>> - I was able to reproduce the crash again:
>>   1) Open a tab, and go to the PostgreSQL download page on
>> enterprisedb.com (linked from the pg.org site)
>>   2) Start to download the 9.6b2 Win64 installer
>>   3) Cancel the download
>>   4) Click the link to download if your download didn't automatically
>> start
>>   5) Overwrite the existing file
>>
>> This results in:
>>   a) The progress bar flashes up and down weirdly on the second download
>>   b) The app crashes when the download completes:
>>
>> The program has unexpectedly finished.
>>
>> /Users/dpage/git/pgadmin4/build-pgAdmin4-Desktop_Qt_5_5_1_clang_64bit2-Debug/pgAdmin4.app/Contents/MacOS/pgAdmin4
>> crashed
>>
>> See the attached backtrace.
>>
>> Thanks!
>>
>> > On Fri, Jul 1, 2016 at 2:39 PM, Dave Page  wrote:
>> >>
>> >> On Fri, Jul 1, 2016 at 5:43 AM, Neel Patel
>> >> 
>> >> wrote:
>> >> > Hi Dave,
>> >> >
>> >> > On Thu, Jun 30, 2016 at 7:31 PM, Dave Page  wrote:
>> >> >>
>> >> >> Hi
>> >> >>
>> >> >> On Thu, Jun 30, 2016 at 10:42 AM, Neel Patel
>> >> >>  wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > Please find attached patch file for initial version of download
>> >> >> > file
>> >> >> > in
>> >> >> > runtime application.
>> >> >>
>> >> >> I've attached an update with some improved messages, and setting the
>> >> >> progress dialogue to be modal (seeing as we cannot have multiple
>> >> >> downloads, and it's easy to lose the dialogue).
>> >> >>
>> >> >> > With this patch, we have implemented two features.
>> >> >> >
>> >> >> > Feature 1 :- Normal "Download file" from runtime application
>> >> >> >
>> >> >> > Previously "Download file" was not implemented in runtime
>> >> >> > application.
>> >> >> > With this patch file, we have handled Qt signal for download file
>> >> >> > properly.
>> >> >>
>> >> >> This seems to work fine. I did get one crash (after I cancelled a
>> >> >> download, then tried it again), but I couldn't reproduce that.
>> >> >
>> >> >
>> >> > Okay. I will try to reproduce the issue and also i will try to review
>> >> > the
>> >> > code again if i can find something regrading crash.
>> >
>> >
>> > I have tried to reproduce the crash but no luck. I have tried on Linux
>> > and
>> > Mac.
>> >
>> >>
>> >>
>> >> Thanks.
>> >>
>> >> >
>> >> >>
>> >> >> > Feature 2 :-   "download" attribute support for 'a' tag for client
>> >> >> > side
>> >> >> > download
>> >> >> >
>> >> >> > As per our knowledge, webkit has not implemented the download
>> >> >> > attribute
>> >> >> > at
>> >> >> > 'a' tag.
>> >> >> > Currently it shows under development from below link.
>> >> >> >
>> >> >> > https://bugreports.qt.io/browse/QTBUG-47732
>> >> >> >
>> >> >> > We did not found any signal in Qt for download attribute feature
>> >> >> > but
>> >> >> > to
>> >> >> > implement this feature in runtime application, we added one
>> >> >> > workaround
>> >> >> > to
>> >> >> > make it work with download CSV file.
>> >> >> >
>> >> >> > When we click on download buttons, we are getting Qt signal
>> >> >> > "urlLinkClicked"
>> >> >> > and in that url we are finding "data:text/csv" from encoded URL
>> >> >> > generated
>> >> >> > from sqleditor. Once we found that tag then we are decoding the
>> >> >> > csv
>> >> >> > data
>> >> >> > and
>> >> >> > writing to file.
>> >> >> >
>> >> >> > Is that right approach ? Should we add our own custom mime-type to
>> >> >> > header ?
>> >> >> > Let us know your thoughts on this feature.
>> >> >>
>> >> >> This doesn't work so well, for a number 

Re: [pgadmin-hackers] [pgAdmin4][Patch]: Busy icon not visible in Debugger and Query tool in Runtime environment

2016-07-13 Thread Dave Page
Thanks, applied.

On Fri, Jul 8, 2016 at 8:30 AM, Surinder Kumar
 wrote:
> Hi
>
> The spinner icon is not visible while executing query or running debugger in
> Runtime environment specific to Ubuntu. This issue is related to RM#1186
>
> To make it work, we need to explicitly set -webkit-animation property to
> 'none' for classes "sql-editor-busy-icon.fa-pulse" and ".debugger-container
> fa-pulse".
>
> 'fa-pulse' class is responsible to spin the busy icon, but setting its
> -webkit-animation property to none will not spin icon but icon and message
> will be shown.
>
> Please review
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: The spinner icon is not visible while executing query

2016-07-13 Thread Dave Page
The spinner icon is not visible while executing query or running debugger in 
Runtime environment specific to Ubuntu. This issue is related to RM#1186

To make it work, we need to explicitly set -webkit-animation property to 'none' 
for classes "sql-editor-busy-icon.fa-pulse" and ".debugger-container fa-pulse".

'fa-pulse' class is responsible to spin the busy icon, but setting its 
-webkit-animation property to none will not spin icon but icon and message will 
be shown.

Branch
--
master

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

Modified Files
--
web/pgadmin/tools/datagrid/templates/datagrid/index.html  | 1 +
web/pgadmin/tools/debugger/templates/debugger/direct.html | 1 +
2 files changed, 2 insertions(+)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Fix clear query option which was opening a query tool

2016-07-13 Thread Dave Page
Fix clear query option which was opening a query tool in new window in Mac 
Runtime

Branch
--
master

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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: Clear query window button click opens query tool in new window in Mac Runtime

2016-07-13 Thread Dave Page
Thanks, applied.

On Mon, Jul 11, 2016 at 9:13 AM, Surinder Kumar
 wrote:
> Hi
>
> Issue:
> When we click on "Clear query window" button in Query tool, a new instance
> of query tool opens in new window. The event "StopEventPropogation" was not
> working.
>
> Please find the attached patch and review.
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: Fix the issue for saving query output as CSV

2016-07-13 Thread Dave Page
Hi

Can you rebase this please?

Thanks.

On Mon, Jul 11, 2016 at 9:16 AM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Hi,
>
> PFA patch for RM1405. Also to allow download in runtime we will still need
> patch
> 
> sent by Neel.
>
> Changes: To download query result to CSV directly from server and not to
> use download attr. of anchor tag () as it's not support by all of major
> browsers (e.g. Safari).
> Also it's not feasible to load data in html to download if result set of
> query is very huge (in GBs).
>
>
>
>
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jun 29, 2016 at 4:53 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Jun 29, 2016 at 3:52 PM, Murtuza Zabuawala > enterprisedb.com> wrote:
>>
>>> Yes, It will not work in runtime as well but I think Neel is working for
>>> fix in run time for this issue, We might able to fix it in run time but
>>> issue persists in Safari unless they add support in browser itself.
>>>
>>> https://webkit.org/status/#feature-download-attribute
>>>
>>>
>>> > On 29-Jun-2016, at 3:40 pm, Dave Page  wrote:
>>> >
>>> > On Tue, Jun 28, 2016 at 10:33 AM, Murtuza Zabuawala
>>> >  wrote:
>>> >> Yes Dave, I agree that downloading files has been supported in
>>> browsers since long .
>>> >>
>>> >> But in general we send request & then receives files from web server
>>> but in our case we are fetching our data from Backbone models & then
>>> converting it to CSV format for downloading as a file at client side in
>>> browser itself.
>>> >
>>> > If Safari doesn't support client-side saving of files, then I have to
>>> > wonder if our runtime will either - both are webkit based.
>>> >
>>> > So I guess the next question to ask is; why don't we just generate the
>>> > CSV on the server side?
>>> >
>>>
>>> @Akshay,
>>> Can you please suggest on above?
>>>
>>
>>As we already have complete data in backgrid's full collection, so I
>> have used it instead of fetching it again.
>>
>>>
>>> > --
>>> > Dave Page
>>> > Blog: http://pgsnake.blogspot.com
>>> > Twitter: @pgsnake
>>> >
>>> > EnterpriseDB UK: http://www.enterprisedb.com
>>> > The Enterprise PostgreSQL Company
>>>
>>>
>>>
>>> --
>>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>
>
>


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

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


[pgadmin-hackers] pgAdmin 4 commit: Fix incomplete reverse engineered SQL for databases.

2016-07-13 Thread Dave Page
Fix incomplete reverse engineered SQL for databases. Fixes #1420

Branch
--
master

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

Modified Files
--
web/pgadmin/browser/server_groups/servers/databases/__init__.py | 8 
1 file changed, 8 insertions(+)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1420 - Reverse engineered SQL incomplete for Databases

2016-07-13 Thread Dave Page
Thanks, applied.

On Mon, Jul 11, 2016 at 10:58 AM, Surinder Kumar
 wrote:
> Hi
>
> Please find attached patch with fix and review.
> Included missing Create and Drop comments in generated sql query.
>
> Thanks,
> Surinder Kumar
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error

2016-07-13 Thread Dave Page
On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
 wrote:
> On Mon, Jul 11, 2016 at 6:41 PM, Dave Page  wrote:
>>
>> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>>  wrote:
>> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>> >  wrote:
>> >>
>> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page  wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> I think we need more changes than just that;
>> >>>
>> >>> - The path at the top should not be editable (it should be greyed in
>> >>> fact)
>> >>
>> >> Ok
>> >>>
>> >>>
>> >>> - The path at the top should only show the directory path. The
>> >>> filename should never be appended.
>> >>
>> >> Ok
>> >>>
>> >>>
>> >>> - The CSS needs to be fixed so the filename textbox at the bottom is
>> >>> never hidden (as it is now if the dialogue opens at a small size).
>> >>
>> >> Ok
>> >>>
>> >>>
>> >>> - Double-click to navigate vs. rename should be modified to work in
>> >>> part like it does on Mac - Double-click on either the icon or the name
>> >>> should open the item (browser into a folder, or select and "OK" on a
>> >>> file), and Click then Enter should rename. I'm hesitant to try to
>> >>> implement "slow double click to rename" as that would likely need to
>> >>> be tunable for accessibility reasons.
>> >>
>> >> Ok, I will fix it.
>> >
>> > In the current scenario, the Enter Key is bound to the OK button by
>> > default
>> > in Alertify dialog which servers the purpose of closing the dialog.
>> > Should we de-attach Enter Key event bound to OK button and use it for
>> > rename
>> > file?
>> > please suggest what should I do?
>>
>> Hmm, good point.
>>
>> How hard would it be to look for 2 consecutive single-clicks (but not
>> a double-click) for rename? If we can do that, it avoids timing
>> considerations for double-clicks (which would be defined by the OS).
>
>
> I tried to implement slow double click, here is Fiddle
> There are two events 1) double click (it will be used for folder navigation)
> 2) Slow double click(For rename), It is a simple click event, when clicked
> twice after delay we consider it a slow double click.
>
> But it is not working smoothly, double click and single click events are
> conflicting.

Yeah, so I see.

> Also, we have rename button in navigation for rename operation,
> Can we skip slow double click because it is very confusing?

OK, I must have been having a brain failure moment or something. Yes,
skip it - we obviously don't need it with the rename button.

So we have:

- Click to select
- Double click to open a folder
- Button to rename the select file/folder

Sorry!

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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: Fix the issue for saving query output as CSV

2016-07-13 Thread Harshal Dhumal
Yes sure

-- 
*Harshal Dhumal*
*Software Engineer*

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

On Wed, Jul 13, 2016 at 5:10 PM, Dave Page  wrote:

> Hi
>
> Can you rebase this please?
>
> Thanks.
>
> On Mon, Jul 11, 2016 at 9:16 AM, Harshal Dhumal <
> harshal.dhu...@enterprisedb.com> wrote:
>
>> Hi,
>>
>> PFA patch for RM1405. Also to allow download in runtime we will still
>> need patch
>> 
>> sent by Neel.
>>
>> Changes: To download query result to CSV directly from server and not to
>> use download attr. of anchor tag () as it's not support by all of major
>> browsers (e.g. Safari).
>> Also it's not feasible to load data in html to download if result set of
>> query is very huge (in GBs).
>>
>>
>>
>>
>>
>> --
>> *Harshal Dhumal*
>> *Software Engineer*
>>
>> EnterpriseDB India: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> On Wed, Jun 29, 2016 at 4:53 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Jun 29, 2016 at 3:52 PM, Murtuza Zabuawala >> enterprisedb.com> wrote:
>>>
 Yes, It will not work in runtime as well but I think Neel is working
 for fix in run time for this issue, We might able to fix it in run time but
 issue persists in Safari unless they add support in browser itself.

 https://webkit.org/status/#feature-download-attribute


 > On 29-Jun-2016, at 3:40 pm, Dave Page  wrote:
 >
 > On Tue, Jun 28, 2016 at 10:33 AM, Murtuza Zabuawala
 >  wrote:
 >> Yes Dave, I agree that downloading files has been supported in
 browsers since long .
 >>
 >> But in general we send request & then receives files from web server
 but in our case we are fetching our data from Backbone models & then
 converting it to CSV format for downloading as a file at client side in
 browser itself.
 >
 > If Safari doesn't support client-side saving of files, then I have to
 > wonder if our runtime will either - both are webkit based.
 >
 > So I guess the next question to ask is; why don't we just generate the
 > CSV on the server side?
 >

 @Akshay,
 Can you please suggest on above?

>>>
>>>As we already have complete data in backgrid's full collection, so I
>>> have used it instead of fetching it again.
>>>

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



 --
 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgadmin-hackers

>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] PATCH: Fix the issue for saving query output as CSV

2016-07-13 Thread Harshal Dhumal
Hi,

PFA rebased patch for RM1405

-- 
*Harshal Dhumal*
*Software Engineer*

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

On Wed, Jul 13, 2016 at 5:15 PM, Harshal Dhumal <
harshal.dhu...@enterprisedb.com> wrote:

> Yes sure
>
> --
> *Harshal Dhumal*
> *Software Engineer*
>
> EnterpriseDB India: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> On Wed, Jul 13, 2016 at 5:10 PM, Dave Page  wrote:
>
>> Hi
>>
>> Can you rebase this please?
>>
>> Thanks.
>>
>> On Mon, Jul 11, 2016 at 9:16 AM, Harshal Dhumal <
>> harshal.dhu...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch for RM1405. Also to allow download in runtime we will still
>>> need patch
>>> 
>>> sent by Neel.
>>>
>>> Changes: To download query result to CSV directly from server and not to
>>> use download attr. of anchor tag () as it's not support by all of major
>>> browsers (e.g. Safari).
>>> Also it's not feasible to load data in html to download if result set of
>>> query is very huge (in GBs).
>>>
>>>
>>>
>>>
>>>
>>> --
>>> *Harshal Dhumal*
>>> *Software Engineer*
>>>
>>> EnterpriseDB India: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> On Wed, Jun 29, 2016 at 4:53 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>


 On Wed, Jun 29, 2016 at 3:52 PM, Murtuza Zabuawala >>> enterprisedb.com> wrote:

> Yes, It will not work in runtime as well but I think Neel is working
> for fix in run time for this issue, We might able to fix it in run time 
> but
> issue persists in Safari unless they add support in browser itself.
>
> https://webkit.org/status/#feature-download-attribute
>
>
> > On 29-Jun-2016, at 3:40 pm, Dave Page  wrote:
> >
> > On Tue, Jun 28, 2016 at 10:33 AM, Murtuza Zabuawala
> >  wrote:
> >> Yes Dave, I agree that downloading files has been supported in
> browsers since long .
> >>
> >> But in general we send request & then receives files from web
> server but in our case we are fetching our data from Backbone models & 
> then
> converting it to CSV format for downloading as a file at client side in
> browser itself.
> >
> > If Safari doesn't support client-side saving of files, then I have to
> > wonder if our runtime will either - both are webkit based.
> >
> > So I guess the next question to ask is; why don't we just generate
> the
> > CSV on the server side?
> >
>
> @Akshay,
> Can you please suggest on above?
>

As we already have complete data in backgrid's full collection, so
 I have used it instead of fetching it again.

>
> > --
> > Dave Page
> > Blog: http://pgsnake.blogspot.com
> > Twitter: @pgsnake
> >
> > EnterpriseDB UK: http://www.enterprisedb.com
> > The Enterprise PostgreSQL Company
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



 --
 *Akshay Joshi*
 *Principal Software Engineer *



 *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 976-788-8246*

>>>
>>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
diff --git a/web/pgadmin/tools/datagrid/templates/datagrid/index.html b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
index f2f6085..67cf107 100644
--- a/web/pgadmin/tools/datagrid/templates/datagrid/index.html
+++ b/web/pgadmin/tools/datagrid/templates/datagrid/index.html
@@ -182,6 +182,7 @@
 
 
 
+
 
 
 {% endblock %}
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index c713fb5..48fd0ba 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -28,6 +28,7 @@ from pgadmin.utils.sqlautocomplete.autocomplete import SQLAutoComplete
 
 from config import PG_DEFAULT_DRIVER
 
+
 # import unquote from urlib for python2.x and python3.x
 try:
 from urllib import unquote
@@ -1212,3 +1213,58 @@ def save_file():
 'status': True,
 }
 )
+
+
+@blueprint.route('/query_tool/download/', methods=["GET"])
+@login_required
+def start_query_download_tool(trans_id):
+sync_conn = None
+status, error_msg, conn, trans_obj, session_obj = check_transaction_status(trans_id)
+
+if status and conn is not None \
+and trans_obj is not None and session_obj is not None:
+
+data = request.args if request.args else None
+try:
+if data and 'query' in data:
+sql = data['query']
+

[pgadmin-hackers] pgAdmin 4 commit: Display comments on languages. Fixes #1412

2016-07-13 Thread Dave Page
Display comments on languages. Fixes #1412

Branch
--
master

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

Modified Files
--
.../languages/templates/languages/sql/9.1_plus/sqlpane.sql | 14 ++
.../languages/templates/languages/sql/9.3_plus/sqlpane.sql |  6 ++
2 files changed, 16 insertions(+), 4 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: Comments are not visible in Language node (pgAdmin4)

2016-07-13 Thread Dave Page
Thanks, applied.

On Tue, Jul 12, 2016 at 12:15 PM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix RM#1412, where comments are not visible in sql pane for
> Languages node.
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error

2016-07-13 Thread Surinder Kumar
Please find updated patch with following changes/enhancements:

   1. Double click on file/folder icon or name will navigate to the
   folder/file.
   2. Selected file/folder can be renamed by Rename button only. Double
   click rename is removed.
   3. Filename text box will not hide on smaller screen. Setting minimum
   width of File Browser fixed it.
   4. Path at top will only show directory name, not the file name and it
   is greyed out.

*Issue not fixed:*
Icons and fonts of Query tool and File Browser looks blurred in Runtime
environment.
I tried debugging it. while debugging, It gets fixed on my ubuntu runtime.
but I don't know how it gets fixed without changing css styles. It needs
more time to debug.

Please review.

On Wed, Jul 13, 2016 at 5:15 PM, Dave Page  wrote:

> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
>  wrote:
> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page  wrote:
> >>
> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
> >>  wrote:
> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
> >> >  wrote:
> >> >>
> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page  wrote:
> >> >>>
> >> >>> Hi,
> >> >>>
> >> >>> I think we need more changes than just that;
> >> >>>
> >> >>> - The path at the top should not be editable (it should be greyed in
> >> >>> fact)
> >> >>
> >> >> Ok
> >> >>>
> >> >>>
> >> >>> - The path at the top should only show the directory path. The
> >> >>> filename should never be appended.
> >> >>
> >> >> Ok
> >> >>>
> >> >>>
> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom is
> >> >>> never hidden (as it is now if the dialogue opens at a small size).
> >> >>
> >> >> Ok
> >> >>>
> >> >>>
> >> >>> - Double-click to navigate vs. rename should be modified to work in
> >> >>> part like it does on Mac - Double-click on either the icon or the
> name
> >> >>> should open the item (browser into a folder, or select and "OK" on a
> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
> >> >>> implement "slow double click to rename" as that would likely need to
> >> >>> be tunable for accessibility reasons.
> >> >>
> >> >> Ok, I will fix it.
> >> >
> >> > In the current scenario, the Enter Key is bound to the OK button by
> >> > default
> >> > in Alertify dialog which servers the purpose of closing the dialog.
> >> > Should we de-attach Enter Key event bound to OK button and use it for
> >> > rename
> >> > file?
> >> > please suggest what should I do?
> >>
> >> Hmm, good point.
> >>
> >> How hard would it be to look for 2 consecutive single-clicks (but not
> >> a double-click) for rename? If we can do that, it avoids timing
> >> considerations for double-clicks (which would be defined by the OS).
> >
> >
> > I tried to implement slow double click, here is Fiddle
> > There are two events 1) double click (it will be used for folder
> navigation)
> > 2) Slow double click(For rename), It is a simple click event, when
> clicked
> > twice after delay we consider it a slow double click.
> >
> > But it is not working smoothly, double click and single click events are
> > conflicting.
>
> Yeah, so I see.
>
> > Also, we have rename button in navigation for rename operation,
> > Can we skip slow double click because it is very confusing?
>
> OK, I must have been having a brain failure moment or something. Yes,
> skip it - we obviously don't need it with the rename button.
>
> So we have:
>
> - Click to select
> - Double click to open a folder
> - Button to rename the select file/folder
>
> Sorry!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


RM#1432_v2.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: To fix issue using PUBLIC as role (pgAdmin4)

2016-07-13 Thread Dave Page
Thanks, applied.

On Wed, Jul 13, 2016 at 11:40 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fix the issue where user was not able to select 'PUBLIC' as
> role in privileges.
> (RM#1416)
>
> This issue was due to previous commit: b78b3904cd7e5a8edf
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin 4 commit: Allow selection of 'PUBLIC' as a role in privileges.

2016-07-13 Thread Dave Page
Allow selection of 'PUBLIC' as a role in privileges. Fixes #1416

Branch
--
master

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

Modified Files
--
.../tables/column/templates/column/macros/privilege.macros   |  6 +++---
.../schemas/tables/templates/column/macros/privilege.macros  |  6 +++---
.../schemas/templates/macros/functions/privilege.macros  |  6 +++---
.../schemas/templates/macros/schemas/privilege.macros|  6 +++---
.../servers/templates/macros/default_privilege.macros| 12 ++--
.../server_groups/servers/templates/macros/privilege.macros  |  6 +++---
web/pgadmin/browser/server_groups/servers/utils.py   |  7 ++-
7 files changed, 27 insertions(+), 22 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error

2016-07-13 Thread Surinder Kumar
I forgot to merge the fix for issue "File Browser - File does not exist
error" in the patch.
Please ignore this patch.

On Wed, Jul 13, 2016 at 7:20 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> Please find updated patch with following changes/enhancements:
>
>1. Double click on file/folder icon or name will navigate to the
>folder/file.
>2. Selected file/folder can be renamed by Rename button only. Double
>click rename is removed.
>3. Filename text box will not hide on smaller screen. Setting minimum
>width of File Browser fixed it.
>4. Path at top will only show directory name, not the file name and it
>is greyed out.
>
> *Issue not fixed:*
> Icons and fonts of Query tool and File Browser looks blurred in Runtime
> environment.
> I tried debugging it. while debugging, It gets fixed on my ubuntu runtime.
> but I don't know how it gets fixed without changing css styles. It needs
> more time to debug.
>
> Please review.
>
> On Wed, Jul 13, 2016 at 5:15 PM, Dave Page  wrote:
>
>> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
>>  wrote:
>> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page  wrote:
>> >>
>> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>> >>  wrote:
>> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>> >> >  wrote:
>> >> >>
>> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page 
>> wrote:
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> I think we need more changes than just that;
>> >> >>>
>> >> >>> - The path at the top should not be editable (it should be greyed
>> in
>> >> >>> fact)
>> >> >>
>> >> >> Ok
>> >> >>>
>> >> >>>
>> >> >>> - The path at the top should only show the directory path. The
>> >> >>> filename should never be appended.
>> >> >>
>> >> >> Ok
>> >> >>>
>> >> >>>
>> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom
>> is
>> >> >>> never hidden (as it is now if the dialogue opens at a small size).
>> >> >>
>> >> >> Ok
>> >> >>>
>> >> >>>
>> >> >>> - Double-click to navigate vs. rename should be modified to work in
>> >> >>> part like it does on Mac - Double-click on either the icon or the
>> name
>> >> >>> should open the item (browser into a folder, or select and "OK" on
>> a
>> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
>> >> >>> implement "slow double click to rename" as that would likely need
>> to
>> >> >>> be tunable for accessibility reasons.
>> >> >>
>> >> >> Ok, I will fix it.
>> >> >
>> >> > In the current scenario, the Enter Key is bound to the OK button by
>> >> > default
>> >> > in Alertify dialog which servers the purpose of closing the dialog.
>> >> > Should we de-attach Enter Key event bound to OK button and use it for
>> >> > rename
>> >> > file?
>> >> > please suggest what should I do?
>> >>
>> >> Hmm, good point.
>> >>
>> >> How hard would it be to look for 2 consecutive single-clicks (but not
>> >> a double-click) for rename? If we can do that, it avoids timing
>> >> considerations for double-clicks (which would be defined by the OS).
>> >
>> >
>> > I tried to implement slow double click, here is Fiddle
>> > There are two events 1) double click (it will be used for folder
>> navigation)
>> > 2) Slow double click(For rename), It is a simple click event, when
>> clicked
>> > twice after delay we consider it a slow double click.
>> >
>> > But it is not working smoothly, double click and single click events are
>> > conflicting.
>>
>> Yeah, so I see.
>>
>> > Also, we have rename button in navigation for rename operation,
>> > Can we skip slow double click because it is very confusing?
>>
>> OK, I must have been having a brain failure moment or something. Yes,
>> skip it - we obviously don't need it with the rename button.
>>
>> So we have:
>>
>> - Click to select
>> - Double click to open a folder
>> - Button to rename the select file/folder
>>
>> Sorry!
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


[pgadmin-hackers] pgAdmin 4 commit: Fix an issue in procedure node where users were not a

2016-07-13 Thread Dave Page
Fix an issue in procedure node where users were not able to create a new 
procedure when they provide arguments. Fixes #1416

Branch
--
master

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

Modified Files
--
.../server_groups/servers/databases/schemas/functions/__init__.py   | 2 +-
.../schemas/functions/templates/function/pg/sql/9.1_plus/create.sql | 2 +-
.../schemas/functions/templates/function/pg/sql/9.1_plus/update.sql | 2 +-
.../schemas/functions/templates/function/pg/sql/9.2_plus/create.sql | 2 +-
.../schemas/functions/templates/function/pg/sql/9.2_plus/update.sql | 2 +-
.../schemas/functions/templates/function/pg/sql/9.5_plus/create.sql | 2 +-
.../schemas/functions/templates/function/pg/sql/9.5_plus/update.sql | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.1_plus/create.sql   | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.2_plus/create.sql   | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.2_plus/update.sql   | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.5_plus/create.sql   | 2 +-
.../schemas/functions/templates/function/ppas/sql/9.5_plus/update.sql   | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.1_plus/create.sql  | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.1_plus/update.sql  | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.2_plus/create.sql  | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.2_plus/update.sql  | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.5_plus/create.sql  | 2 +-
.../schemas/functions/templates/procedure/ppas/sql/9.5_plus/update.sql  | 2 +-
18 files changed, 18 insertions(+), 18 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] PATCH: Unable to create procedure (pgAdmin4)

2016-07-13 Thread Dave Page
Thanks, applied.

On Tue, Jul 12, 2016 at 9:04 AM, Murtuza Zabuawala
 wrote:
> Hi,
>
> PFA patch to fixed the issue in procedure node where user were not able to
> create new procedure when they provide arguments.
> (RM#1449)
>
> To fix the issue we used qtTypeIdent in sql template for datatype, earlier
> it was qtIdent which was causing issue.
>
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin4][Patch]: RM#1432 - File Browser - File does not exist error

2016-07-13 Thread Surinder Kumar
Please find updated patch.
This patch also includes the fix for issue  "File Browser - File does not
exist error".

On Wed, Jul 13, 2016 at 7:23 PM, Surinder Kumar <
surinder.ku...@enterprisedb.com> wrote:

> I forgot to merge the fix for issue "File Browser - File does not exist
> error" in the patch.
> Please ignore this patch.
>
> On Wed, Jul 13, 2016 at 7:20 PM, Surinder Kumar <
> surinder.ku...@enterprisedb.com> wrote:
>
>> Please find updated patch with following changes/enhancements:
>>
>>1. Double click on file/folder icon or name will navigate to the
>>folder/file.
>>2. Selected file/folder can be renamed by Rename button only. Double
>>click rename is removed.
>>3. Filename text box will not hide on smaller screen. Setting minimum
>>width of File Browser fixed it.
>>4. Path at top will only show directory name, not the file name and
>>it is greyed out.
>>
>> *Issue not fixed:*
>> Icons and fonts of Query tool and File Browser looks blurred in Runtime
>> environment.
>> I tried debugging it. while debugging, It gets fixed on my ubuntu
>> runtime. but I don't know how it gets fixed without changing css styles. It
>> needs more time to debug.
>>
>> Please review.
>>
>> On Wed, Jul 13, 2016 at 5:15 PM, Dave Page  wrote:
>>
>>> On Tue, Jul 12, 2016 at 7:10 AM, Surinder Kumar
>>>  wrote:
>>> > On Mon, Jul 11, 2016 at 6:41 PM, Dave Page  wrote:
>>> >>
>>> >> On Thu, Jul 7, 2016 at 1:50 PM, Surinder Kumar
>>> >>  wrote:
>>> >> > On Wed, Jul 6, 2016 at 7:02 PM, Surinder Kumar
>>> >> >  wrote:
>>> >> >>
>>> >> >> On Wed, Jul 6, 2016 at 5:40 PM, Dave Page 
>>> wrote:
>>> >> >>>
>>> >> >>> Hi,
>>> >> >>>
>>> >> >>> I think we need more changes than just that;
>>> >> >>>
>>> >> >>> - The path at the top should not be editable (it should be greyed
>>> in
>>> >> >>> fact)
>>> >> >>
>>> >> >> Ok
>>> >> >>>
>>> >> >>>
>>> >> >>> - The path at the top should only show the directory path. The
>>> >> >>> filename should never be appended.
>>> >> >>
>>> >> >> Ok
>>> >> >>>
>>> >> >>>
>>> >> >>> - The CSS needs to be fixed so the filename textbox at the bottom
>>> is
>>> >> >>> never hidden (as it is now if the dialogue opens at a small size).
>>> >> >>
>>> >> >> Ok
>>> >> >>>
>>> >> >>>
>>> >> >>> - Double-click to navigate vs. rename should be modified to work
>>> in
>>> >> >>> part like it does on Mac - Double-click on either the icon or the
>>> name
>>> >> >>> should open the item (browser into a folder, or select and "OK"
>>> on a
>>> >> >>> file), and Click then Enter should rename. I'm hesitant to try to
>>> >> >>> implement "slow double click to rename" as that would likely need
>>> to
>>> >> >>> be tunable for accessibility reasons.
>>> >> >>
>>> >> >> Ok, I will fix it.
>>> >> >
>>> >> > In the current scenario, the Enter Key is bound to the OK button by
>>> >> > default
>>> >> > in Alertify dialog which servers the purpose of closing the dialog.
>>> >> > Should we de-attach Enter Key event bound to OK button and use it
>>> for
>>> >> > rename
>>> >> > file?
>>> >> > please suggest what should I do?
>>> >>
>>> >> Hmm, good point.
>>> >>
>>> >> How hard would it be to look for 2 consecutive single-clicks (but not
>>> >> a double-click) for rename? If we can do that, it avoids timing
>>> >> considerations for double-clicks (which would be defined by the OS).
>>> >
>>> >
>>> > I tried to implement slow double click, here is Fiddle
>>> > There are two events 1) double click (it will be used for folder
>>> navigation)
>>> > 2) Slow double click(For rename), It is a simple click event, when
>>> clicked
>>> > twice after delay we consider it a slow double click.
>>> >
>>> > But it is not working smoothly, double click and single click events
>>> are
>>> > conflicting.
>>>
>>> Yeah, so I see.
>>>
>>> > Also, we have rename button in navigation for rename operation,
>>> > Can we skip slow double click because it is very confusing?
>>>
>>> OK, I must have been having a brain failure moment or something. Yes,
>>> skip it - we obviously don't need it with the rename button.
>>>
>>> So we have:
>>>
>>> - Click to select
>>> - Double click to open a folder
>>> - Button to rename the select file/folder
>>>
>>> Sorry!
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


RM#1432_v3.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [Patch] Fix Unicode in errmsg

2016-07-13 Thread Magnun Leno


I've changed only the data coming as the user input for deferent 
nodes. :-)

Great!

It's good to have feedback like above.
That will give us the idea, where we need improvements, as all the 
current developers, working on pgAdmin 4, are from English background.
I'm really interested in contributing to the project. I hope to have 
some spare time soon, so I can study the source code and send some 
improvements, not just fixes.


Thanks for the inputs/feedbacks, please keep them coming.
I will. Thanks for being so receptive, generally big open source aren't 
friendly.


---
Magnun Leno


[pgadmin-hackers] PATCH: To fix Timestamps displaying with time as 00:00 (pgAdmin4)

2016-07-13 Thread Murtuza Zabuawala
Hi,

PFA patch to fix the issue in timestamp datatype(s) displaying with time as
00:00
(RM#1437)

The issue was with backgrid datetime cell which do not fully support ISO-8601
datetime format.

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


RM_1437.patch
Description: Binary data

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers