[Bug] Enpoints have wrong paths when behind proxy

2017-07-25 Thread Florian Loeffler

Hi list,

a bug to report, involving wrong paths generated for some resources when 
pgadmin4 is running behind a proxy and under a another context path than 
"/".

This leads to a non functional UI.

Version: pgadmin4-1.6-py2.py3-none-any.whl
OS: Ubuntu 16.04 LTS
Mode: Desktop

Steps to reproduce:
- Setup pgadmin4 to be running inside apache2 by following the 
documentation at

https://www.pgadmin.org/docs/pgadmin4/1.x/server_deployment.html#apache-httpd-configuration-linux-unix
- Change the WSGIScriptAlias line to contain a subcontext, e.g.
change
WSGIScriptAlias / 
/usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.wsgi

to
WSGIScriptAlias /pgadmin4 
/usr/local/lib/python2.7/dist-packages/pgadmin4/pgAdmin4.wsgi

- access localhost/pgadmin4 on your server
- multiple resources will not be accessible leading to some lements not 
functioning (eg. the "Add server" button)


Proposed fix:
- add the current context path to the endpoints generated in
pgadmin/browser/templates/browser/js/endpoints.js

Unfortunately I have not enough understanding about the code to provide 
a patch.
For me the fix was to just hardcode the "pgadmin4" path into the code 
line directly.

That means I have the follwing now:
'{{ endpoint|safe }}': '/pgadmin4{{ url|safe }}'{% endfor %}


Hope this helps
Greetings
Flo

--
Florian Löffler, Zentrale Systeme
Regionales Rechenzentrum Erlangen (RRZE)
Friedrich-Alexander-Universität Erlangen-Nürnberg
Martensstraße 1, 91058 Erlangen, Germany
Tel. +49 9131 85-28146
florian.loeff...@fau.de
www.rrze.fau.de




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Bug] Enpoints have wrong paths when behind proxy

2017-07-25 Thread Ashesh Vashi
On Tue, Jul 25, 2017 at 3:37 PM, Florian Loeffler 
wrote:

> Hi list,
>
> a bug to report, involving wrong paths generated for some resources when
> pgadmin4 is running behind a proxy and under a another context path than
> "/".
> This leads to a non functional UI.
>
> Version: pgadmin4-1.6-py2.py3-none-any.whl
> OS: Ubuntu 16.04 LTS
> Mode: Desktop
>
> Steps to reproduce:
> - Setup pgadmin4 to be running inside apache2 by following the
> documentation at
> https://www.pgadmin.org/docs/pgadmin4/1.x/server_deployment.
> html#apache-httpd-configuration-linux-unix
> - Change the WSGIScriptAlias line to contain a subcontext, e.g.
> change
> WSGIScriptAlias / /usr/local/lib/python2.7/dist-
> packages/pgadmin4/pgAdmin4.wsgi
> to
> WSGIScriptAlias /pgadmin4 /usr/local/lib/python2.7/dist-
> packages/pgadmin4/pgAdmin4.wsgi
> - access localhost/pgadmin4 on your server
> - multiple resources will not be accessible leading to some lements not
> functioning (eg. the "Add server" button)
>
> Proposed fix:
> - add the current context path to the endpoints generated in
> pgadmin/browser/templates/browser/js/endpoints.js
>
> Unfortunately I have not enough understanding about the code to provide a
> patch.
> For me the fix was to just hardcode the "pgadmin4" path into the code line
> directly.
> That means I have the follwing now:
> '{{ endpoint|safe }}': '/pgadmin4{{ url|safe }}'{% endfor %}
>
Dave has committed a patch few minutes ago for the same.



> *commit 178d583bcd7390f3b1e47df6298d924059b21c86*
> *Author: Murtuza Zabuawala  >*
> *Date:   Tue Jul 25 10:15:18 2017 +0100**Fix paths under non-standard
> virtual directories. Fixes #2563*



--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



*http://www.linkedin.com/in/asheshvashi*


>
>
> Hope this helps
> Greetings
> Flo
>
> --
> Florian Löffler, Zentrale Systeme
> Regionales Rechenzentrum Erlangen (RRZE)
> Friedrich-Alexander-Universität Erlangen-Nürnberg
> Martensstraße 1, 91058 Erlangen, Germany
> Tel. +49 9131 85-28146
> florian.loeff...@fau.de
> www.rrze.fau.de
>
>
>


Running development version of pgAdmin 4 corrupts the configuration

2017-07-25 Thread Hanxue Lee
I was using pgAdmin 4 without any problems, until I started mucking around with 
the development version of pgAdmin 4 from the Git repository.


After that, pgAdmin 4 fail to launch, with the following error:


[cid:a665269e-12ae-4d3d-830b-904641d03cfa]

×



I do not see any files in $HOME/.pgadmin that I can tweak to solve the issue.


My workaround is to rename the $HOME/.pgadmin directory so that launching 
pgAdmin 4 again will regenerate fresh files.


Is there any way to fix the configuration for pgAdmin 4? Or are those settings 
actually stored in a database?



Best regards,


Hanxue


unsubscribe

2017-07-25 Thread Alex Ignatov
Hello!

Does anybody knows how can I unsubscrible from this mailing list ?

 
pgadmin-support-unsubscr...@lists.postgresql.org doesn't work

 

--

Alex Ignatov 
Postgres Professional:  
http://www.postgrespro.com 
The Russian Postgres Company

 



Re: unsubscribe

2017-07-25 Thread Darren Duncan

On 2017-07-25 4:10 AM, Alex Ignatov wrote:

Hello!

Does anybody knows how can I unsubscrible from this mailing list ?

pgadmin-support-unsubscribe@lists.postgresql.orgdoesn’t work


Alex, that SHOULD work, I believe.

Otherwise per the list header https://lists.postgresql.org/manage/ is another 
way to try doing it.


Per his request, please contact Stephen Frost  if the normal 
mechanism for getting off the list isn't working for you.


-- Darren Duncan