From cf6965f2e6da0a30ddee243f38f172929781521f Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 11 Aug 2022 18:10:46 +0200 Subject: [PATCH] modify template wb --- ereuse_devicehub/templates/workbench/wbSettings.ini | 8 ++++++++ ereuse_devicehub/workbench/views.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/ereuse_devicehub/templates/workbench/wbSettings.ini b/ereuse_devicehub/templates/workbench/wbSettings.ini index 33bf4754..14459454 100644 --- a/ereuse_devicehub/templates/workbench/wbSettings.ini +++ b/ereuse_devicehub/templates/workbench/wbSettings.ini @@ -3,6 +3,10 @@ DH_TOKEN = {{ token }} DH_URL = {{ url }} {% if erease_basic %} +DH_HOST = {{ host }} +DH_DATABASE = {{ schema }} +DEVICEHUB_URL = https://${DB_HOST}/${DB_DATABASE}/ + WB_BENCHMARK = True WB_STRESS_TEST = 0 WB_SMART_TEST = short @@ -14,6 +18,10 @@ WB_ERASE_LEADING_ZEROS = False WB_DEBUG = True {% endif %} {% if erease_sectors %} +DH_HOST = {{ host }} +DH_DATABASE = {{ schema }} +DEVICEHUB_URL = https://${DB_HOST}/${DB_DATABASE}/ + WB_BENCHMARK = True WB_STRESS_TEST = 0 WB_SMART_TEST = short diff --git a/ereuse_devicehub/workbench/views.py b/ereuse_devicehub/workbench/views.py index 9ef4d6e6..ea6d5e4f 100644 --- a/ereuse_devicehub/workbench/views.py +++ b/ereuse_devicehub/workbench/views.py @@ -72,6 +72,8 @@ class SettingsView(GenericMixin): if 'erease' in self.opt: url = "https://{}/actions/".format(app.config['HOST']) self.wbContext['url'] = url + self.wbContext['host'] = app.config['HOST'] + self.wbContext['schema'] = app.config['SCHEMA'] if self.opt == 'erease_basic': self.wbContext['erease_basic'] = True if self.opt == 'erease_sectors':