1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/web/views/_poll.erb
2014-08-02 00:36:37 +00:00

10 lines
478 B
Text

<% if current_path != '' %>
<% if params[:poll] %>
<script>
setInterval("window.location.reload(true)", parseInt(localStorage.timeInterval) || 2000);
</script>
<a id="live-poll" class="btn btn-primary active" href="<%= root_path %><%= current_path %>"><%= t('StopPolling') %></a>
<% else %>
<a id="live-poll" class="btn btn-primary" href="<%= root_path %><%= current_path %>?<%= qparams(poll: true) %>"><%= t('LivePoll') %></a>
<% end %>
<% end %>