mirror of
https://gitea.invidious.io/iv-org/instances-api.git
synced 2024-08-15 00:53:15 +00:00
change weeklyRatio to 30dRatio
This commit is contained in:
parent
9b99fc0ff1
commit
001c411e15
2 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ static_headers do |response, filepath, filestat|
|
||||||
end
|
end
|
||||||
|
|
||||||
SORT_PROCS = {
|
SORT_PROCS = {
|
||||||
"health" => ->(name : String, instance : Instance) { -(instance[:monitor]?.try &.["weeklyRatio"]["ratio"].as_s.to_f || 0.0) },
|
"health" => ->(name : String, instance : Instance) { -(instance[:monitor]?.try &.["30dRatio"]["ratio"].as_s.to_f || 0.0) },
|
||||||
"location" => ->(name : String, instance : Instance) { instance[:region]? || "ZZ" },
|
"location" => ->(name : String, instance : Instance) { instance[:region]? || "ZZ" },
|
||||||
"name" => ->(name : String, instance : Instance) { name },
|
"name" => ->(name : String, instance : Instance) { name },
|
||||||
"signup" => ->(name : String, instance : Instance) { instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? 0 : 1 } || 2 },
|
"signup" => ->(name : String, instance : Instance) { instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? 0 : 1 } || 2 },
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
<td><%= instance[:stats]?.try &.["usage"]?.try &.["users"]["total"] || "-" %></td>
|
<td><%= instance[:stats]?.try &.["usage"]?.try &.["users"]["total"] || "-" %></td>
|
||||||
<td><%= instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? "✔" : "❌" } || "-" %></td>
|
<td><%= instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? "✔" : "❌" } || "-" %></td>
|
||||||
<td><%= instance[:flag]? ? "#{instance[:flag]} #{instance[:region]}" : "-" %></td>
|
<td><%= instance[:flag]? ? "#{instance[:flag]} #{instance[:region]}" : "-" %></td>
|
||||||
<td><%= instance[:monitor]?.try &.["weeklyRatio"]["ratio"] || "-" %></td>
|
<td><%= instance[:monitor]?.try &.["30dRatio"]["ratio"] || "-" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in a new issue