diff --git a/app/api/dashboard.py b/app/api/dashboard.py index 5c9246d..8263b7c 100644 --- a/app/api/dashboard.py +++ b/app/api/dashboard.py @@ -86,11 +86,11 @@ async def get_dashboard( ) law_alerts = law_result.scalar() or 0 - # 최근 문서 5건 + # 최근 문서 7건 recent_result = await session.execute( select(Document) .order_by(Document.created_at.desc()) - .limit(5) + .limit(7) ) recent_docs = recent_result.scalars().all() diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 59d6fda..3fd506c 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,5 +1,7 @@
-
-

대시보드

+
+ + +
+

대시보드

+ {#if systemView} + + {systemView.label} + + + {/if} +
{#if loading} -
+ +
{#each Array(4) as _} -
+ {/each} -
-
+ + {:else if summary} -
- - {#if pinnedMemos.length > 0} -
-
- {#each pinnedMemos as memo (memo.id)} - - - {memo.content?.split('\n')[0] || '메모'} - + + {#if pinnedMemos.length > 0} +
+ {#each pinnedMemos as memo (memo.id)} + + + + {memo.content?.split('\n')[0] || '메모'} + + + {/each} + {#if pinnedMemos.length >= 3} + 더보기 → + {/if} +
+ {/if} + + + + + + +
+

최근 활동

+
+ {#if summary.law_alerts > 0} + + 법령 {summary.law_alerts} + + {/if} +
+
+ + {#if summary.recent_documents.length > 0} + + {:else} + + {/if} +
+ + +
{ if (!e.currentTarget.open) pipelineManualClosed = true; }} + > + + + + 파이프라인 + + + {#if totalFailed > 0} + 실패 {totalFailed} + {/if} + {#if totalPending > 0} + 대기 {totalPending} + {/if} + {#if totalFailed === 0 && totalPending === 0} + 처리 완료 + {/if} + + + +
+

최근 24시간

+ {#if pipelineRows.length > 0} +
+ {#each pipelineRows as row (row.stage)} +
+
+ {row.label} + + 대기 {row.pending} · + 처리 {row.processing} · + 실패 0 ? 'text-error font-medium' : ''}>{row.failed} + +
+
+ {#if row.pending > 0}
{/if} + {#if row.processing > 0}
{/if} + {#if row.failed > 0}
{/if} +
+
{/each}
-
- {/if} - - - +
- - - - - - - -
- -
-

파이프라인 상태

-
- {#if systemView} - - {systemView.label} - - - {/if} - 최근 24시간 -
-
- {#if pipelineRows.length > 0} -
- {#each pipelineRows as row (row.stage)} -
-
- {row.label} - - 대기 {row.pending} · - 처리 {row.processing} · - 실패 0 ? 'text-error' : ''}>{row.failed} - -
-
- {#if row.pending > 0}
{/if} - {#if row.processing > 0}
{/if} - {#if row.failed > 0}
{/if} -
-
- {/each} -
- {:else} - - {/if} -
-
- -
- -
-

오늘 도메인 분포

- {domainData.total}건 -
- {#if domainData.rows.length > 0} -
- {#each domainData.rows as r (r.label)} -
- {/each} -
-
    - {#each domainData.rows as r (r.label)} -
  • - {r.label} - {r.count} -
  • - {/each} -
- {:else} - - {/if} -
-
- - -
- -

최근 문서

- {#if summary.recent_documents.length > 0} - - {:else} - - {/if} -
-
- -
- - -
-

법령 알림

- -
-

{summary.law_alerts}

- {#if summary.law_alerts > 0} - 확인하기 → - {:else} -

오늘 변경 없음

- {/if} -
- - - -
-

시스템 상태

- -
- {#if systemView} -

{systemView.label}

-

{systemView.sub}

- {/if} -
-
-
{/if}
+ +