From e9ccbace94924b184ae397ff7de4662f6b4b86b1 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Sat, 15 Nov 2025 03:19:15 +0300 Subject: [PATCH] Features: 1) Add STOREFRONT_DOMAIN to UNFOLD config; 2) Update sidebar to show all applications; 3) Rename Prometheus endpoint to `/prometheus/metrics/`; Fixes: 1) Remove commented-out TABS config; 2) Set collapsible to False for menu; Extra: 1) Add SITE_SYMBOL and SHOW_VIEW_ON_SITE; 2) Update SITE_URL to use STOREFRONT_DOMAIN; 3) Minor config cleanup. --- evibes/settings/drf.py | 2 +- evibes/settings/unfold.py | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/evibes/settings/drf.py b/evibes/settings/drf.py index 42a7f6c5..6b445fb4 100644 --- a/evibes/settings/drf.py +++ b/evibes/settings/drf.py @@ -90,7 +90,7 @@ The API supports multiple response formats: ## Health & Monitoring - Health checks: `/health/` -- Prometheus metrics (basic-auth protected): `/prometheus/` +- Prometheus metrics: `/prometheus/metrics/` ## Version Current API version: {EVIBES_VERSION} diff --git a/evibes/settings/unfold.py b/evibes/settings/unfold.py index 3b8e1610..e2fbd335 100644 --- a/evibes/settings/unfold.py +++ b/evibes/settings/unfold.py @@ -2,14 +2,17 @@ from django.templatetags.static import static from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ -from evibes.settings.base import PROJECT_NAME, SUPPORT_CONTACT, TASKBOARD_URL +from evibes.settings.base import PROJECT_NAME, STOREFRONT_DOMAIN, SUPPORT_CONTACT, TASKBOARD_URL UNFOLD = { + "SITE_URL": STOREFRONT_DOMAIN, "SITE_TITLE": f"{PROJECT_NAME} Dashboard", "SITE_HEADER": PROJECT_NAME, "SITE_LOGO": "favicon.png", "SITE_ICON": "favicon.ico", + "SITE_SYMBOL": "money", "SHOW_LANGUAGES": True, + "SHOW_VIEW_ON_SITE": False, "LOGIN": { "image": lambda request: static("favicon.png"), }, @@ -53,11 +56,12 @@ UNFOLD = { }, "SIDEBAR": { "show_search": True, + "show_all_applications": True, "navigation": [ { "title": _("Menu"), "separator": True, - "collapsible": True, + "collapsible": False, "items": [ { "title": _("Dashboard"), @@ -98,17 +102,4 @@ UNFOLD = { }, ], }, - # "TABS": [ - # { - # "models": [ - # "core.product", - # ], - # "items": [ - # { - # "title": _("Your custom title"), - # "link": reverse_lazy("admin:core_product_changelist"), - # }, - # ], - # }, - # ], }