[Patchew-devel] [PATCH 4/4] www: remove extra_status from series detail view, simplify in project detail

Paolo Bonzini pbonzini at redhat.com
Mon Apr 23 08:14:15 UTC 2018


Most of the functionality is not used anymore after conversion to Results.

Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>
---
 mods/testing.py                   | 2 +-
 static/css/base.css               | 2 --
 www/templates/project-detail.html | 5 +----
 www/templates/series-detail.html  | 9 ---------
 www/views.py                      | 1 -
 5 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/mods/testing.py b/mods/testing.py
index 8dc4d0a..83b3914 100644
--- a/mods/testing.py
+++ b/mods/testing.py
@@ -330,7 +330,7 @@ class TestingModule(PatchewModule):
         if not at:
             return
         project.extra_status.append({
-            "kind": "running",
+            "icon": "fa-refresh fa-spin",
             "html":  "Active testers: " + ", ".join(at)
         })
 
diff --git a/static/css/base.css b/static/css/base.css
index 35fba6e..545aad1 100644
--- a/static/css/base.css
+++ b/static/css/base.css
@@ -137,11 +137,9 @@ h1, h2, h3, .h1, .h2, .h3 {
 .status-content > .fa {
     color: #337ab7;
 }
-.status-content.status-alert > .fa,
 .status-content.status-failure > .fa {
     color: #CC0000;
 }
-.status-content.status-good > .fa,
 .status-content.status-success > .fa {
     color: #009900;
 }
diff --git a/www/templates/project-detail.html b/www/templates/project-detail.html
index aaccdc0..35ee845 100644
--- a/www/templates/project-detail.html
+++ b/www/templates/project-detail.html
@@ -52,10 +52,7 @@
 {% endfor %}
 {% for status in project.extra_status %}
  <div class="status-content{% if status.kind %} status-{{ status.kind }}{% endif %}">
- {% if status.icon %}<span class="fa fa-lg fa-{{ status.icon }}"></span>
- {% elif status.kind == "running" %} <span class="fa fa-lg fa-refresh fa-spin"></span>
- {% elif status.kind == "alert" %} <span class="fa fa-lg fa-warning"></span>
- {% elif status.kind == "good" %} <span class="fa fa-lg fa-check"></span>{% endif %}
+ {% if status.icon %}<span class="fa fa-lg {{ status.icon }}"></span>{% endif %}
  <div>{{ status.html }}</div>
 </div>
 {% endfor %}
diff --git a/www/templates/series-detail.html b/www/templates/series-detail.html
index 9b2db1c..52b8f96 100644
--- a/www/templates/series-detail.html
+++ b/www/templates/series-detail.html
@@ -65,15 +65,6 @@
  <div>{{ result.html }}</div>
 </div>
 {% endfor %}
-{% for status in series.extra_status %}
- <div class="status-content{% if status.kind %} status-{{ status.kind }}{% endif %}">
- {% if status.icon %}<span class="fa fa-lg fa-{{ status.icon }}"></span>
- {% elif status.kind == "running" %} <span class="fa fa-lg fa-refresh fa-spin"></span>
- {% elif status.kind == "alert" %} <span class="fa fa-lg fa-warning"></span>
- {% elif status.kind == "good" %} <span class="fa fa-lg fa-check"></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 b0ccf48..7816024 100644
--- a/www/views.py
+++ b/www/views.py
@@ -52,7 +52,6 @@ def prepare_message(request, 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.0




More information about the Patchew-devel mailing list