=== modified file 'fake-dispatcher'
@@ -2,7 +2,7 @@
echo starting processing $1
echo error >&2
for i in `seq 30`; do
-sleep 1
+sleep 2
echo $i
cat $1
echo
=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/job.html'
@@ -67,10 +67,8 @@
<li><a href="#tab-output">Output</a></li>
{% endif %}
</ul>
- <div id="tab-definition">
- <pre>
-{{ job.definition }}
- </pre>
+ <div id="tab-definition" >
+ <pre style="overflow: auto;">{{ job.definition }}</pre>
</div>
{% if log_file_present %}
<div id="tab-output">
@@ -105,23 +103,25 @@
global: false,
success: function (data, success, xhr) {
var node = $("<pre></pre>");
- node.text(data);
- var progressNode = $('#tab-output img');
- var scrollDiv = progressNode.closest('div');
- var atBottom = scrollDiv.attr('offsetHeight') + scrollDiv.attr('scrollTop') >= scrollDiv.attr('scrollHeight') && scrollDiv.attr('offsetHeight') > progressNode.attr('offsetHeight');
- var skipped = xhr.getResponseHeader('X-Skipped-Bytes');
- if (skipped) {
- var notice = $('<code class="skip">... skipped ' + skipped + ' bytes (<a href="#">load</a>) ...</code>');
- var curLength = logLenth;
- $('a', notice).click(function (e) {
- e.preventDefault();
- loadExtra(notice, curLength, skipped);
- });
- notice.insertBefore(progressNode);
- }
- node.insertBefore(progressNode);
- if (atBottom) {
- scrollDiv.attr('scrollTop', scrollDiv.attr('scrollHeight'))
+ if (data.length > 0) {
+ node.text(data);
+ var progressNode = $('#tab-output img');
+ var scrollDiv = progressNode.closest('div');
+ var atBottom = scrollDiv.attr('offsetHeight') + scrollDiv.attr('scrollTop') >= scrollDiv.attr('scrollHeight') && scrollDiv.attr('offsetHeight') > progressNode.attr('offsetHeight');
+ var skipped = xhr.getResponseHeader('X-Skipped-Bytes');
+ if (skipped) {
+ var notice = $('<code class="skip">... skipped ' + skipped + ' bytes (<a href="#">load</a>) ...</code>');
+ var curLength = logLenth;
+ $('a', notice).click(function (e) {
+ e.preventDefault();
+ loadExtra(notice, curLength, skipped);
+ });
+ notice.insertBefore(progressNode);
+ }
+ node.insertBefore(progressNode);
+ if (atBottom) {
+ scrollDiv.attr('scrollTop', scrollDiv.attr('scrollHeight'))
+ }
}
logLenth = xhr.getResponseHeader('X-Current-Size');
if (xhr.getResponseHeader('X-Is-Finished')) {