From 001c411e1504b38d940bd85c365c57e2a01f63ab Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Mon, 16 Nov 2020 19:31:07 +0200 Subject: [PATCH] change weeklyRatio to 30dRatio --- src/instances.cr | 2 +- src/instances/views/index.ecr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instances.cr b/src/instances.cr index 77c9d21..b8c895a 100644 --- a/src/instances.cr +++ b/src/instances.cr @@ -133,7 +133,7 @@ static_headers do |response, filepath, filestat| end 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" }, "name" => ->(name : String, instance : Instance) { name }, "signup" => ->(name : String, instance : Instance) { instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? 0 : 1 } || 2 }, diff --git a/src/instances/views/index.ecr b/src/instances/views/index.ecr index 1dc6330..9a95f2d 100644 --- a/src/instances/views/index.ecr +++ b/src/instances/views/index.ecr @@ -80,7 +80,7 @@ <%= instance[:stats]?.try &.["usage"]?.try &.["users"]["total"] || "-" %> <%= instance[:stats]?.try &.["openRegistrations"]?.try { |bool| bool.as_bool ? "✔" : "❌" } || "-" %> <%= instance[:flag]? ? "#{instance[:flag]} #{instance[:region]}" : "-" %> - <%= instance[:monitor]?.try &.["weeklyRatio"]["ratio"] || "-" %> + <%= instance[:monitor]?.try &.["30dRatio"]["ratio"] || "-" %> <% end %>