Sha256: f74727cd3d96e54d48030ac356729757c12b0710e28ec9ce22b2aad69c7b5172

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

<%= File.read(File.join(File.dirname(__FILE__), 'views', 'assets', 'styles.css')) %>

<header class="row">
  <div class="col-md-5">
    <h3>Active Locks</h3>
  </div>
</header>

<div class="container">
  <div class="row">
    <%= erb File.read(File.join(File.dirname(__FILE__), 'views', '_home_nav.erb')) %>

    <div class="col-md-9">
      <% if @locks.length > 0 %>
      <table class="table table-striped table-bordered table-white" style="width: 100%; margin: 0; table-layout:fixed;">
        <thead>
          <th style="width: 20%">Key</th>
          <th style="width: 30%">Owner Node</th>
          <th style="width: 10%">Timetamp</th>
          <th style="width: 10%">TTL</th>
          <th style="width: 10%">Actions</th>
        </thead>

        <% @locks.each do |meta| %>
        <% pttl = meta.pttl %>

        <tr>
          <td><%= meta.key %></td>
          <td><%= meta.owner %></td>
          <td><%= meta.timestamp.to_i %></td>
          <td>
            <%= pttl / 1000 %> s
          </td>
            <td>
              <form action="<%= "#{root_path}sidetiq/#{meta.key}/unlock" %>" method="post">
                <input class="btn btn-danger btn-small" type="submit" name="trigger" value="Unlock" data-confirm="Are you sure you want remove this lock?" />
              </form>
            </td>
        </tr>
        <% end %>
      </table>
      <% else %>
      <div class="alert alert-success">No locks set.</div>
      <% end %>
    </div>
  </div>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sidetiq-0.5.0 lib/sidetiq/views/locks.erb
sidetiq-0.4.3 lib/sidetiq/views/locks.erb
sidetiq-0.4.2 lib/sidetiq/views/locks.erb