=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/alljobs.html'
@@ -22,7 +22,7 @@
<tbody>
{% for job in jobs %}
<tr>
- <td>{{ job.id }}</td>
+ <td><a href="{% url lava_scheduler_app.views.job pk=job.pk %}">{{ job.id }}</a></td>
<td>{{ job.get_status_display }}</td>
<td>{{ job.target }}</td>
<td>{{ job.submitter }}</td>
@@ -36,8 +36,11 @@
$(document).ready(
function() {
$("table.data").dataTable({
- "bJQueryUI": true
- })
+ "bJQueryUI": true,
+ "aoColumnDefs": [
+ { "sType": "numeric", "aTargets": [ "id" ] }
+ ]
+ });
}
);
</script>
=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/index.html'
@@ -27,7 +27,7 @@
<table class="data display">
<thead>
<tr>
- <th>ID</th>
+ <th class="id">ID</th>
<th>Status</th>
<th>Target</th>
<th>Submitter</th>
@@ -37,7 +37,7 @@
<tbody>
{% for job in jobs %}
<tr>
- <td>{{ job.id }}</td>
+ <td><a href="{% url lava_scheduler_app.views.job pk=job.pk %}">{{ job.id }}</a></td>
<td>{{ job.get_status_display }}</td>
<td>{{ job.target }}</td>
<td>{{ job.submitter }}</td>
@@ -53,8 +53,11 @@
$(document).ready(
function() {
$("table.data").dataTable({
- "bJQueryUI": true
- })
+ "bJQueryUI": true,
+ "aoColumnDefs": [
+ { "sType": "numeric", "aTargets": [ "id" ] }
+ ]
+ });
}
);
</script>
=== added file 'lava_scheduler_app/templates/lava_scheduler_app/job.html'
@@ -0,0 +1,69 @@
+{% extends "lava_scheduler_app/_content.html" %}
+
+{% block extrahead %}
+{{ block.super }}
+<style type="text/css">
+.column {
+ position: relative;
+ float: left;
+ padding-right: 2em;
+ padding-bottom: 1em;
+}
+</style>
+{% endblock %}
+
+{% block content %}
+<h2>Job {{ job.pk }}</h2>
+
+<div id="columns">
+ <div class="column">
+ <dt>Submitted by:</dt>
+ <dd>{{ job.submitter }}</dd>
+
+ <dt>Targeted to:</dt>
+ <dd>{{ job.target }}</dd>
+
+ <dt>Requested type:</dt>
+ <dd>{{ job.device_type }}</dd>
+ </div>
+
+ <div class="column">
+ <dt>Status:</dt>
+ <dd><b>{{ job.get_status_display }}</b></dd>
+ </div>
+
+ <div class="column">
+ <dt>Submitted at:</dt>
+ <dd>{{ job.submit_time }}</dd>
+
+ <dt>Started at:</dt>
+ <dd>{{ job.start_time|default:"not started" }}</dd>
+
+ <dt>Finished at:</dt>
+ <dd>{{ job.end_time|default:"not finished" }}</dd>
+ </div>
+ <div style="clear: both"></div>
+</div>
+
+<div id="tabs">
+ <ul>
+ <li><a href="#tab-definition">Job Definition</a></li>
+ </ul>
+ <div id="tab-definition">
+ <pre>
+{{ job.definition }}
+ </pre>
+ </div>
+ <!-- Log viewing will go here, when it's possible -->
+</div>
+
+<script>
+$(document).ready(
+ function() {
+ $("#tabs").tabs({
+ });
+ }
+);
+</script>
+
+{% endblock %}
=== modified file 'lava_scheduler_app/urls.py'
@@ -4,4 +4,5 @@
'lava_scheduler_app.views',
url(r'^$', 'index'),
url(r'^alljobs$', 'alljobs'),
+ url(r'^job/(?P<pk>[0-9]+)$', 'job'),
)
=== modified file 'lava_scheduler_app/views.py'
@@ -21,3 +21,12 @@
'jobs': TestJob.objects.all(),
},
RequestContext(request))
+
+
+def job(request, pk):
+ return render_to_response(
+ "lava_scheduler_app/job.html",
+ {
+ 'job': TestJob.objects.get(pk=pk),
+ },
+ RequestContext(request))