fixing review comments

This commit is contained in:
Cayo Puigdefabregas 2021-04-12 12:05:52 +02:00
parent b13d8e5b97
commit aa09413011
3 changed files with 21 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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