Skip to content

Commit 5da9a77

Browse files
committed
Add top navigation button to pipeline dashboard
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent a5c4c1d commit 5da9a77

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

vulnerabilities/forms.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ class VulnerabilitySearchForm(forms.Form):
3838
class ApiUserCreationForm(forms.ModelForm):
3939
"""Support a simplified creation for API-only users directly from the UI."""
4040

41-
captcha = AltchaField(floating=True)
41+
captcha = AltchaField(
42+
floating=True,
43+
hidefooter=True,
44+
hidelogo=True,
45+
)
4246

4347
class Meta:
4448
model = ApiUser
@@ -97,4 +101,8 @@ class PipelineSchedulePackageForm(forms.Form):
97101

98102

99103
class AdminLoginForm(AdminAuthenticationForm):
100-
captcha = AltchaField(floating=True)
104+
captcha = AltchaField(
105+
floating=True,
106+
hidefooter=True,
107+
hidelogo=True,
108+
)

vulnerabilities/templates/pipeline_run_details.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@
3434
{% endblock %}
3535

3636
{% block content %}
37-
<section class="section">
3837
<div class="container">
38+
<a href="{% url 'runs-list' pipeline_id=run.pipeline.pipeline_id %}" class="button is-info my-4">
39+
<i class="fa fa-arrow-left mr-2"></i>Back to All Runs
40+
</a>
3941
<h1 class="title">{{ pipeline_name }} Run Log</h1>
4042
<hr>
4143

@@ -181,12 +183,12 @@ <h2 class="subtitle mb-2">Log Output</h2>
181183
</div>
182184
</div>
183185
{% endif %}
184-
185-
<a href="{% url 'runs-list' pipeline_id=run.pipeline.pipeline_id %}" class="button is-info mt-4">
186-
<i class="fa fa-arrow-left mr-2"></i>Back to All Runs
187-
</a>
186+
{% if run.run_output or run.log %}
187+
<a href="{% url 'runs-list' pipeline_id=run.pipeline.pipeline_id %}" class="button is-info my-4">
188+
<i class="fa fa-arrow-left mr-2"></i>Back to All Runs
189+
</a>
190+
{% endif %}
188191
</div>
189-
</section>
190192
{% endblock %}
191193

192194

vulnerabilities/templates/pipeline_run_list.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
</div>
3535

3636
<div class="column is-four-fifths">
37+
<a href="{% url 'dashboard' %}" class="button is-info mb-4"><i class="fa fa-arrow-left mr-2"></i>Back to Dashboard</a>
3738
<div class="content is-normal">
3839
<h1>{{ pipeline_name }} Runs</h1>
3940
<hr />
@@ -109,7 +110,9 @@ <h1>{{ pipeline_name }} Runs</h1>
109110
{% endfor %}
110111
</tbody>
111112
</table>
112-
<a href="{% url 'dashboard' %}" class="button is-info mt-4"><i class="fa fa-arrow-left mr-2"></i>Back to Dashboard</a>
113+
{% if run_list|length > 10 %}
114+
<a href="{% url 'dashboard' %}" class="button is-info mt-4"><i class="fa fa-arrow-left mr-2"></i>Back to Dashboard</a>
115+
{% endif %}
113116
</div>
114117
{% if is_paginated %}
115118
<nav class="pagination is-centered px-5" role="navigation" aria-label="pagination">

0 commit comments

Comments
 (0)