Sha256: 12122ee917e331ac940c82333b4d44f4fb1fadcb78122b6cb26c6c79909986a3

Contents?: true

Size: 1.39 KB

Versions: 2

Compression:

Stored size: 1.39 KB

Contents

<style>
<%= File.read(File.join(view_path, 'assets', 'styles.css')) %>
</style>

<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(view_path, '_home_nav.erb')) %>

    <div class="col-md-9">
      <% if @locks.length > 0 %>
      <table class="table table-striped table-bordered table-white table-sidetiq">
        <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

2 entries across 2 versions & 1 rubygems

Version Path
sidetiq-0.6.1 lib/sidetiq/views/locks.erb
sidetiq-0.6.0 lib/sidetiq/views/locks.erb