2024-06-01 09:53:32 -04:00
|
|
|
<div class="overflow-x-auto">
|
|
|
|
<table class="mx-auto border-collapse table-auto min-w-full divide-y divide-zinc-200 dark:divide-zinc-700 text-left">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:47:12 -04:00
|
|
|
NTS-KE Server
|
2024-06-01 09:53:32 -04:00
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
Status
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
Algorithm
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
Cookies
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
Cookie Length
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:47:12 -04:00
|
|
|
NTP Host
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:47:12 -04:00
|
|
|
NTP Port
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
Certificate Expiration
|
|
|
|
</th>
|
2024-06-04 20:03:02 -04:00
|
|
|
<th scope="col" class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
Last Check
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2024-06-05 12:23:25 -04:00
|
|
|
<tr :for={client <- @clients} class="hover:bg-zinc-100 dark:hover:bg-zinc-700">
|
|
|
|
<% {status, response} = client.key_establishment_response %>
|
2024-05-29 15:25:05 -04:00
|
|
|
|
2024-06-01 09:53:32 -04:00
|
|
|
<%= if (status == :ok) do %>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-05 12:23:25 -04:00
|
|
|
<%= client.server.host %><span :if={client.server.port != 4460}>:<%= client.server.port %></span>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-05-29 15:25:05 -04:00
|
|
|
<%= status %>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:30:35 -04:00
|
|
|
<% aead_algorithm = Enum.at(response.aead_algorithms, 0) %>
|
2024-06-01 10:47:12 -04:00
|
|
|
|
2024-06-01 10:30:35 -04:00
|
|
|
<span class="group relative">
|
|
|
|
<%= KeyEstablishmentResponse.aead_algorithm_to_id(aead_algorithm) %>
|
|
|
|
<span class="pointer-events-none absolute -top-9 left-0 w-max p-1 rounded-lg bg-zinc-300 dark:bg-zinc-600 opacity-0 transition-opacity group-hover:opacity-100">
|
|
|
|
<%= aead_algorithm %>
|
|
|
|
</span>
|
|
|
|
</span>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
<%= length(response.cookies) %>
|
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
<%= response.cookie_length %>
|
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:47:12 -04:00
|
|
|
<%= Map.get(response, :server, "-") %>
|
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:47:12 -04:00
|
|
|
<%= Map.get(response, :port, "-") %>
|
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:30:35 -04:00
|
|
|
<%= response.cert_expiration |> DateTime.from_iso8601 |> then(fn {:ok, dt, _} -> Calendar.strftime(dt, "%Y-%m-%d %H:%M:%SZ") end)%>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-05 12:23:25 -04:00
|
|
|
<%= client.last_key_establishment |> Calendar.strftime("%Y-%m-%d %H:%M:%SZ") %>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<% else %>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-05 12:23:25 -04:00
|
|
|
<%= client.server.host %><span :if={client.server.port != 4460}>:<%= client.server.port %></span>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 09:53:32 -04:00
|
|
|
<span class="group relative">
|
|
|
|
<%= status %>
|
|
|
|
<span class="pointer-events-none absolute -top-9 left-0 w-max p-1 rounded-lg bg-zinc-300 dark:bg-zinc-600 opacity-0 transition-opacity group-hover:opacity-100">
|
|
|
|
<%= response %>
|
|
|
|
</span>
|
2024-05-29 15:25:05 -04:00
|
|
|
</span>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
2024-06-04 20:03:02 -04:00
|
|
|
<td class="py-2 px-6 whitespace-nowrap"> - </td>
|
|
|
|
<td class="py-2 px-6 whitespace-nowrap"> - </td>
|
|
|
|
<td class="py-2 px-6 whitespace-nowrap"> - </td>
|
|
|
|
<td class="py-2 px-6 whitespace-nowrap"> - </td>
|
|
|
|
<td class="py-2 px-6 whitespace-nowrap"> - </td>
|
|
|
|
<td class="py-2 px-6 whitespace-nowrap"> - </td>
|
|
|
|
<td class="py-2 px-6 whitespace-nowrap">
|
2024-06-01 10:30:35 -04:00
|
|
|
<%=
|
2024-06-05 12:23:25 -04:00
|
|
|
client.last_key_establishment |> Calendar.strftime("%Y-%m-%d %H:%M:%SZ")
|
2024-06-01 10:30:35 -04:00
|
|
|
%>
|
2024-06-01 09:53:32 -04:00
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|