[SCM] live-studio branch, master, updated. be51da814fb12d25dce46a7f078a46f5c89bd777
Chris Lamb
lamby at debian.org
Fri Jul 30 02:52:36 UTC 2010
The following commit has been merged in the master branch:
commit c355f090cf169ccd1c4294acc3950d35bb996729
Author: Chris Lamb <lamby at debian.org>
Date: Thu Jul 29 16:56:40 2010 -0400
Show the status of builds.
Signed-off-by: Chris Lamb <lamby at debian.org>
diff --git a/live_studio/build/models.py b/live_studio/build/models.py
index 08a4d62..c8f30ce 100644
--- a/live_studio/build/models.py
+++ b/live_studio/build/models.py
@@ -20,3 +20,12 @@ class Build(models.Model):
class Meta:
ordering = ('-enqueued',)
+
+ def status(self):
+ if self.filename:
+ return 'success'
+ if self.finished:
+ return 'failure'
+ if self.started:
+ return 'building'
+ return 'waiting'
diff --git a/templates/config/view.html b/templates/config/view.html
index ca513ea..e1a2361 100644
--- a/templates/config/view.html
+++ b/templates/config/view.html
@@ -10,6 +10,38 @@
<input type="submit" value="Build">
</form>
+<table cellpadding="5">
+<tr>
+ <th>#</th>
+ <th>Enqueued</th>
+ <th>Status</th>
+</tr>
+{% for build in config.builds.all %}
+<tr>
+ <td>{{ build.pk }}</td>
+ <td>{{ build.enqueued|timesince }} ago</td>
+ <td>
+ {% if build.status == "waiting"%}
+ <em>Waiting for builder to become available..</em>
+ {% endif %}
+
+ {% if build.status == "building"%}
+ <em>Building...</em> ({{ build.started|timesince }})
+ {% endif %}
+
+ {% if build.status == "failure"%}
+ <strong>Build failed!</strong>
+ {% endif %}
+
+ {% if build.status == "success"%}
+ <strong>Finished.</strong>
+ {% endif %}
+
+ </td>
+</tr>
+{% endfor %}
+</table>
+
<p><a href="{% url config:edit config.pk %}">Edit</a></p>
<dl>
--
live-studio
More information about the debian-live-changes
mailing list