This will be used by the review links, which are not linked to a Result.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
static/css/base.css | 4 ++--
www/templates/series-detail.html | 10 ++++++++--
www/views.py | 1 +
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/static/css/base.css b/static/css/base.css
index 545aad1..7fe45e4 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -137,10 +137,10 @@ h1, h2, h3, .h1, .h2, .h3 {
.status-content > .fa {
color: #337ab7;
}
-.status-content.status-failure > .fa {
+.status-content > .fa-warning {
color: #CC0000;
}
-.status-content.status-success > .fa {
+.status-content > .fa-check {
color: #009900;
}
.status-content > div {
diff --git a/www/templates/series-detail.html b/www/templates/series-detail.html
index 52b8f96..cb5d611 100644
--- a/www/templates/series-detail.html
+++ b/www/templates/series-detail.html
@@ -51,13 +51,13 @@
<div class="status">
{% if series.num_patches < series.total_patches %}
-<div class="status-content status-alert">
+<div class="status-content">
<span class="fa fa-lg fa-warning"></span>
<div>Only {{ series.num_patches }} patches received!</div>
</div>
{% endif %}
{% for result in results %}
-<div class="status-content status-{{ result.status }}">
+<div class="status-content">
{% if result.status == "pending" %} <span class="fa fa-lg fa-hourglass"></span>
{% elif result.status == "running" %} <span class="fa fa-lg fa-refresh fa-spin"></span>
{% elif result.status == "failure" %} <span class="fa fa-lg fa-warning"></span>
@@ -65,6 +65,12 @@
<div>{{ result.html }}</div>
</div>
{% endfor %}
+{% for status in series.extra_status %}
+<div class="status-content">
+ {% if status.icon %}<span class="fa fa-lg {{ status.icon }}"></span>{% endif %}
+ <div>{{ status.html }}</div>
+</div>
+{% endfor %}
{% if is_head %}
{% if series.get_diff_stat %}
diff --git a/www/views.py b/www/views.py
index 1259a8e..dd910b1 100644
--- a/www/views.py
+++ b/www/views.py
@@ -52,6 +52,7 @@ def prepare_message(request, project, m, detailed):
})
# hook points for plugins
m.has_other_revisions = False
+ m.extra_status = []
m.extra_ops = []
m.extra_links = []
dispatch_module_hook("prepare_message_hook", request=request, message=m,
--
2.17.1
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel