Skip to content

Commit

Permalink
Update templates for the Stats page on 'log_categories'
Browse files Browse the repository at this point in the history
  • Loading branch information
my8100 committed Jun 20, 2019
1 parent ed636ce commit 9a161c8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
16 changes: 12 additions & 4 deletions scrapydweb/templates/scrapydweb/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h3>PROJECT ({{ project }}), SPIDER ({{ spider }})</h3>
N/A
{% else %}
<strong class="{% if pages %}green{% else %}red{% endif %}">{{ pages }}</strong>
{% endif %}
{% endif %}
</td>
</tr>
<tr>
Expand All @@ -95,7 +95,7 @@ <h3>PROJECT ({{ project }}), SPIDER ({{ spider }})</h3>
N/A
{% else %}
<strong class="{% if items %}green{% else %}red{% endif %}">{{ items }}</strong>
{% endif %}
{% endif %}
</td>
</tr>
<tr><th>shutdown_reason</th><td id="shutdown_reason">{{ shutdown_reason }}</td></tr>
Expand Down Expand Up @@ -128,7 +128,11 @@ <h3 style="color: red;">WARNING+</h3>
<div class="title">
<h4>
<div style="width: 200px; display: inline-block;">{{ title }}</div>
{{ log_categories[title]['count'] }} in total
{% if log_categories[title]['details']|length < log_categories[title]['count'] %}
last {{ log_categories[title]['details']|length }} of {{ log_categories[title]['count'] }}
{% else %}
{{ log_categories[title]['count'] }} in total
{% endif %}
</h4>
<i class="iconfont icon-right"></i>
</div>
Expand All @@ -153,7 +157,11 @@ <h3 style="color: orange;">INFO</h3>
<div class="title">
<h4>
<div style="width: 200px; display: inline-block;">{{ title }}</div>
{{ log_categories[title]['count'] }} in total
{% if log_categories[title]['details']|length < log_categories[title]['count'] %}
last {{ log_categories[title]['details']|length }} of {{ log_categories[title]['count'] }}
{% else %}
{{ log_categories[title]['count'] }} in total
{% endif %}
</h4>
<i class="iconfont icon-right"></i>
</div>
Expand Down
12 changes: 10 additions & 2 deletions scrapydweb/templates/scrapydweb/stats_mobileui.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ <h3 style="color: red;">WARNING+</h3>
<div class="title">
<h4>
<div style="width: 200px; display: inline-block;">{{ title }}</div>
{{ log_categories[title]['count'] }} in total
{% if log_categories[title]['details']|length < log_categories[title]['count'] %}
last {{ log_categories[title]['details']|length }} of {{ log_categories[title]['count'] }}
{% else %}
{{ log_categories[title]['count'] }} in total
{% endif %}
</h4>
<i class="iconfont icon-right"></i>
</div>
Expand All @@ -160,7 +164,11 @@ <h3 style="color: orange;">INFO</h3>
<div class="title">
<h4>
<div style="width: 200px; display: inline-block;">{{ title }}</div>
{{ log_categories[title]['count'] }} in total
{% if log_categories[title]['details']|length < log_categories[title]['count'] %}
last {{ log_categories[title]['details']|length }} of {{ log_categories[title]['count'] }}
{% else %}
{{ log_categories[title]['count'] }} in total
{% endif %}
</h4>
<i class="iconfont icon-right"></i>
</div>
Expand Down

0 comments on commit 9a161c8

Please sign in to comment.