From 45f43da65961be2748fce60c5968942a60be9435 Mon Sep 17 00:00:00 2001 From: Micha Date: Fri, 12 Jun 2026 16:44:18 +0200 Subject: [PATCH] ops: glance speedtest widget - ookla raw data fallbacks (data.data.*) Co-Authored-By: Claude Fable 5 --- ops/glance/config/home.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ops/glance/config/home.yml b/ops/glance/config/home.yml index cdca458..22bd57b 100644 --- a/ops/glance/config/home.yml +++ b/ops/glance/config/home.yml @@ -402,6 +402,7 @@ template: | {{ $ip := .JSON.String "external_ip" }} {{ if eq $ip "" }}{{ $ip = .JSON.String "data.interface.externalIp" }}{{ end }} + {{ if eq $ip "" }}{{ $ip = .JSON.String "data.data.interface.externalIp" }}{{ end }} {{ $isp := .JSON.String "isp" }} {{ if eq $isp "" }}{{ $isp = .JSON.String "data.isp" }}{{ end }} {{ $server := .JSON.String "server_name" }} @@ -432,12 +433,15 @@ {{ if eq $download 0.0 }}{{ $download = .JSON.Float "data.download" }}{{ end }} {{ if eq $download 0.0 }}{{ $download = div (.JSON.Float "download_bits") 1000000.0 }}{{ end }} {{ if eq $download 0.0 }}{{ $download = div (.JSON.Float "data.download_bits") 1000000.0 }}{{ end }} + {{ if eq $download 0.0 }}{{ $download = div (mul (.JSON.Float "data.data.download.bandwidth") 8.0) 1000000.0 }}{{ end }} {{ $upload := .JSON.Float "upload" }} {{ if eq $upload 0.0 }}{{ $upload = .JSON.Float "data.upload" }}{{ end }} {{ if eq $upload 0.0 }}{{ $upload = div (.JSON.Float "upload_bits") 1000000.0 }}{{ end }} {{ if eq $upload 0.0 }}{{ $upload = div (.JSON.Float "data.upload_bits") 1000000.0 }}{{ end }} + {{ if eq $upload 0.0 }}{{ $upload = div (mul (.JSON.Float "data.data.upload.bandwidth") 8.0) 1000000.0 }}{{ end }} {{ $ping := .JSON.Float "ping" }} {{ if eq $ping 0.0 }}{{ $ping = .JSON.Float "data.ping" }}{{ end }} + {{ if eq $ping 0.0 }}{{ $ping = .JSON.Float "data.data.ping.latency" }}{{ end }} {{ if and (eq $download 0.0) (eq $upload 0.0) }}
Keine aktuellen Messdaten.
API-Token oder Antwortformat pruefen.
{{ else }}