mirror of
https://github.com/status-im/cabot.git
synced 2025-02-24 10:28:06 +00:00
Add link to jenkins job from service-checks dashboard
This commit is contained in:
parent
0918e82b65
commit
a2ca3f918e
0
app/cabotapp/templatetags/__init__.py
Normal file
0
app/cabotapp/templatetags/__init__.py
Normal file
9
app/cabotapp/templatetags/extra.py
Normal file
9
app/cabotapp/templatetags/extra.py
Normal file
@ -0,0 +1,9 @@
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def jenkins_human_url(jobname):
|
||||
return '{}job/{}/'.format(settings.JENKINS_API, jobname)
|
@ -1,3 +1,5 @@
|
||||
{% load extra %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="col-xs-1"><h3><i class="{% if checks_type == "All" %}fa fa-cog{% else %}glyphicon glyphicon-{% if checks_type == "Http" %}arrow-up{% elif checks_type == "Jenkins" %}ok{% else %}signal{% endif %}{% endif %}"></i></h3></div>
|
||||
@ -91,6 +93,11 @@
|
||||
<a class="btn btn-xs" href="{% url run-check pk=check.id %}">
|
||||
<i class="glyphicon glyphicon-refresh"></i><span class="break"></span>
|
||||
</a>
|
||||
{% if checks_type == "Jenkins" %}
|
||||
<a class="btn btn-xs" href="{% jenkins_human_url check.name %}">
|
||||
<i class="glyphicon glyphicon-link"></i><span class="break"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user