From be9d2a5def8384e034ff211f5deb729d6b0141bb Mon Sep 17 00:00:00 2001 From: samaradel Date: Sun, 4 Sep 2022 15:20:10 +0200 Subject: [PATCH] Fix stats math --- templates/shortcodes/grid_stats.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/templates/shortcodes/grid_stats.html b/templates/shortcodes/grid_stats.html index 91b983b6f..ec9c61f61 100644 --- a/templates/shortcodes/grid_stats.html +++ b/templates/shortcodes/grid_stats.html @@ -1,14 +1,14 @@ {% set styles = "background-image: url('images/grid_map.png');" %} {% set data = load_data(url="https://gridproxy.grid.tf/stats?status=up", required=false, format="json") %} {% if data %} -{% set capacity = data.totalHru + data.totalSru / 1000 %} +{% set capacity = data.totalHru + data.totalSru / (1024 * 1024 * 1024 * 1024 * 1024) %} {% set nodes = data.nodes %} {% set countries = data.countries %} {% set cores = data.totalCru %} {% endif %} -{% if data %} +{% if data %}
@@ -19,7 +19,7 @@
- {{ capacity / 1000000 | round(precision=2) }}PB + {{ capacity | round(precision=2) }}PB capacity
@@ -69,8 +69,9 @@ {{ cores | num_format }} cores
- - + +