fix: dap-was-dapmt 바라보도록 수정

This commit is contained in:
juheelee
2026-08-20 14:58:50 +09:00
parent 4986f9801c
commit 52ae31d853
30 changed files with 495 additions and 359 deletions

View File

@@ -31,7 +31,7 @@
.subtitle { margin: 0; color: #a1a1aa; font-size: 14px; line-height: 1.65; }
.count-badge { padding: 7px 11px; border: 1px solid #27272a; border-radius: 8px; background: #18181b; color: #a1a1aa; font-family: "Geist Mono", Consolas, monospace; font-size: 12px; white-space: nowrap; }
.panel { overflow: hidden; border: 1px solid #27272a; border-radius: 12px; background: #111113; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.toolbar { display: grid; grid-template-columns: minmax(260px,1fr) 190px auto auto; gap: 10px; padding: 16px; border-bottom: 1px solid #27272a; background: #111113; }
.toolbar { display: grid; grid-template-columns: 210px minmax(240px,1fr) 170px auto auto; gap: 10px; padding: 16px; border-bottom: 1px solid #27272a; background: #111113; }
input, select, button { min-height: 40px; border: 1px solid #3f3f46; border-radius: 7px; background: #18181b; color: #e4e4e7; padding: 8px 12px; font: inherit; font-size: 13px; outline: none; }
input::placeholder { color: #71717a; }
input:focus, select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
@@ -95,6 +95,10 @@
<section class="panel">
<div class="toolbar">
<select id="sourceType" aria-label="Tool 소스 프로젝트">
<option value="DAP_WAS_DAPMT">dap-was-dapmt 소스</option>
<option value="DAP_ADMIN">dap-admin 소스</option>
</select>
<input id="keyword" type="search" autocomplete="off" placeholder="툴명, 제목 또는 설명 검색">
<select id="category"><option value="">전체 카테고리</option></select>
<button id="selectAll" type="button">전체 선택</button>
@@ -114,7 +118,7 @@
</main>
<script>
const state = { tools: [], selected: new Set() };
const state = { tools: [], selected: new Set(), sourceType: 'DAP_WAS_DAPMT' };
const el = id => document.getElementById(id);
const gateway = location.origin;
@@ -155,7 +159,11 @@
async function load() {
try {
const response = await fetch('/report/api/report-tools');
state.sourceType = el('sourceType').value;
state.selected.clear();
state.tools = [];
el('tools').innerHTML = '<tr><td class="loading-row" colspan="6">선택한 프로젝트의 Tool 소스를 분석하고 있습니다.</td></tr>';
const response = await fetch(`/report/api/report-tools?sourceType=${encodeURIComponent(state.sourceType)}`);
const body = await response.json().catch(() => null);
if (!response.ok) {
throw new Error(body?.error || body?.message || `툴 목록 조회에 실패했습니다. (${response.status})`);
@@ -178,6 +186,10 @@
}
el('keyword').addEventListener('input', render);
el('sourceType').addEventListener('change', () => {
el('category').innerHTML = '<option value="">전체 카테고리</option>';
load();
});
el('category').addEventListener('change', render);
el('selectAll').addEventListener('click', () => { filtered().forEach(tool => state.selected.add(tool.name)); render(); });
el('clearAll').addEventListener('click', () => { filtered().forEach(tool => state.selected.delete(tool.name)); render(); });
@@ -185,7 +197,8 @@
el('download').disabled = true; updateStatus('소스를 분석하고 Excel을 생성하는 중입니다.');
try {
const response = await fetch('/report/api/tool-reports/excel', {
method: 'POST', headers: {'Content-Type':'application/json'}, body: JSON.stringify({toolNames: [...state.selected]})
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify({toolNames: [...state.selected], sourceType: state.sourceType})
});
if (!response.ok) {
const body = await response.json().catch(() => ({}));