ops: glance layout verdichtet - internet kombiniert, container-tabs, mealie/commit-fixes
- Home rechte Spalte: Internet+Speed in einem Widget, DNS-und-VPN-Monitor entfernt, Container-Listen als Tab-Gruppe - Infrastructure: Container-Listen als Tab-Gruppe, Mealie-Statistik auf /api/admin/about/statistics (404-Fix) - Commit-Widgets: toRelativeTime als span-Attribut, nur erste Commit-Zeile Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+22
-64
@@ -396,28 +396,6 @@
|
|||||||
title-url: https://speedtest.kaleschke.info
|
title-url: https://speedtest.kaleschke.info
|
||||||
cache: 1h
|
cache: 1h
|
||||||
url: http://speedtest-tracker/api/v1/results/latest
|
url: http://speedtest-tracker/api/v1/results/latest
|
||||||
headers:
|
|
||||||
Authorization: Bearer ${GLANCE_SPEEDTEST_API_KEY}
|
|
||||||
Accept: application/json
|
|
||||||
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" }}
|
|
||||||
{{ if eq $server "" }}{{ $server = .JSON.String "data.server_name" }}{{ end }}
|
|
||||||
<div style="display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;">
|
|
||||||
<div class="color-primary size-h2" style="font-weight: 700;">{{ if ne $ip "" }}{{ $ip }}{{ else }}WAN online{{ end }}</div>
|
|
||||||
<div class="size-h5 color-highlight">Speedtest Tracker</div>
|
|
||||||
<div class="size-h6 color-subdue" style="font-style: italic;">{{ if ne $isp "" }}{{ $isp }}{{ else }}{{ $server }}{{ end }}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
- type: custom-api
|
|
||||||
title: Internet Speed
|
|
||||||
title-url: https://speedtest.kaleschke.info
|
|
||||||
cache: 1h
|
|
||||||
url: http://speedtest-tracker/api/v1/results/latest
|
|
||||||
headers:
|
headers:
|
||||||
Authorization: Bearer ${GLANCE_SPEEDTEST_API_KEY}
|
Authorization: Bearer ${GLANCE_SPEEDTEST_API_KEY}
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
@@ -428,7 +406,12 @@
|
|||||||
Authorization: Bearer ${GLANCE_SPEEDTEST_API_KEY}
|
Authorization: Bearer ${GLANCE_SPEEDTEST_API_KEY}
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
template: |
|
template: |
|
||||||
{{ $stats := .Subrequest "stats" }}
|
{{ $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 }}
|
||||||
|
{{ if eq $isp "" }}{{ $isp = .JSON.String "data.data.isp" }}{{ end }}
|
||||||
{{ $download := .JSON.Float "download" }}
|
{{ $download := .JSON.Float "download" }}
|
||||||
{{ if eq $download 0.0 }}{{ $download = .JSON.Float "data.download" }}{{ end }}
|
{{ 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 "download_bits") 1000000.0 }}{{ end }}
|
||||||
@@ -442,34 +425,24 @@
|
|||||||
{{ $ping := .JSON.Float "ping" }}
|
{{ $ping := .JSON.Float "ping" }}
|
||||||
{{ if eq $ping 0.0 }}{{ $ping = .JSON.Float "data.ping" }}{{ end }}
|
{{ 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 eq $ping 0.0 }}{{ $ping = .JSON.Float "data.data.ping.latency" }}{{ end }}
|
||||||
|
<div class="text-center" style="margin-bottom: 10px;">
|
||||||
|
<div class="color-primary size-h3" style="font-weight: 700;">{{ if ne $ip "" }}{{ $ip }}{{ else }}WAN online{{ end }}</div>
|
||||||
|
<div class="size-h6 color-subdue">{{ if ne $isp "" }}{{ $isp }}{{ else }}Speedtest Tracker{{ end }}</div>
|
||||||
|
</div>
|
||||||
{{ if and (eq $download 0.0) (eq $upload 0.0) }}
|
{{ if and (eq $download 0.0) (eq $upload 0.0) }}
|
||||||
<div class="text-center color-subdue">Keine aktuellen Messdaten.<br>API-Token oder Antwortformat pruefen.</div>
|
<div class="text-center color-subdue size-h6">Keine aktuellen Messdaten</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ $downloadAvg := $stats.JSON.Float "avg_download" }}
|
<div class="flex justify-between text-center">
|
||||||
{{ if eq $downloadAvg 0.0 }}{{ $downloadAvg = $stats.JSON.Float "data.download.avg" }}{{ end }}
|
|
||||||
{{ if eq $downloadAvg 0.0 }}{{ $downloadAvg = div ($stats.JSON.Float "data.download.avg_bits") 1000000.0 }}{{ end }}
|
|
||||||
{{ $uploadAvg := $stats.JSON.Float "avg_upload" }}
|
|
||||||
{{ if eq $uploadAvg 0.0 }}{{ $uploadAvg = $stats.JSON.Float "data.upload.avg" }}{{ end }}
|
|
||||||
{{ if eq $uploadAvg 0.0 }}{{ $uploadAvg = div ($stats.JSON.Float "data.upload.avg_bits") 1000000.0 }}{{ end }}
|
|
||||||
{{ $pingAvg := $stats.JSON.Float "avg_ping" }}
|
|
||||||
{{ if eq $pingAvg 0.0 }}{{ $pingAvg = $stats.JSON.Float "data.ping.avg" }}{{ end }}
|
|
||||||
{{ $downloadChange := percentChange $downloadAvg $download }}
|
|
||||||
{{ $uploadChange := percentChange $uploadAvg $upload }}
|
|
||||||
{{ $pingChange := percentChange $pingAvg $ping }}
|
|
||||||
<div class="flex justify-between text-center margin-block-3">
|
|
||||||
<div>
|
<div>
|
||||||
<div class="size-small {{ if lt $downloadChange 0.0 }}color-negative{{ else }}color-positive{{ end }}">{{ printf "%+.1f%%" $downloadChange }}</div>
|
<div class="color-highlight size-h4">{{ printf "%.0f" $download }}</div>
|
||||||
<div class="color-highlight size-h3">{{ printf "%.1f" $download }}</div>
|
<div class="size-h6 color-subdue">DOWN</div>
|
||||||
<div class="size-h6 color-subdue">DOWNLOAD</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="size-small {{ if lt $uploadChange 0.0 }}color-negative{{ else }}color-positive{{ end }}">{{ printf "%+.1f%%" $uploadChange }}</div>
|
<div class="color-highlight size-h4">{{ printf "%.0f" $upload }}</div>
|
||||||
<div class="color-highlight size-h3">{{ printf "%.1f" $upload }}</div>
|
<div class="size-h6 color-subdue">UP</div>
|
||||||
<div class="size-h6 color-subdue">UPLOAD</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="size-small {{ if gt $pingChange 0.0 }}color-negative{{ else }}color-positive{{ end }}">{{ printf "%+.1f%%" $pingChange }}</div>
|
<div class="color-highlight size-h4">{{ printf "%.0f ms" $ping }}</div>
|
||||||
<div class="color-highlight size-h3">{{ printf "%.0f ms" $ping }}</div>
|
|
||||||
<div class="size-h6 color-subdue">PING</div>
|
<div class="size-h6 color-subdue">PING</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -482,25 +455,10 @@
|
|||||||
username: ${GLANCE_ADGUARD_USERNAME}
|
username: ${GLANCE_ADGUARD_USERNAME}
|
||||||
password: ${GLANCE_ADGUARD_PASSWORD}
|
password: ${GLANCE_ADGUARD_PASSWORD}
|
||||||
|
|
||||||
- type: monitor
|
- type: group
|
||||||
title: DNS und VPN
|
widgets:
|
||||||
cache: 1m
|
|
||||||
sites:
|
|
||||||
- title: AdGuard Home
|
|
||||||
url: http://192.168.178.58:8082
|
|
||||||
check-url: http://adguard
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/adguard-home.svg
|
|
||||||
timeout: 5s
|
|
||||||
alt-status-codes: [200, 302, 401, 403]
|
|
||||||
- title: Traefik
|
|
||||||
url: https://traefik.kaleschke.info
|
|
||||||
check-url: http://traefik:8082/metrics
|
|
||||||
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/traefik.svg
|
|
||||||
timeout: 5s
|
|
||||||
alt-status-codes: [200, 302, 401, 403]
|
|
||||||
|
|
||||||
- type: docker-containers
|
- type: docker-containers
|
||||||
title: Network Container
|
title: Network
|
||||||
category: network
|
category: network
|
||||||
hide-by-default: true
|
hide-by-default: true
|
||||||
sock-path: tcp://glance-docker-socket-proxy:2375
|
sock-path: tcp://glance-docker-socket-proxy:2375
|
||||||
@@ -508,7 +466,7 @@
|
|||||||
$include: containers-map.yml
|
$include: containers-map.yml
|
||||||
|
|
||||||
- type: docker-containers
|
- type: docker-containers
|
||||||
title: App Container
|
title: Apps
|
||||||
category: apps
|
category: apps
|
||||||
hide-by-default: true
|
hide-by-default: true
|
||||||
sock-path: tcp://glance-docker-socket-proxy:2375
|
sock-path: tcp://glance-docker-socket-proxy:2375
|
||||||
@@ -516,7 +474,7 @@
|
|||||||
$include: containers-map.yml
|
$include: containers-map.yml
|
||||||
|
|
||||||
- type: docker-containers
|
- type: docker-containers
|
||||||
title: Ops Container
|
title: Ops
|
||||||
category: ops
|
category: ops
|
||||||
hide-by-default: true
|
hide-by-default: true
|
||||||
sock-path: tcp://glance-docker-socket-proxy:2375
|
sock-path: tcp://glance-docker-socket-proxy:2375
|
||||||
|
|||||||
@@ -104,10 +104,10 @@
|
|||||||
{{ range .JSON.Array "@this" }}
|
{{ range .JSON.Array "@this" }}
|
||||||
<li>
|
<li>
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div class="color-highlight text-truncate" style="max-width: 75%;">{{ .String "commit.message" }}</div>
|
<div class="color-highlight text-truncate" style="max-width: 75%;">{{ .String "commit.message" | replaceMatches "(?s)\n.*" "" }}</div>
|
||||||
<div class="size-h6 color-subdue">{{ slice (.String "sha") 0 7 }}</div>
|
<div class="size-h6 color-subdue">{{ slice (.String "sha") 0 7 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="size-h6 color-subdue">{{ .String "commit.author.name" }} · {{ .String "commit.author.date" | parseTime "rfc3339" | toRelativeTime }}</div>
|
<div class="size-h6 color-subdue">{{ .String "commit.author.name" }} · <span {{ .String "commit.author.date" | parseTime "rfc3339" | toRelativeTime }}></span></div>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -153,8 +153,10 @@
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
alt-status-codes: [200, 302, 401, 403]
|
alt-status-codes: [200, 302, 401, 403]
|
||||||
|
|
||||||
|
- type: group
|
||||||
|
widgets:
|
||||||
- type: docker-containers
|
- type: docker-containers
|
||||||
title: Core Container
|
title: Core
|
||||||
category: core
|
category: core
|
||||||
hide-by-default: true
|
hide-by-default: true
|
||||||
sock-path: tcp://glance-docker-socket-proxy:2375
|
sock-path: tcp://glance-docker-socket-proxy:2375
|
||||||
@@ -162,7 +164,7 @@
|
|||||||
$include: containers-map.yml
|
$include: containers-map.yml
|
||||||
|
|
||||||
- type: docker-containers
|
- type: docker-containers
|
||||||
title: App Container
|
title: Apps
|
||||||
category: apps
|
category: apps
|
||||||
hide-by-default: true
|
hide-by-default: true
|
||||||
sock-path: tcp://glance-docker-socket-proxy:2375
|
sock-path: tcp://glance-docker-socket-proxy:2375
|
||||||
@@ -170,7 +172,7 @@
|
|||||||
$include: containers-map.yml
|
$include: containers-map.yml
|
||||||
|
|
||||||
- type: docker-containers
|
- type: docker-containers
|
||||||
title: Ops Container
|
title: Ops
|
||||||
category: ops
|
category: ops
|
||||||
hide-by-default: true
|
hide-by-default: true
|
||||||
sock-path: tcp://glance-docker-socket-proxy:2375
|
sock-path: tcp://glance-docker-socket-proxy:2375
|
||||||
@@ -205,7 +207,7 @@
|
|||||||
title: Mealie
|
title: Mealie
|
||||||
title-url: https://mealie.kaleschke.info
|
title-url: https://mealie.kaleschke.info
|
||||||
cache: 1h
|
cache: 1h
|
||||||
url: http://mealie:9000/api/app/about/statistics
|
url: http://mealie:9000/api/admin/about/statistics
|
||||||
headers:
|
headers:
|
||||||
Authorization: Bearer ${GLANCE_MEALIE_TOKEN}
|
Authorization: Bearer ${GLANCE_MEALIE_TOKEN}
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
|
|||||||
@@ -57,8 +57,8 @@
|
|||||||
<ul class="list list-gap-6 collapsible-container" data-collapse-after="5">
|
<ul class="list list-gap-6 collapsible-container" data-collapse-after="5">
|
||||||
{{ range .JSON.Array "@this" }}
|
{{ range .JSON.Array "@this" }}
|
||||||
<li>
|
<li>
|
||||||
<div class="color-highlight text-truncate">{{ .String "commit.message" }}</div>
|
<div class="color-highlight text-truncate">{{ .String "commit.message" | replaceMatches "(?s)\n.*" "" }}</div>
|
||||||
<div class="size-h6 color-subdue">{{ slice (.String "sha") 0 7 }} · {{ .String "commit.author.date" | parseTime "rfc3339" | toRelativeTime }}</div>
|
<div class="size-h6 color-subdue">{{ slice (.String "sha") 0 7 }} · <span {{ .String "commit.author.date" | parseTime "rfc3339" | toRelativeTime }}></span></div>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user