return pgwui_core.core.DataLineProcessor(ue, self)
-def log_response(response):
+def log_response(response, download=False):
if response['report_success']:
if pgwui_core.utils.is_checked(response['csv_checked']):
download_fmt = 'CSV'
else:
download_fmt = 'TAB'
- if pgwui_core.utils.is_checked(response['one_file_checked']):
- download_as = 'one file'
+ if not download:
+ download_as = 'Displayed on-screen'
+ elif pgwui_core.utils.is_checked(response['one_file_checked']):
+ download_as = 'Download as one file'
else:
- download_as = 'a zip file of one file per result set'
+ download_as = 'Download as a zip file of one file per result set'
log.info(': '.join(
[f'Successful sql: DB {response["db"]}',
# ' File ({filename}):'
f'Download Format {download_fmt}',
- f'Download as {download_as}',
+ download_as,
f'By user {response["user"]}']))
pmd_response.app_iter = codecs.iterencode(uh.tfile, 'utf_8')
- log_response(response)
+ log_response(response, uh.uf['download'])
return pmd_response
else:
settings = request.registry.settings