summaryrefslogtreecommitdiffstats
path: root/pharos-dashboard/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pharos-dashboard/templates')
-rw-r--r--pharos-dashboard/templates/dashboard/ci_pods.html26
-rw-r--r--pharos-dashboard/templates/dashboard/dev_pods.html19
-rw-r--r--pharos-dashboard/templates/dashboard/jenkins_slaves.html13
3 files changed, 32 insertions, 26 deletions
diff --git a/pharos-dashboard/templates/dashboard/ci_pods.html b/pharos-dashboard/templates/dashboard/ci_pods.html
index d3e5ff6..2982a6f 100644
--- a/pharos-dashboard/templates/dashboard/ci_pods.html
+++ b/pharos-dashboard/templates/dashboard/ci_pods.html
@@ -1,5 +1,6 @@
{% extends "dashboard/table.html" %}
{% load staticfiles %}
+{% load jenkins_filters %}
{% block table %}
<thead>
@@ -20,23 +21,24 @@
<a target='_blank' href={{ pod.url }}>{{ pod.name }}</a>
</th>
<th>
- <a target='_blank' href={{ pod.slaveurl }}>{{ pod.slavename }}</a>
+ <a target='_blank' href={{ pod.slave.url }}>{{ pod.slave.name }}</a>
</th>
- <th style="background-color:{{ pod.status_color }}">
- {{ pod.status }}
+ <th style="background-color:{{ pod.slave.status | jenkins_status_color }}">
+ {{ pod.slave.status }}
</th>
- <th {{ pod.last_job.blink }}>
- {{ pod.last_job.installer }}
+ <th {{ pod.slave.last_job_result | jenkins_job_blink }}>
+ {{ pod.slave.last_job_installer }}
</th>
- <th {{ pod.last_job.blink }}>
- {{ pod.last_job.scenario }}
+ <th {{ pod.slave.last_job_result | jenkins_job_blink }}>
+ {{ pod.slave.last_job_scenario }}
</th>
- <th {{ pod.last_job.blink }}>
- {{ pod.last_job.branch }}
+ <th {{ pod.slave.last_job_result | jenkins_job_blink }}>
+ {{ pod.slave.last_job_branch }}
</th>
- <th><a {{ pod.last_job.blink }} style="color:{{ pod.last_job.color }}"
- target='_blank'
- href={{ pod.last_job.url }}>{{ pod.last_job.name }}</a>
+ <th><a {{ pod.slave.last_job_result | jenkins_job_blink }}
+ style="color:{{ pod.slave.last_job_result | jenkins_job_color }}"
+ target='_blank'
+ href={{ pod.slave.last_job_url }}>{{ pod.slave.last_job_name }}</a>
</th>
</tr>
{% endfor %}`
diff --git a/pharos-dashboard/templates/dashboard/dev_pods.html b/pharos-dashboard/templates/dashboard/dev_pods.html
index f08e1d1..532a3a1 100644
--- a/pharos-dashboard/templates/dashboard/dev_pods.html
+++ b/pharos-dashboard/templates/dashboard/dev_pods.html
@@ -1,5 +1,6 @@
{% extends "dashboard/table.html" %}
{% load staticfiles %}
+{% load jenkins_filters %}
{% block table %}
<thead>
@@ -14,28 +15,28 @@
</tr>
</thead>
<tbody>
- {% for resource in dev_pods %}
+ {% for pod, booking in dev_pods %}
<tr>
<th>
- <a target='_blank' href={{ resource.url }}>{{ resource.name }}</a>
+ <a target='_blank' href={{ pod.url }}>{{ pod.name }}</a>
</th>
<th>
- <a target='_blank' href={{ resource.slaveurl }}>{{ resource.slavename }}</a>
+ <a target='_blank' href={{ pod.slave.url }}>{{ pod.slave.name }}</a>
</th>
<th>
- {{ resource.current_booking.user.username }}
+ {{ booking.user.username }}
</th>
<th>
- {{ resource.current_booking.end }}
+ {{ booking.end }}
</th>
<th>
- {{ resource.current_booking.purpose }}
+ {{ booking.purpose }}
</th>
- <th style="background-color:{{ resource.status_color }}">
- {{ resource.status }}
+ <th style="background-color:{{ pod.slave.status | jenkins_status_color }}">
+ {{ pod.slave.status }}
</th>
<th>
- <a href="{% url 'booking:create' resource_id=resource.id %}" class="btn btn-primary">
+ <a href="{% url 'booking:create' resource_id=pod.id %}" class="btn btn-primary">
Book
</a>
</th>
diff --git a/pharos-dashboard/templates/dashboard/jenkins_slaves.html b/pharos-dashboard/templates/dashboard/jenkins_slaves.html
index 2d011b4..830ed19 100644
--- a/pharos-dashboard/templates/dashboard/jenkins_slaves.html
+++ b/pharos-dashboard/templates/dashboard/jenkins_slaves.html
@@ -1,6 +1,8 @@
{% extends "dashboard/table.html" %}
{% load staticfiles %}
+{% load jenkins_filters %}
+
{% block table %}
<thead>
<tr>
@@ -13,14 +15,15 @@
{% for slave in slaves %}
<tr>
<th><a target='_blank'
- href={{ slave.slaveurl }}>{{ slave.displayName }}</a>
+ href={{ slave.url }}>{{ slave.name }}</a>
</th>
- <th style="background-color:{{ slave.status_color }}">
+ <th style="background-color:{{ slave.status | jenkins_status_color }}">
{{ slave.status }}
</th>
- <th><a {{ slave.last_job.blink }} style="color:{{ slave.last_job.color }}"
- target="_blank" href={{ slave.last_job.url }}>
- {{ slave.last_job.name }}</a>
+ <th><a {{ slave.last_job_result | jenkins_job_blink }}
+ style="color:{{ slave.last_job_result | jenkins_job_color }}"
+ target="_blank" href={{ slave.last_job_url }}>
+ {{ slave.last_job_name }}</a>
</th>
</tr>
{% endfor %}