new: Add link to download redirects on tree page

pull/81/head
Raphaël Vinot 2020-08-07 11:58:20 +02:00
parent 8c53663418
commit c949320aa6
2 changed files with 7 additions and 2 deletions

View File

@ -402,7 +402,7 @@ def tree(tree_uuid: str, urlnode_uuid: Optional[str]=None):
return render_template('tree.html', tree_json=tree_json, start_time=start_time,
user_agent=user_agent, root_url=root_url, tree_uuid=tree_uuid,
meta=meta, enable_mail_notification=enable_mail_notification,
urlnode_uuid=urlnode_uuid)
urlnode_uuid=urlnode_uuid, has_redirects=True if cache['redirects'] else False)
except NoValidHarFile as e:
return render_template('error.html', error_message=e)

View File

@ -87,6 +87,11 @@
<a href="#statsModal" data-remote="{{ url_for('stats', tree_uuid=tree_uuid) }}"
data-toggle="modal" data-target="#statsModal" role="button">Show Statistics</a>
</li>
{% if has_redirects %}
<li>
<a href="{{ url_for('redirects', tree_uuid=tree_uuid) }}" role="button">Download redirects</a>
</li>
{% endif %}
<li>
<a href="#unflag" role="button" onclick="UnflagAllNodes();">Unflag all nodes</a>
</li>
@ -100,7 +105,7 @@
<li>
<a href="#emailModal" data-toggle="modal" data-target="#emailModal" role="button">Notify by mail</a>
</li>
{%endif%}
{% endif %}
</ul>
</div>
</div>