Sha256: 43d1d56468c2abe7bc035189e7af3bb208cdfa1f7bb67a18ce284adce922bed7

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

<div class="ui pointing menu">
  <div class="header item">
    Overview
  </div>
</div>
<div class="ui grid">
  <% @groups.each do |_, group| %>
    <div class="sixteen wide row">
      <div class="sixteen wide column">
        <h3 class="ui dividing header" style="margin-bottom: 10px;">
          <%= group.name %>
        </h3>
      </div>
      <%= render partial: "card", collection: group.databases, as: :database, locals: {partial: 'card_loading_content', lazy: true} %>
    </div>
  <% end %>
</div>
<script>

  document.addEventListener("DOMContentLoaded", function(event) {
    // First
    $("[id^='segment_href']").each(function(idx, el) {
      $.get($(el).data('href'));
    });
    // Refresh every minutes
    setInterval(function (){
      $("[id^='segment_href']").each(function(idx, el) {
        var el = $(el)
        var id = el.attr('id');
        var href = el.data('href');
        var refreshed_id = id.replace('href', 'refreshed_span');
        var refreshed_div = document.getElementById(refreshed_id);
        if (refreshed_div) {
          refreshed_div.innerHTML = 'Refreshing...';
          $.get(href, function(data) {
            refreshed_div.innerHTML = 'Last refresh: ' + new Date().toTimeString();
          });
        }
      });
    }, 60 * 1000)
  });


</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pgbouncerhero-2.0.0 app/views/pg_bouncer_hero/home/index.html.erb
pgbouncerhero-1.0.3 app/views/pg_bouncer_hero/home/index.html.erb