Sha256: 7d657b34d0c8b9e634f9867d58378bc8276d23cf5ae00ab711fa65c53014df58

Contents?: true

Size: 588 Bytes

Versions: 4

Compression:

Stored size: 588 Bytes

Contents

<% if @task and !@task.finished? %>
<script type="text/javascript">
  function fetchNext(e, bytes, url) {
    $.get(
      url,
      { offset: bytes }
    ).done(function(data) {
      if (data.body != "") {
        e.append(document.createTextNode(data.body));
        bytes = bytes + data.bytes;
      }
      if (data.moreData) {
        setTimeout(function(){fetchNext(e, bytes, url);}, 1000);
      } else {
        $("#progress").text("FINISHED");
      }
    });
  }
  fetchNext($("#out"), <%= @task.body.to_s.bytesize %>, "/json/tasks/<%= @task.id %>/body");
</script>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fluentd-server-0.3.2 views/tasks/ajax.erb
fluentd-server-0.3.1 views/tasks/ajax.erb
fluentd-server-0.3.0 views/tasks/ajax.erb
fluentd-server-0.2.0 views/tasks/ajax.erb