Change table order

This commit is contained in:
xRealNeon 2022-01-11 19:07:53 +01:00
parent 7e972d9c5b
commit b8dc4dac56

View File

@ -101,13 +101,13 @@
<th><a href="/?sort_by=<%= sort_by == "version" ? "version-reverse" : "version" %>">version</a></th>
<th><a href="/?sort_by=<%= sort_by == "type" ? "type-reverse" : "type" %>">type</a></th>
<th><a href="/?sort_by=<%= sort_by == "users" ? "users-reverse" : "users" %>">users</a></th>
<th><a href="/?sort_by=<%= sort_by == "cors" ? "cors-reverse" : "cors" %>">cors</a></th>
<th><a href="/?sort_by=<%= sort_by == "api" ? "api-reverse" : "api" %>">api</a></th>
<th><a href="/?sort_by=<%= sort_by == "signup" ? "signup-reverse" : "signup" %>">signup</a></th>
<th><a href="/?sort_by=<%= sort_by == "location" ? "location-reverse" : "location" %>">location</a></th>
<th><a href="/?sort_by=<%= sort_by == "health" ? "health-reverse" : "health" %>">
<div class="tooltip">health<span class="tooltiptext">Uptime / Downtime displayed in percentage</span></div></a>
</th>
<th><a href="/?sort_by=<%= sort_by == "cors" ? "cors-reverse" : "cors" %>">cors</a></th>
<th><a href="/?sort_by=<%= sort_by == "api" ? "api-reverse" : "api" %>">api</a></th>
</tr>
</thead>
@ -119,11 +119,11 @@
<td><%= instance[:stats]?.try &.["software"]?.try &.["version"] || "-" %></td>
<td><%= instance[:type] %></td>
<td><%= instance[:stats]?.try &.["usage"]?.try &.["users"]["total"] || "-" %></td>
<td><%= instance[:cors] == nil ? "-" : instance[:cors] ? "✔" : "❌" %></td>
<td><%= instance[:api] == nil ? "-" : instance[:api] ? "✔" : "❌" %></td>
<td><%= instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? "✔" : "❌" } || "-" %></td>
<td><%= instance[:flag]? ? "#{instance[:flag]} #{instance[:region]}" : "-" %></td>
<td><%= instance[:monitor]?.try &.["30dRatio"]["ratio"] || "-" %></td>
<td><%= instance[:cors] == nil ? "-" : instance[:cors] ? "✔" : "❌" %></td>
<td><%= instance[:api] == nil ? "-" : instance[:api] ? "✔" : "❌" %></td>
</tr>
<% end %>
</tbody>