evodata/app/views/checks/index.html.erb

56 lines
2.3 KiB
Plaintext

<div class="w-full">
<div class="flex justify-between items-center">
<h1 class="font-bold text-4xl">Checks</h1>
<%= link_to 'New check', new_check_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
</div>
<div id="checks" class="min-w-full px-4 py-8 sm:px-0">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Hostname
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Name
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Description
</th>
<th scope="col" class="relative px-6 py-3">
<span class="sr-only">Edit</span>
</th>
</tr>
</thead>
<tbody>
<% @checks.each do |check| %>
<tr class="<%= cycle("bg-white", "bg-gray-50") %>">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
<%= check.hostname %>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<%= check.name %>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<%= check.description %>
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<%= link_to "Show", check, class: "text-indigo-600 hover:text-indigo-900" %>
<%= link_to 'Edit', edit_check_path(check), class: "text-indigo-600 hover:text-indigo-900" %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>