mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-25 08:21:04 -06:00
Make the upgrade check key configurable.
This commit is contained in:
parent
6e5b54eb1a
commit
d7da8be486
@ -304,6 +304,9 @@ UPGRADE_CHECK_ENABLED = True
|
||||
# Where should we get the data from?
|
||||
UPGRADE_CHECK_URL = 'https://www.pgadmin.org/versions.json'
|
||||
|
||||
# What key should we look at in the upgrade data file?
|
||||
UPGRADE_CHECK_KEY = 'pgadmin4'
|
||||
|
||||
# Which CA file should we use?
|
||||
# Default to cacert.pem in the same directory as config.py et al.
|
||||
CA_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
|
@ -519,13 +519,14 @@ def index():
|
||||
current_app.logger.exception('Exception when checking for update')
|
||||
|
||||
if data is not None:
|
||||
if data['pgadmin4']['version_int'] > config.APP_VERSION_INT:
|
||||
if data[config.UPGRADE_CHECK_KEY]['version_int'] > \
|
||||
config.APP_VERSION_INT:
|
||||
msg = render_template(
|
||||
MODULE_NAME + "/upgrade.html",
|
||||
current_version=config.APP_VERSION,
|
||||
upgrade_version=data['pgadmin4']['version'],
|
||||
upgrade_version=data[config.UPGRADE_CHECK_KEY]['version'],
|
||||
product_name=config.APP_NAME,
|
||||
download_url=data['pgadmin4']['download_url']
|
||||
download_url=data[config.UPGRADE_CHECK_KEY]['download_url']
|
||||
)
|
||||
|
||||
flash(msg, 'warning')
|
||||
|
Loading…
Reference in New Issue
Block a user