From d82663e27a23990a28208b69be34b055e87e8b8a Mon Sep 17 00:00:00 2001 From: Lazlo Westerhof Date: Thu, 19 Oct 2023 09:49:38 +0200 Subject: [PATCH] YDA-5504: add filesize to checksum report --- deposit/deposit.py | 4 ++-- deposit/static/deposit/js/data.js | 3 ++- deposit/templates/deposit/data.html | 3 +-- research/research.py | 4 ++-- research/static/research/js/research.js | 3 ++- research/templates/research/browse.html | 3 +-- vault/static/vault/js/vault.js | 3 ++- vault/templates/vault/browse.html | 3 +-- vault/vault.py | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/deposit/deposit.py b/deposit/deposit.py index 53b09fd5..ca865a49 100644 --- a/deposit/deposit.py +++ b/deposit/deposit.py @@ -105,13 +105,13 @@ def download_report() -> Response: ext = '.csv' if response['status'] == 'ok': for result in response["data"]: - output += f"{result['name']},{result['checksum']} \n" + output += f"{result['name']},{result['size']},{result['checksum']} \n" else: mime = 'text/plain' ext = '.txt' if response['status'] == 'ok': for result in response["data"]: - output += f"{result['name']} {result['checksum']} \n" + output += f"{result['name']} {result['size']} {result['checksum']} \n" return Response( output, diff --git a/deposit/static/deposit/js/data.js b/deposit/static/deposit/js/data.js index 009547ba..1786a9a9 100644 --- a/deposit/static/deposit/js/data.js +++ b/deposit/static/deposit/js/data.js @@ -158,10 +158,11 @@ $(function () { { coll: Yoda.basePath + folder }).then((data) => { let table = '' - table += '' + table += '' $.each(data, function (index, obj) { table += ` + ` }) diff --git a/deposit/templates/deposit/data.html b/deposit/templates/deposit/data.html index 8a5ac153..cc25cfad 100644 --- a/deposit/templates/deposit/data.html +++ b/deposit/templates/deposit/data.html @@ -368,8 +368,7 @@
FilenameChecksum
FilenameSizeChecksum
${obj.name}${obj.size} ${obj.checksum}
' - table += '' + table += '' $.each(data, function (index, obj) { table += ` + ` }) diff --git a/research/templates/research/browse.html b/research/templates/research/browse.html index f8e15f5b..741504f4 100644 --- a/research/templates/research/browse.html +++ b/research/templates/research/browse.html @@ -61,8 +61,7 @@
FilenameChecksum
FilenameSizeChecksum
${obj.name}${obj.size} ${obj.checksum}
' - table += '' + table += '' $.each(data, function (index, obj) { table += ` + ` }) diff --git a/vault/templates/vault/browse.html b/vault/templates/vault/browse.html index 5a649639..0f529513 100644 --- a/vault/templates/vault/browse.html +++ b/vault/templates/vault/browse.html @@ -126,8 +126,7 @@
FilenameChecksum
FilenameSizeChecksum
${obj.name}${obj.size} ${obj.checksum}