diff --git a/.env.example b/.env.example index 36a3e9a..e0ab2f0 100644 --- a/.env.example +++ b/.env.example @@ -4,4 +4,5 @@ SESSION_SECRET_KEY=replace-with-a-long-random-secret SESSION_COOKIE_SECURE=true PUBLIC_BASE_URL=https://dbx.no1king.freeddns.org CS_ORDER_URL=https://cs.example.com -CUSTOMER_ORDER_LIST_URL=https://orders.example.com +# 비워두면 같은 도메인의 /orderlist/ 경로(NPM 리버스 프록시)로 자동 연결됨 +CUSTOMER_ORDER_LIST_URL=/orderlist/ diff --git a/app/main.py b/app/main.py index f2a678c..5a24b41 100644 --- a/app/main.py +++ b/app/main.py @@ -113,11 +113,13 @@ async def home(request: Request) -> HTMLResponse: "title": "CS 발주 업무", "description": "CS 발주 업무 페이지로 이동", "url": env("CS_ORDER_URL", "#"), + "health_url": "", }, { "title": "고객 주문리스트 프로그램", "description": "고객 주문리스트 프로그램으로 이동", - "url": env("CUSTOMER_ORDER_LIST_URL", "#"), + "url": env("CUSTOMER_ORDER_LIST_URL", "/orderlist/"), + "health_url": "/orderlist/health/db", }, ] return render_template( diff --git a/app/static/styles.css b/app/static/styles.css index 40a7536..8e74114 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -789,3 +789,37 @@ a { color: inherit; text-decoration: none; } .header-portal { display: none; } .btn-logout span { display: none; } } + +/* ── 상태 배지 ─────────────────────────────────── */ +.status-badge { + display: inline-flex; + align-items: center; + gap: 6px; + margin-left: 8px; + padding: 2px 8px; + font-size: 11px; + font-weight: 600; + border-radius: 999px; + vertical-align: middle; + line-height: 1.4; + background: #eef2f7; + color: var(--muted); + border: 1px solid var(--border); +} +.status-badge::before { + content: ""; + width: 6px; + height: 6px; + border-radius: 50%; + background: currentColor; +} +.status-badge[data-status="online"] { + background: #e7f6ee; + color: var(--success); + border-color: #b6e0c6; +} +.status-badge[data-status="offline"] { + background: #fdecec; + color: var(--danger); + border-color: #f1c2c2; +} diff --git a/app/templates/main.html b/app/templates/main.html index ec30fb7..e25ffb3 100644 --- a/app/templates/main.html +++ b/app/templates/main.html @@ -55,7 +55,8 @@
{{ item.title }}
++ {{ item.title }} + {% if item.health_url %} + 확인 중 + {% endif %} +
{{ item.description }}