Sha256: 13fd0e9c5f80c459d45a3bebc6f36e7fe52b837258708e6a5b016cbd721e5d29
Contents?: true
Size: 707 Bytes
Versions: 3
Compression:
Stored size: 707 Bytes
Contents
<div id="logs"> <h3><%= @logfile %></h3> <div class="data"></div> </div> <script type="text/javascript"> function loadLogs(force) { $("#logs .data").load("logs/data", function() { var elem = $(this)[0] // track the bottom of the logs, unless we've scrolled away if(force || (elem.scrollHeight - elem.scrollTop - elem.clientHeight < 100)) { $(this).animate({scrollTop: elem.scrollHeight}, 500); } // use timeout instead of an interval so that in case of network error // we don't end up with a queue of requests stacked up. setTimeout(function(){loadLogs}, 5000); }); } $(document).ready(function() { loadLogs(true); }); </script>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppetfactory-0.6.2 | views/logs.erb |
puppetfactory-0.6.1 | views/logs.erb |
puppetfactory-0.6.0 | views/logs.erb |