RE: Consider default SERVER_MODE =True for pgadmin4-v1-web

From: Mike Surcouf <mikes(at)surcouf(dot)co(dot)uk>
To: 'Dave Page' <dpage(at)pgadmin(dot)org>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: RE: Consider default SERVER_MODE =True for pgadmin4-v1-web
Date: 2017-07-19 16:07:02
Message-ID: 2197768425D7F5479A0FFB3FEC212F7FF5F00D61@aesmail.surcouf.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi Dave thanks for reply

In what scenario are the web components used in desktop mode.
Sorry if I I keep banging on about it

From: Dave Page [mailto:dpage(at)pgadmin(dot)org]
Sent: 19 July 2017 17:03
To: Mike Surcouf
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Consider default SERVER_MODE =True for pgadmin4-v1-web

On Wed, Jul 19, 2017 at 4:54 PM, Mike Surcouf <mikes(at)surcouf(dot)co(dot)uk<mailto:mikes(at)surcouf(dot)co(dot)uk>> wrote:
It would be nice if the pgadmin40v1-web package set the SERVER_MODE = True

I can't think why you would install the web package without this but there may be a reason?

Yes, it would break the default installation mode (desktop).

The web package is "the web components of pgadmin", not "pgadmin to run in web mode".

Also since the setup script does different things depending on this value if you don't do it first you have to delete the config and sqllite database and start again otherwise it will never work

Currently I have this in my setup script

#Overide SERVER_MODE (must be done BEFORE setup)
cat >> /usr/lib/python2.7/site-packages/pgadmin4-web/config_local.py << "EOF"
SERVER_MODE = True
EOF

I tend to just edit that setting in config_local.py as I need it, but then also include:

# Use a different config DB for each server mode.
if SERVER_MODE == False:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-desktop.db'
)
else:
SQLITE_PATH = os.path.join(
DATA_DIR,
'pgadmin4-server.db'
)

Anyway, to the main point - I've been trying to figure out a half-decent way of being able to support both server and desktop modes out of the box; and have yet to come up with anything that wouldn't be a tangled mess of config files. I still have some ideas though, and hope to explore them some more tomorrow.

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

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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Mike Surcouf 2017-07-19 16:13:42 RE: Consider default SERVER_MODE =True for pgadmin4-v1-web
Previous Message Dave Page 2017-07-19 16:03:07 Re: Consider default SERVER_MODE =True for pgadmin4-v1-web