fix: Submit file to pandora

pull/993/head
Raphaël Vinot 2024-11-14 00:31:14 +01:00
parent 44e69a44b4
commit cd0411f419
2 changed files with 4 additions and 4 deletions

View File

@ -215,7 +215,7 @@
<div> <div>
{% if has_pandora %} {% if has_pandora %}
<div> Downloaded file: <b>{{url['url_object'].downloaded_filename}}</b> ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})</div> <div> Downloaded file: <b>{{url['url_object'].downloaded_filename}}</b> ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})</div>
{{ pandora_submit() }} {{ pandora_submit(tree_uuid, url['url_object'].uuid) }}
{% else %} {% else %}
<a href="{{ url_for('data', tree_uuid=tree_uuid)}}"> <a href="{{ url_for('data', tree_uuid=tree_uuid)}}">
Download {{url['url_object'].downloaded_filename}} Download {{url['url_object'].downloaded_filename}}
@ -242,7 +242,7 @@
{% else %} {% else %}
{{ ressource_legitimacy_details(url['legitimacy'], url['url_object'].body.getbuffer().nbytes) }} {{ ressource_legitimacy_details(url['legitimacy'], url['url_object'].body.getbuffer().nbytes) }}
{% if has_pandora %} {% if has_pandora %}
{{ pandora_submit(url['url_object'].uuid) }} {{ pandora_submit(tree_uuid, url['url_object'].uuid) }}
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
@ -303,7 +303,7 @@
{{ ressource_legitimacy_details(details['legitimacy'], details['body_size']) }} {{ ressource_legitimacy_details(details['legitimacy'], details['body_size']) }}
</div> </div>
{% if has_pandora %} {% if has_pandora %}
{{ pandora_submit(url['url_object'].uuid, hash) }} {{ pandora_submit(tree_uuid, url['url_object'].uuid), hash }}
{% endif %} {% endif %}
<div> <div>
This file {% if details['type'] %}(<b>{{ details['type'] }}</b>){% endif %} can be found <b>{{ details['hash_freq'] }}</b> times This file {% if details['type'] %}(<b>{{ details['type'] }}</b>){% endif %} can be found <b>{{ details['hash_freq'] }}</b> times

View File

@ -315,7 +315,7 @@
{% endmacro %} {% endmacro %}
{% macro pandora_submit(node_uuid, ressource_hash) %} {% macro pandora_submit(tree_uuid, node_uuid, ressource_hash) %}
<div class="col-sm-8"> <div class="col-sm-8">
<button type="button" class="btn btn-primary btn-sm submitPandoraButton" <button type="button" class="btn btn-primary btn-sm submitPandoraButton"
title="open a new tab with the pandora report" title="open a new tab with the pandora report"