diff --git a/app/modules/performance/templates/performance/index.html b/app/modules/performance/templates/performance/index.html index c6a0b21..ef87ca1 100644 --- a/app/modules/performance/templates/performance/index.html +++ b/app/modules/performance/templates/performance/index.html @@ -235,4 +235,4 @@ } | tojson }} {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/modules/performance/templates/performance/settings.html b/app/modules/performance/templates/performance/settings.html index 39f2a7d..2cdec23 100644 --- a/app/modules/performance/templates/performance/settings.html +++ b/app/modules/performance/templates/performance/settings.html @@ -118,4 +118,4 @@ {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/static/performance.js b/app/static/performance.js index aea815b..e61f20d 100644 --- a/app/static/performance.js +++ b/app/static/performance.js @@ -127,13 +127,16 @@ syncBtn.textContent = "업데이트 중…"; try { const res = await api("POST", "/performance/api/sync", {}); - const ok = [], bad = [], pending = [], busy = []; + // 실패(빨강)는 인증 실패·API 오류처럼 손봐야 하는 것만. 인증정보를 아직 안 넣은 쇼핑몰(미설정)과 + // 수집을 아직 만들지 않은 쇼핑몰(연동 준비 중)은 회색 한 줄로 이름만. + const ok = [], bad = [], pending = [], unset = [], busy = []; let changed = 0; (res.results || []).forEach(function (r) { const name = (data.names || {})[r.code] || r.code; if (r.skipped) busy.push(name); else if (r.ok) { ok.push(name + " " + fmt(r.upserted) + "건"); changed += r.upserted; } else if (r.status === "not_implemented") pending.push(name); + else if (r.status === "not_configured") unset.push(name); else bad.push(name + "(" + (r.label || r.status) + (r.message ? ": " + r.message : "") + ")"); }); const parts = []; @@ -141,6 +144,7 @@ if (bad.length) parts.push("실패 " + esc(bad.join(", "))); if (busy.length) parts.push("이미 진행 중 " + esc(busy.join(", "))); if (pending.length) parts.push('연동 준비 중: ' + esc(pending.join(", ")) + ""); + if (unset.length) parts.push('인증정보 미설정: ' + esc(unset.join(", ")) + ""); resultBox.innerHTML = parts.join(" · ") || "업데이트할 쇼핑몰이 없습니다."; resultBox.className = "perf-notice" + (bad.length ? " is-warn" : " is-ok"); resultBox.hidden = false;