Sha256: ef5871e3d412a45b32b1e1f66a1c8bd2e228a60703805a8e0918456c0d49bf21

Contents?: true

Size: 1.52 KB

Versions: 1

Compression:

Stored size: 1.52 KB

Contents

<script type="text/javascript">
  var serverActivityCountdown = 0
  var serverActivityCountdownInterval = 30 // in seconds

  function serverActivityUpdateMeetingsLoad() {
    $("#bbbrails_server_activity_meetings").load("<%= activity_bigbluebutton_server_path(@server, :update_list => true) %>", serverActivityUpdateMeetingsEnd());
  }

  function serverActivityUpdateMeetingsStart() {
    clearInterval(serverActivityCountdown);
    $(".bbbrails_countdown_value").html("Now...");
    serverActivityUpdateMeetingsLoad();
  }

  function serverActivityUpdateMeetingsEnd() {
    $(".bbbrails_countdown_value").html("Done!");
    serverActivitySetCountdown();
  }

  function serverActivitySetCountdown() {
    var count = serverActivityCountdownInterval;
    serverActivityCountdown = setInterval(function(){
      $(".bbbrails_countdown_value").html(count + " seconds");
      if (count == 0) {
        serverActivityUpdateMeetingsStart();
      }
      count--;
    }, 1000);
  }

  $(document).ready(function(){
    serverActivitySetCountdown();

    $('.bbbrails_countdown a.bbbrails_refresh_now').click(function() {
      serverActivityUpdateMeetingsStart();
      return false;
    });
  });

</script>

<div class="bbbrails_countdown">
  Refreshing in: <span class="bbbrails_countdown_value"></span>
  (<a class="bbbrails_refresh_now" href="<%= activity_bigbluebutton_server_path(@server) %>">refresh now</a>)
</div>

<h1>Server activity monitor:</h1>

<div id="bbbrails_server_activity_meetings">
  <%= render :partial => 'activity_list' %>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bigbluebutton_rails-0.0.5 app/views/bigbluebutton/servers/activity.html.erb