mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Fix hardcoded progress bar in work queue, and related crash
This commit is contained in:
parent
64f131ae27
commit
20583784f5
@ -101,17 +101,23 @@
|
||||
|
||||
<h2 class="mt-4">Unadded Topic List</h2>
|
||||
|
||||
<p>
|
||||
{{ total_topics - topics_to_add }} / {{ total_topics }} packages have been been added to cdb,
|
||||
based on cdb's forum parser. {{ topics_to_add }} remaining.
|
||||
</p>
|
||||
{% if total_topics > 0 %}
|
||||
<p>
|
||||
{{ total_topics - topics_to_add }} / {{ total_topics }} packages have been been added to cdb,
|
||||
based on cdb's forum parser. {{ topics_to_add }} remaining.
|
||||
</p>
|
||||
|
||||
<div class="progress my-4">
|
||||
{% set perc = 32 %}
|
||||
<div class="progress-bar bg-success" role="progressbar"
|
||||
style="width: {{ perc }}%" aria-valuenow="{{ perc }}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<div class="progress my-4">
|
||||
{% set perc = 100 * (total_topics - topics_to_add) / total_topics %}
|
||||
<div class="progress-bar bg-success" role="progressbar"
|
||||
style="width: {{ perc }}%" aria-valuenow="{{ perc }}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-primary" href="{{ url_for('todo.topics') }}">View Unadded Topic List</a>
|
||||
<a class="btn btn-primary" href="{{ url_for('todo.topics') }}">View Unadded Topic List</a>
|
||||
{% else %}
|
||||
<p>
|
||||
The forum topic crawler needs to run at least once for this section to work.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -51,15 +51,21 @@ Topics to be Added
|
||||
|
||||
<h1>Topics to be Added</h1>
|
||||
|
||||
<p>
|
||||
{{ total - topic_count }} / {{ total }} topics have been added as packages to CDB.
|
||||
{{ topic_count }} remaining.
|
||||
</p>
|
||||
<div class="progress">
|
||||
{% set perc = 100 * (total - topic_count) / total %}
|
||||
<div class="progress-bar bg-success" role="progressbar"
|
||||
style="width: {{ perc }}%" aria-valuenow="{{ perc }}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% if topic_count > 0 %}
|
||||
<p>
|
||||
{{ total - topic_count }} / {{ total }} topics have been added as packages to CDB.
|
||||
{{ topic_count }} remaining.
|
||||
</p>
|
||||
<div class="progress">
|
||||
{% set perc = 100 * (total - topic_count) / total %}
|
||||
<div class="progress-bar bg-success" role="progressbar"
|
||||
style="width: {{ perc }}%" aria-valuenow="{{ perc }}" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>
|
||||
The forum topic crawler needs to run at least once for this section to work.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="GET" action="{{ url_for('todo.topics') }}" class="my-4">
|
||||
<input type="hidden" name="show_discarded" value={{ show_discarded and "True" or "False" }} />
|
||||
|
Loading…
Reference in New Issue
Block a user