Skip to content

Commit

Permalink
Change page reload on ajax request in livepoll mode [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovanton committed Mar 26, 2015
1 parent 087bd03 commit c168362
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
HEAD
-----------

- Change page reload on ajax request in livepoll mode [#2266]
- **Improve ActiveJob integration** - Web UI now shows ActiveJobs in a
nicer format and job logging shows the actual class name [#2248, #2259]
- Add Sidekiq::Process#dump\_threads API to trigger TTIN output [#2247]
Expand Down
12 changes: 12 additions & 0 deletions web/assets/javascripts/application.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions web/views/_poll.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% if current_path != '' %>
<% if params[:poll] %>
<script>
setInterval("window.location.reload(true)", parseInt(localStorage.timeInterval) || 2000);
updatePage('<%= root_path + current_path %>')
</script>
<a id="live-poll" class="btn btn-primary active" href="<%= root_path %><%= current_path %>"><%= t('StopPolling') %></a>
<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>
<a id="live-poll" class="btn btn-primary" href="<%= root_path + current_path %>?<%= qparams(poll: true) %>"><%= t('LivePoll') %></a>
<% end %>
<% end %>

0 comments on commit c168362

Please sign in to comment.