{% extends "erp_base.html" %} {% block head_extra %} {% endblock %} {% block content %} {% include "cafe24/_nav.html" %} {% if flash %}
{{ flash }}
{% endif %} {% if flash_error %}
{{ flash_error }}
{% endif %} {# ── 연결 상태 ───────────────────────────────────────────── #}

카페24 연결

{% if status.connected %} 연결됨 {% else %} 연결 안 됨 {% endif %}
{% if status.missing %}
다음 환경변수가 설정되지 않았습니다: {{ status.missing | join(', ') }}
.env 에 추가한 뒤 컨테이너를 재기동하세요.
{% endif %} {% if status.reason %}

{{ status.reason }}

{% endif %} {% if status.last_error %} {% endif %}
쇼핑몰 ID{{ status.mall_id or '—' }}
API 버전{{ api_version }}
요청 권한(scope){{ scopes }}
Redirect URI{{ redirect_uri or '—' }}
승인된 권한 {% if status.scopes %}{{ status.scopes }}{% else %}—{% endif %}
Access Token 만료 {{ status.access_token_expires_at or '—' }} {% if status.access_expired %}(만료 — 다음 호출 시 자동 갱신){% endif %}
Refresh Token 만료{{ status.refresh_token_expires_at or '—' }}
마지막 갱신{{ status.last_refreshed_at or '—' }}
연결한 사람{{ status.connected_by or '—' }}
마지막 오류{{ status.last_error }}
{% if is_admin %}
{% if status.connected %}카페24 재연결{% else %}카페24 연결{% endif %} {% if status.connected or status.needs_reauth %}
{% endif %}
{% else %}

카페24 연결 변경은 관리자만 할 수 있습니다.

{% endif %}
{# ── 작업 로그 ───────────────────────────────────────────── #}

작업 로그

최근 50건
{% if audit_logs %}
{% for log in audit_logs %} {% endfor %}
시각작업자작업상품결과내용
{{ log.created_at }} {{ log.actor or '—' }} {{ log.action }} {{ log.product_no or '—' }} {{ log.result or '—' }} {{ log.detail or '' }}
{% else %}

아직 기록된 작업이 없습니다.

{% endif %}
{# ── API 로그 ────────────────────────────────────────────── #}

카페24 API 로그

최근 50건 · 토큰/시크릿은 기록하지 않습니다
{% if api_logs %}
{% for log in api_logs %} {% endfor %}
시각메서드엔드포인트상품상태결과소요오류
{{ log.created_at }} {{ log.method }} {{ log.endpoint }} {{ log.product_no or '—' }} {{ log.http_status or '—' }} {{ log.result }} {{ log.duration_ms }}ms {{ log.error_message or '' }}
{% else %}

아직 API 호출 기록이 없습니다.

{% endif %}
{% endblock %}