Sha256: 476a2d332fd8d034517ffc8aed0300f29703e1dd9771a86bf7c7a5b301df35d8

Contents?: true

Size: 1.86 KB

Versions: 10

Compression:

Stored size: 1.86 KB

Contents

<% border_size = @requests.last == request ? "none" : "2" %>
<a href='<%= ActiveTracker::Configuration.root_path +  "/requests/#{request.id}" %>' class="flex flex-grow border-b-<%= border_size %> border-gray-200 text-gray-600 px-4 text-sm py-6 items-center">
  <div class="w-24"><span class="bg-gray-200 text-gray-600 rounded-full px-3 py-2 font-bold"><%= request.tags[:method] %></span></div>
  <div class="flex-1 break-all"><%= request.tags[:url] %>
    <% showable_tags = request.tags.keys.reject {|k| ["url", "method", "duration", "user_avatar_url", "params", /\Aat_.*/].any? {|r| k.to_s.match(r) } } %>
    <% if showable_tags.any? %>
      <div class="js-tags">
      <% showable_tags.each do |k| %>
        <span class="bg-gray-200 text-gray-900 py-1 px-2 text-xs rounded no-wrap mt-1 inline-block"><%= "#{k}:#{request.tags[k]}" %></span>
      <% end %>
      </div>
    <% end %>
    <!--
      TODO: make these links that further filters the results
    -->
  </div>
  <% if request.tags[:status].start_with?("2") %>
    <div class="w-24"><span class="bg-green-100 text-green-600 rounded-full px-3 py-2 font-bold"><%= request.tags[:status] %></span></div>
  <% elsif request.tags[:status].start_with?("3") %>
    <div class="w-24"><span class="bg-yellow-100 text-yellow-600 rounded-full px-3 py-2 font-bold"><%= request.tags[:status] %></span></div>
  <% elsif request.tags[:status].start_with?("4") %>
    <div class="w-24"><span class="bg-orange-200 text-orange-700 rounded-full px-3 py-2 font-bold"><%= request.tags[:status] %></span></div>
  <% elsif request.tags[:status].start_with?("5") %>
    <div class="w-24"><span class="bg-red-300 text-red-800 rounded-full px-3 py-2 font-bold"><%= request.tags[:status] %></span></div>
  <% end %>
  <div class="w-32 text-center">
    <b class="block"><%= request.tags[:duration] %></b>
    <%= time_ago_in_words request.log_at %> ago
  </div>
</a>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
activetracker-0.4.9 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.8 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.7 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.6 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.5 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.4 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.3 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.2 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.1 app/views/active_tracker/requests/_request.html.erb
activetracker-0.4.0 app/views/active_tracker/requests/_request.html.erb