Sha256: a625199ab0ea82bd4b41f95115f6dd5bec871fe96b3cf8077c1fecf21a4ccf66

Contents?: true

Size: 1.5 KB

Versions: 7

Compression:

Stored size: 1.5 KB

Contents

<div class="search">

  <div class="column-block">

    <h1>Configured instances</h1>

    <div id="nodes-table-wrapper">
      <%= render :partial => 'kpm/nodes_info/nodes_table', :locals => {:nodes_info => @nodes_info} %>
    </div>

  </div>

  <div class="column-block">

    <h1><%= link_to 'Install new plugin', plugins_path %></h1>

  </div>

  <div class="column-block">

    <h1>Logs</h1>

    <div id="logs-table-wrapper">
      <%= render :partial => 'kpm/nodes_info/logs_table', :locals => {:logs => @logs} %>
    </div>

  </div>

</div>

<%= javascript_tag do %>
  $(document).ready(function() {
    scheduleRefresh();
  });

  function scheduleRefresh() {
    var timer = setTimeout(refreshAll, 1500);

    // Stop refreshing when user clicks through logs
    $('#logs-table_wrapper a').one('click', function() {
      clearTimeout(timer);
    });

    $('.plugin-link').one('ajax:beforeSend', function() {
      // Disable the refresh
      clearTimeout(timer);

      // Prevent other clicks
      $('.plugin-link').removeAttr('data-remote')
                       .removeAttr('data-method')
                       .removeAttr('href')

      // Spin
      $(this).children().addClass('fa-spin');
    });

    $('.plugin-link').one('ajax:complete', function() {
      // Delay a bit, to give time for the plugin state to change before the next refresh
      setTimeout(refreshAll, 6000);
    });
  }

  function refreshAll() {
    $.ajax({
      url: "<%= nodes_info_index_path(:format => :js) %>"
    });
  }
<% end %>

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
killbill-kpm-ui-1.0.2 app/views/kpm/nodes_info/index.html.erb
killbill-kpm-ui-1.0.1 app/views/kpm/nodes_info/index.html.erb
killbill-kpm-ui-1.0.0 app/views/kpm/nodes_info/index.html.erb
killbill-kpm-0.3.0 app/views/kpm/nodes_info/index.html.erb
killbill-kpm-0.2.0 app/views/kpm/nodes_info/index.html.erb
killbill-kpm-0.1.0 app/views/kpm/nodes_info/index.html.erb
killbill-kpm-0.0.1 app/views/kpm/nodes_info/index.html.erb