diff --git a/glance-system/glance-kisfenyo.yaml b/glance-system/glance-kisfenyo.yaml index 1c8a7eb..8457b42 100644 --- a/glance-system/glance-kisfenyo.yaml +++ b/glance-system/glance-kisfenyo.yaml @@ -330,17 +330,157 @@ data: - - type: bookmarks - title: Useful Bookmarks - groups: - - title: "" - links: - - title: Kréta - url: https://klik100566001.e-kreta.hu/Intezmeny/Faliujsag - icon: https://web.dooplex.hu/static/white-icons/kreta.png - - title: Hardverapró - url: https://hardverapro.hu - icon: https://web.dooplex.hu/static/white-icons/hardverapro.png + # Glance Widget: Container Version Checker (Simplified) + # + # This is a more robust version that uses only Glance's documented template functions. + # Add this widget to your glance.yml under a column's widgets section. + # Place it right after the "DooPlex Server" widget. + # + # Prerequisites: + # - Deploy version-checker from version-checker.yaml + # - Wait ~5 minutes for initial version checks to complete + + - type: custom-api + title: Container Versions + cache: 5m + url: ${PROMETHEUS_URL}/api/v1/query + parameters: + # Get all images that have updates available (is_latest_version = 0) + query: version_checker_is_latest_version == 0 + subrequests: + # Count of up-to-date images + up_to_date: + url: ${PROMETHEUS_URL}/api/v1/query + parameters: + query: count(version_checker_is_latest_version == 1) or vector(0) + # Count of outdated images + outdated: + url: ${PROMETHEUS_URL}/api/v1/query + parameters: + query: count(version_checker_is_latest_version == 0) or vector(0) + # Total monitored images + total: + url: ${PROMETHEUS_URL}/api/v1/query + parameters: + query: count(version_checker_is_latest_version) or vector(0) + template: | + + + {{ $upToDate := (.Subrequest "up_to_date").JSON.Float "data.result.0.value.1" }} + {{ $outdated := (.Subrequest "outdated").JSON.Float "data.result.0.value.1" }} + {{ $total := (.Subrequest "total").JSON.Float "data.result.0.value.1" }} + {{ $updates := .JSON.Array "data.result" }} + +
# ---------- CENTER COLUMN ---------- - size: full @@ -424,6 +564,18 @@ data: url: https://zipline.dooplex.hu icon: https://web.dooplex.hu/static/white-icons/zipline.png + - type: bookmarks + title: Useful Bookmarks + groups: + - title: "" + links: + - title: Kréta + url: https://klik100566001.e-kreta.hu/Intezmeny/Faliujsag + icon: https://web.dooplex.hu/static/white-icons/kreta.png + - title: Hardverapró + url: https://hardverapro.hu + icon: https://web.dooplex.hu/static/white-icons/hardverapro.png + # ==================== ADMINISTRATION PAGE ==================== - name: Admin slug: admin