[Developer] #618 add structured data browser
This commit is contained in:
@@ -2057,6 +2057,50 @@ body {
|
||||
text-anchor: middle;
|
||||
}
|
||||
|
||||
.structured-table-grid {
|
||||
display: grid;
|
||||
gap: .75rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
}
|
||||
|
||||
.structured-table-card {
|
||||
display: grid;
|
||||
gap: .3rem;
|
||||
min-height: 112px;
|
||||
padding: .9rem;
|
||||
color: var(--rw-text);
|
||||
text-decoration: none;
|
||||
background: var(--rw-surface);
|
||||
border: 1px solid var(--rw-border);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.structured-table-card:hover {
|
||||
color: var(--rw-text);
|
||||
border-color: var(--rw-primary);
|
||||
box-shadow: 0 2px 8px rgb(35 77 153 / 12%);
|
||||
}
|
||||
|
||||
.structured-table-card.is-selected {
|
||||
background: var(--rw-primary-soft);
|
||||
border-color: var(--rw-primary);
|
||||
box-shadow: inset 0 0 0 1px var(--rw-primary);
|
||||
}
|
||||
|
||||
.structured-table-card code {
|
||||
color: var(--rw-primary);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
.structured-table-card small {
|
||||
color: var(--rw-muted);
|
||||
}
|
||||
|
||||
.structured-data-result td,
|
||||
.structured-data-result th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.product-help-sql {
|
||||
background: var(--rw-primary-soft);
|
||||
border: 1px solid color-mix(in srgb, var(--rw-primary) 26%, var(--rw-border));
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
</div>
|
||||
<div id="submenu-integration" class="rw-submenu" data-submenu-panel="integration" role="navigation" aria-label="연동 도구 메뉴" hidden>
|
||||
<a class="nav-link" href="/objects">조회 대상</a>
|
||||
<a class="nav-link" href="/structured-data">정형 데이터 조회</a>
|
||||
<a class="nav-link" href="/ords-handlers">조회 연동</a>
|
||||
<a class="nav-link" href="/vector-knowledge">지식자료 관리</a>
|
||||
<a class="nav-link" href="/mcp-chatbot">대화형 검색</a>
|
||||
|
||||
69
src/main/resources/templates/structured-data.html
Normal file
69
src/main/resources/templates/structured-data.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<!doctype html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:replace="~{fragments/layout :: head('정형 데이터 조회')}"></head>
|
||||
<body>
|
||||
<nav th:replace="~{fragments/layout :: nav}"></nav>
|
||||
<main class="container py-4">
|
||||
<div class="page-title">
|
||||
<h1>정형 데이터 조회</h1>
|
||||
<details class="explanation-details">
|
||||
<summary>도움말</summary>
|
||||
<p>보험 원장 7개만 읽기 전용으로 조회합니다. 임의 SQL이나 수정 기능은 제공하지 않으며, 한 번에 최대 50건까지만 표시합니다.</p>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
이 화면은 관리자용 원장 미리보기입니다. 사용자별 VPD 적용 결과는 <a href="/probe">접근 검증</a>에서 확인하세요.
|
||||
</div>
|
||||
|
||||
<section class="content-band">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
<h2>조회할 원장 선택</h2>
|
||||
<p class="section-subtitle">KBAIPOC의 <code>POC_2</code> 스키마에서 승인된 정형 테이블만 표시합니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="structured-table-grid">
|
||||
<a th:each="entry : ${tables}"
|
||||
class="structured-table-card"
|
||||
th:classappend="${entry.key() == selectedKey} ? ' is-selected'"
|
||||
th:href="@{/structured-data(table=${entry.key()})}">
|
||||
<strong th:text="${entry.businessName()}">고객원장</strong>
|
||||
<code th:text="${entry.tableName()}">KB_CUSTOMERS</code>
|
||||
<small th:text="${entry.description()}">고객 기본정보</small>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="alert alert-danger" th:if="${errorMessage}" th:text="${errorMessage}"></div>
|
||||
|
||||
<section class="content-band" th:if="${preview}">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
<h2 th:text="${preview.table().businessName()}">고객원장</h2>
|
||||
<p class="section-subtitle">
|
||||
<code th:text="${'POC_2.' + preview.table().tableName()}">POC_2.KB_CUSTOMERS</code>
|
||||
<span th:text="${' · 최대 ' + preview.rowLimit() + '건'}"> · 최대 50건</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive structured-data-result">
|
||||
<table class="table table-sm align-middle">
|
||||
<thead>
|
||||
<tr><th th:each="column : ${preview.columns()}" th:text="${column}">COLUMN</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="row : ${preview.rows()}">
|
||||
<td th:each="column : ${preview.columns()}"
|
||||
th:text="${row.get(column) == null ? '-' : row.get(column)}">value</td>
|
||||
</tr>
|
||||
<tr th:if="${#lists.isEmpty(preview.rows())}">
|
||||
<td class="text-muted" th:attr="colspan=${#lists.size(preview.columns())}">표시할 데이터가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user