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

Поиск
Список
Период
Сортировка
От Mike Surcouf
Тема RE: Consider default SERVER_MODE =True for pgadmin4-v1-web
Дата
Msg-id 2197768425D7F5479A0FFB3FEC212F7FF5F00D61@aesmail.surcouf.local
обсуждение исходный текст
Ответ на Re: Consider default SERVER_MODE =True for pgadmin4-v1-web  (Dave Page <dpage@pgadmin.org>)
Ответы Re: Consider default SERVER_MODE =True for pgadmin4-v1-web  (Dave Page <dpage@pgadmin.org>)
Список 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@pgadmin.org]
Sent: 19 July 2017 17:03
To: Mike Surcouf
Cc: pgadmin-support@postgresql.org
Subject: Re: Consider default SERVER_MODE =True for pgadmin4-v1-web

 

 

 

On Wed, Jul 19, 2017 at 4:54 PM, Mike Surcouf <mikes@surcouf.co.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

В списке pgadmin-support по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Consider default SERVER_MODE =True for pgadmin4-v1-web
Следующее
От: Mike Surcouf
Дата:
Сообщение: RE: Consider default SERVER_MODE =True for pgadmin4-v1-web