Skip to content

Commit

Permalink
mark failed gating tests on update list
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Verga <[email protected]>
  • Loading branch information
mattiaverga committed Feb 9, 2025
1 parent a305571 commit 105b115
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
1 change: 0 additions & 1 deletion bodhi-server/bodhi/server/templates/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
%>
<%inherit file="${inherit(context)}"/>

<%namespace name="util" module="bodhi.server.util"/>
<%namespace name="fragments" file="fragments.html"/>


Expand Down
11 changes: 9 additions & 2 deletions bodhi-server/bodhi/server/templates/fragments.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,15 @@
<div class="row align-items-center no-gutters">
<div class="col-md mb-1 mb-md-0">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
${util.type2icon(update['type'])|n}
<div class="flex-column flex-shrink-0">
<div>${util.type2icon(update['type'])|n}</div>
%if update.test_gating_status is not None and update.test_gating_status.value == 'failed':
<div>
<span data-toggle="tooltip" aria-label="This update failed gating tests" data-bs-original-title="This update failed gating tests">
<i class="fa fa-fw fa-heartbeat text-danger"></i>
</span>
</div>
%endif
</div>
<div class="flex-grow-1 ms-2">
<div class="fw-bold">
Expand Down
2 changes: 0 additions & 2 deletions bodhi-server/bodhi/server/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<%inherit file="master.html"/>
<%namespace name="util" module="bodhi.server.util"/>


% if not request.identity:
<div class="subheader py-5 mb-2">
Expand Down
15 changes: 7 additions & 8 deletions bodhi-server/bodhi/server/templates/override.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<%namespace name="util" module="bodhi.server.util"/>
<%inherit file="master.html"/>

<%block name="css">
Expand Down Expand Up @@ -85,12 +84,12 @@ <h5 class="fw-bold d-flex align-items-center">
<div class="form-group">
%if override is not UNDEFINED:
<a href="${request.route_url('user', name=override.submitter.name)}">
<img src="${util.avatar(override.submitter.name, override.submitter.email, size=24)}" alt="User Icon"/>
<img src="${self.util.avatar(override.submitter.name, override.submitter.email, size=24)}" alt="User Icon"/>
${override.submitter.name}
</a>
%else:
<a href="${request.route_url('user', name=request.identity.name)}">
<img src="${util.avatar(request.identity.name, override.submitter.email, size=24)}" alt="User Icon"/>
<img src="${self.util.avatar(request.identity.name, override.submitter.email, size=24)}" alt="User Icon"/>
${request.identity.name}
</a>
%endif
Expand All @@ -103,9 +102,9 @@ <h5 class="fw-bold d-flex align-items-center">
Expiration date
%if override:
% if override['expired_date'] is None:
<span class='col-xs-auto pe-2 ms-auto text-success'><small>still active for <strong>${util.age(override['expiration_date'], True)}</strong></small></span>
<span class='col-xs-auto pe-2 ms-auto text-success'><small>still active for <strong>${self.util.age(override['expiration_date'], True)}</strong></small></span>
% else:
<span class='col-xs-auto pe-2 ms-auto text-danger'><small>expired <strong>${util.age(override['expired_date'])}</strong></small></span>
<span class='col-xs-auto pe-2 ms-auto text-danger'><small>expired <strong>${self.util.age(override['expired_date'])}</strong></small></span>
% endif
% endif
</h5>
Expand Down Expand Up @@ -187,7 +186,7 @@ <h5 class="fw-bold d-flex align-items-center">
</h5>
<div>
<a href="${request.route_url('user', name=override.submitter.name)}">
<img src="${util.avatar(override.submitter.name, override.submitter.email, size=24)}" alt="User Icon"/>
<img src="${self.util.avatar(override.submitter.name, override.submitter.email, size=24)}" alt="User Icon"/>
${override.submitter.name}
</a>
</div>
Expand All @@ -198,9 +197,9 @@ <h5 class="fw-bold d-flex align-items-center">
Expiration date
%if override:
% if override['expired_date'] is None:
<span class='col-xs-auto pe-2 ms-auto text-success'><small>still active for <strong>${util.age(override['expiration_date'], True)}</strong></small></span>
<span class='col-xs-auto pe-2 ms-auto text-success'><small>still active for <strong>${self.util.age(override['expiration_date'], True)}</strong></small></span>
% else:
<span class='col-xs-auto pe-2 ms-auto text-danger'><small>expired <strong>${util.age(override['expired_date'])}</strong></small></span>
<span class='col-xs-auto pe-2 ms-auto text-danger'><small>expired <strong>${self.util.age(override['expired_date'])}</strong></small></span>
% endif
% endif
</h5>
Expand Down
4 changes: 1 addition & 3 deletions bodhi-server/bodhi/server/templates/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from bodhi.server import models

from bodhi.server.config import config

install_command = update.install_command
%>

Expand Down Expand Up @@ -42,7 +40,7 @@
actions['unpush'] = True
if update.meets_testing_requirements and not update.request:
actions['push to stable'] = True
elif can_edit and update.status.value == 'testing' and update.test_gating_status.value == 'failed':
elif can_edit and update.status.value == 'testing' and update.test_gating_status == models.TestGatingStatus.failed:
actions['unpush'] = True
%>
<div class="subheader pt-3">
Expand Down
1 change: 1 addition & 0 deletions news/PR5852.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bodhi-server: Updates which fail gating tests are now marked by an icon in the update list view

0 comments on commit 105b115

Please sign in to comment.