diff mbox

[Branch,~linaro-validation/lava-scheduler/trunk] Rev 81: Make other references to the test device in the scheduler link to the details page for that device

Message ID 20111004230615.13988.91104.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson Oct. 4, 2011, 11:06 p.m. UTC
Merge authors:
  Paul Larson (pwlars)
  Paul Larson <paul.larson@linaro.org>
Related merge proposals:
  https://code.launchpad.net/~pwlars/lava-scheduler/fix-device-links-863757/+merge/77779
  proposed by: Paul Larson (pwlars)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 81 [merge]
committer: Paul Larson <paul.larson@linaro.org>
branch nick: lava-scheduler
timestamp: Tue 2011-10-04 18:04:50 -0500
message:
  Make other references to the test device in the scheduler link to the details page for that device
modified:
  lava_scheduler_app/templates/lava_scheduler_app/alljobs.html
  lava_scheduler_app/templates/lava_scheduler_app/index.html


--
lp:lava-scheduler
https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk

You are subscribed to branch lp:lava-scheduler.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/alljobs.html'
--- lava_scheduler_app/templates/lava_scheduler_app/alljobs.html	2011-08-30 04:49:17 +0000
+++ lava_scheduler_app/templates/lava_scheduler_app/alljobs.html	2011-10-04 22:58:15 +0000
@@ -24,7 +24,15 @@ 
     <tr>
       <td><a href="{% url lava_scheduler_app.views.job pk=job.pk %}">{{ job.id }}</a></td>
       <td>{{ job.get_status_display }}</td>
-      <td>{{ job.actual_device|default:'' }}</td>
+      {% if job.actual_device.pk %}
+      <td><a href="{% url lava_scheduler_app.views.device pk=job.actual_device.pk %}">
+          {{ job.actual_device }}</a></td>
+      {% else %}{% if job.requested_device.pk %}
+      <td><a href="{% url lava_scheduler_app.views.device pk=job.requested_device.pk %}">
+          <i>{{ job.requested_device }}</i></a></td>
+      {% else %}
+      <td><i>{{ job.requested_device_type|default:'' }}</i></td>
+      {% endif %}{% endif %}
       <td>{{ job.submitter }}</td>
       <td>{{ job.submit_time }}</td>
     </tr>

=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/index.html'
--- lava_scheduler_app/templates/lava_scheduler_app/index.html	2011-08-30 04:49:17 +0000
+++ lava_scheduler_app/templates/lava_scheduler_app/index.html	2011-10-04 22:58:15 +0000
@@ -43,7 +43,15 @@ 
     <tr>
       <td><a href="{% url lava_scheduler_app.views.job pk=job.pk %}">{{ job.id }}</a></td>
       <td>{{ job.get_status_display }}</td>
-      <td>{{ job.actual_device|default:'' }}</td>
+      {% if job.actual_device.pk %}
+      <td><a href="{% url lava_scheduler_app.views.device pk=job.actual_device.pk %}">
+          {{ job.actual_device }}</a></td>
+      {% else %}{% if job.requested_device.pk %}
+      <td><a href="{% url lava_scheduler_app.views.device pk=job.requested_device.pk %}">
+          <i>{{ job.requested_device }}</i></a></td>
+      {% else %}
+      <td><i>{{ job.requested_device_type|default:'' }}</i></td>
+      {% endif %}{% endif %}
       <td>{{ job.submitter }}</td>
       <td>{{ job.submit_time }}</td>
     </tr>