diff --git a/ereuse_devicehub/resources/documents/documents.py b/ereuse_devicehub/resources/documents/documents.py index 1691f0ab..3eadfb4d 100644 --- a/ereuse_devicehub/resources/documents/documents.py +++ b/ereuse_devicehub/resources/documents/documents.py @@ -327,11 +327,12 @@ class WbConfDocumentView(DeviceView): 'host': app.config['DB_HOST'], 'inventory': app.config['DB_SCHEMA'] } - data['erase'] = False if wbtype == 'usodyrate' else True + data['erase'] = False + # data['erase'] = False if wbtype == 'usodyrate' else True - env = flask.render_template('documents/wbConfiguration.ini', **data) + env = flask.render_template('documents/wbSettings.ini', **data) output = make_response(env) - output.headers['Content-Disposition'] = 'attachment; filename=Configuration.ini' + output.headers['Content-Disposition'] = 'attachment; filename=settings.ini' output.headers['Content-type'] = 'text/plain' return output diff --git a/ereuse_devicehub/resources/documents/templates/documents/wbConfiguration.ini b/ereuse_devicehub/resources/documents/templates/documents/wbConfiguration.ini deleted file mode 100644 index d7b43547..00000000 --- a/ereuse_devicehub/resources/documents/templates/documents/wbConfiguration.ini +++ /dev/null @@ -1,14 +0,0 @@ -DH_TOKEN='{{token}}' -DH_HOST='{{host}}' -DH_INVENTORY='{{inventory}}' -DEVICEHUB_URL=https://${DB_HOST}/${DB_INVENTORY}/ - -WB_BENCHMARK = True -WB_STRESS_TEST = 0 -WB_SMART_TEST = 'short' - -WB_ERASE = {{erase}} -WB_ERASE_STEPS = 1 -WB_ERASE_LEADING_ZEROS = False - -WB_DEBUG = True diff --git a/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini b/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini new file mode 100644 index 00000000..c7156a65 --- /dev/null +++ b/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini @@ -0,0 +1,17 @@ +[settings] + +DH_TOKEN="{{token}}" + +DH_HOST="{{host}}" +DH_DATABASE="{{inventory}}" +DEVICEHUB_URL=https://${DB_HOST}/${DB_DATABASE}/ + +WB_BENCHMARK = False +WB_STRESS_TEST = 0 +WB_SMART_TEST = "" + +WB_ERASE = {{erase}} +WB_ERASE_STEPS = 1 +WB_ERASE_LEADING_ZEROS = False + +WB_DEBUG = True