Skip to content

Commit b1be0a8

Browse files
authoredApr 26, 2024
landing-preview: add a shim to display blockers dryrun info if available (Bug 1888188) (#198)
As part of the checks refactor we will eventually support displaying multiple blockers in the front end. Add a shim so Lando-UI can handle output from before and after the refactor PR in LandoAPI is landed and deployed.
1 parent fd16176 commit b1be0a8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎landoui/templates/stack/partials/landing-preview.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ <h3 class="StackPage-landingPreview-sectionLabel">Landing is Blocked</h3>
99
<div class="StackPage-landingPreview-section StackPage-landingPreview-blocker">
1010
Reason for blockage is unknown
1111
</div>
12-
{% elif dryrun['blocker'] %}
12+
{% elif dryrun['blocker'] or dryrun['blockers'] %}
13+
{% set blocker = dryrun['blockers'][0] if 'blockers' in dryrun else dryrun['blocker'] %}
1314
<h3 class="StackPage-landingPreview-sectionLabel">Landing is Blocked</h3>
1415
<div class="StackPage-landingPreview-section StackPage-landingPreview-blocker">
15-
{{ dryrun['blocker']|escape_html|linkify_faq|safe }}
16+
{{ blocker|escape_html|linkify_faq|safe }}
1617
</div>
1718
{% elif series %}
1819
<h3 class="StackPage-landingPreview-sectionLabel">

‎landoui/templates/stack/partials/revision-status.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
#}
66

7-
{% if revision['blocked_reason'] %}
7+
{% if revision['blocked_reasons'] or revision['blocked_reason'] %}
8+
{% set blocked_reason = revision['blocked_reasons'][0] if 'blocked_reasons' in revision else revision['blocked_reason']%}
89
<div class="StackPage-blockerReason">
910
<div class="Badge Badge--negative">
1011
Blocked

0 commit comments

Comments
 (0)
Failed to load comments.