[SCM] live-studio branch, master, updated. 72a6b817eb3a9bf32b9ffb966b5dd258b50f5141

Chris Lamb lamby at debian.org
Sun Aug 1 04:52:04 UTC 2010


The following commit has been merged in the master branch:
commit 72a6b817eb3a9bf32b9ffb966b5dd258b50f5141
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Aug 1 00:50:37 2010 -0400

    Proof of concept for shiny automatic scrolling log

diff --git a/htdocs/media/js/live-studio.js b/htdocs/media/js/live-studio.js
index e69de29..5950275 100644
--- a/htdocs/media/js/live-studio.js
+++ b/htdocs/media/js/live-studio.js
@@ -0,0 +1,13 @@
+$(function() {
+  var elem = $('#scrolling_log');
+
+  if (elem.length == 0) {
+    return;
+  }
+
+  window.setInterval(function () {
+    $('pre', elem).load(elem.attr('data-url'));
+
+    elem.attr({scrollTop: elem.attr("scrollHeight") });
+  }, 1000);
+});
diff --git a/templates/config/view.html b/templates/config/view.html
index ce10a56..ef4a6b1 100644
--- a/templates/config/view.html
+++ b/templates/config/view.html
@@ -51,6 +51,11 @@
 
   </td>
 </tr>
+{% if forloop.counter == 1 and build.status == 'building' %}
+<tr>
+<td colspan="3"><div data-url="{{ build.log_url }}" id="scrolling_log" style="background-color: black; color: white; font-family: monospace; padding: 1em; width: 800px; height: 200px; overflow: scroll;"><pre></pre></td>
+</tr>
+{% endif %}
 {% endfor %}
 </table>
 {% endif %}

-- 
live-studio



More information about the debian-live-changes mailing list