Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-07 Thread Dave Page
Thanks, applied. On Wed, Mar 7, 2018 at 3:17 PM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi Dave, > > PFA updated patch. > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > On Wed, Mar 7, 2018 at 7:20

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-07 Thread Murtuza Zabuawala
Hi Dave, PFA updated patch. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Wed, Mar 7, 2018 at 7:20 PM, Dave Page wrote: > Hi > > On Mon, Mar 5, 2018 at 8:12 AM, Murtuza Zabuawala enterprisedb.com> wrote: > >> Hi, >> >> PFA patch

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-07 Thread Dave Page
Hi On Mon, Mar 5, 2018 at 8:12 AM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi, > > PFA patch to disable Gravatar image in Server mode. > > Requirments & Issues: > - For security reasons. > - For systems which do not have internet access. > - Hangs pgAdmin4 while loading t

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-07 Thread Murtuza Zabuawala
Hi Joao, On Tue, Mar 6, 2018 at 10:56 PM, Joao De Almeida Pereira < jdealmeidapere...@pivotal.io> wrote: > Hello, > > I just sent a video that talks exactly about this, in the journey to have > a more maintainable code and easier to navigate, we sometimes increase > complexity for a period of tim

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-06 Thread Joao De Almeida Pereira
Hello, I just sent a video that talks exactly about this, in the journey to have a more maintainable code and easier to navigate, we sometimes increase complexity for a period of time in order to get to the state that we want to be. In particular in this example I tried the following: 1. Demonstr

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-06 Thread Dave Page
Hi On Tue, Mar 6, 2018 at 6:59 AM, Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com> wrote: > Hi Joao, > > Your suggestion is good but in my own opinion it is overkill just to > replace code {{ username| gravatar }} as rest of the syntax is pure HTML, > This makes code much simpler and easy

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-05 Thread Murtuza Zabuawala
Hi Joao, Your suggestion is good but in my own opinion it is overkill just to replace code {{ username| gravatar }} as rest of the syntax is pure HTML, This makes code much simpler and easy to understand. Apart from that we will be rendering 'index.html' template anyways and I don't see any extra

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-05 Thread Joao De Almeida Pereira
Hello, I understand that, but what do we win by using it? As you have noticed by now I am not very fond of using templates for everything, and I believe this is one of the things that we can skip templates. We might even shift this to a frontend concern and if we want there are node libraries to ge

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-05 Thread Murtuza Zabuawala
Hi Joao, We are using Flask-Gravatar module for this and it is designed to work with template only. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Mon, Mar 5, 2018 at 8:57 PM, Joao De Almeid

Re: [pgAdmin4][RM#3037] Allow user to disable Gravatar image

2018-03-05 Thread Joao De Almeida Pereira
Hi Murtuza, Why are we doing this using templates? Can this be done with a request to the backend to get the image and then retrieve the Gravatar if it is defined or return a static image if not? + +{% if config.SERVER_MODE %} window.onload = function(e){ setTimeout(function() { - var gravat