fix #477: allow manual vpd schema lookup

This commit is contained in:
devmrko
2026-06-26 06:13:10 +09:00
parent 0b81d5b1a1
commit 7fe8d14a40
2 changed files with 23 additions and 25 deletions

View File

@@ -20,27 +20,22 @@
<div class="section-heading"> <div class="section-heading">
<div> <div>
<h2>VPD 적용 대상 Schema</h2> <h2>VPD 적용 대상 Schema</h2>
<p class="section-subtitle">개별 적용 드롭다운에 표시할 TABLE/VIEW 스키마를 선택합니다.</p> <p class="section-subtitle">개별 적용 드롭다운에 표시할 TABLE/VIEW 스키마를 선택하거나 직접 입력합니다.</p>
</div> </div>
<span class="badge text-bg-secondary" th:text="${#lists.size(vpdTargets)}">0</span> <span class="badge text-bg-secondary" th:text="${#lists.size(vpdTargets)}">0</span>
</div> </div>
<form method="get" action="/vpd-filter-policies" class="inline-form"> <form method="get" action="/vpd-filter-policies" class="inline-form">
<label> <label>
Schema Schema
<select class="form-select form-select-sm" name="schemaOwner" onchange="this.form.submit()"> <input class="form-control form-control-sm" name="schemaOwner" list="filter-schema-owner-options"
<option value="" th:selected="${selectedSchemaOwner == null || selectedSchemaOwner == ''}">관리 대상 스키마</option> th:value="${selectedSchemaOwner}" placeholder="관리 대상 스키마 또는 직접 입력">
<option th:each="owner : ${formOptions.schemaOwners()}"
th:value="${owner}"
th:text="${owner}"
th:selected="${owner == selectedSchemaOwner}"></option>
<option th:if="${selectedSchemaOwner != null && selectedSchemaOwner != '' && !#lists.contains(formOptions.schemaOwners(), selectedSchemaOwner)}"
th:value="${selectedSchemaOwner}"
th:text="${selectedSchemaOwner + ' / 조회 가능한 객체 없음'}"
selected></option>
</select>
</label> </label>
<button class="btn btn-sm rw-btn-secondary" type="submit">조회</button> <button class="btn btn-sm rw-btn-secondary" type="submit">조회</button>
</form> </form>
<datalist id="filter-schema-owner-options">
<option value="">관리 대상 스키마</option>
<option th:each="owner : ${formOptions.schemaOwners()}" th:value="${owner}"></option>
</datalist>
</section> </section>
<section class="content-band"> <section class="content-band">

View File

@@ -30,27 +30,22 @@
<div class="section-heading"> <div class="section-heading">
<div> <div>
<h2>VPD 적용 대상 TABLE/VIEW</h2> <h2>VPD 적용 대상 TABLE/VIEW</h2>
<p class="section-subtitle">Oracle DB catalog 기준의 TABLE/VIEW 목록입니다. Schema를 선택하면 해당 스키마 객체를 조회합니다.</p> <p class="section-subtitle">Oracle DB catalog 기준의 TABLE/VIEW 목록입니다. Schema를 선택하거나 직접 입력하면 해당 스키마 객체를 조회합니다.</p>
</div> </div>
<span class="badge text-bg-secondary" th:text="${#lists.size(vpdTargets)}">0</span> <span class="badge text-bg-secondary" th:text="${#lists.size(vpdTargets)}">0</span>
</div> </div>
<form method="get" action="/vpd-policies" class="inline-form mb-3"> <form method="get" action="/vpd-policies" class="inline-form mb-3">
<label> <label>
Schema Schema
<select class="form-select form-select-sm" name="schemaOwner" onchange="this.form.submit()"> <input class="form-control form-control-sm" name="schemaOwner" list="vpd-schema-owner-options"
<option value="" th:selected="${selectedSchemaOwner == null || selectedSchemaOwner == ''}">관리 대상 스키마</option> th:value="${selectedSchemaOwner}" placeholder="관리 대상 스키마 또는 직접 입력">
<option th:each="owner : ${formOptions.schemaOwners()}"
th:value="${owner}"
th:text="${owner}"
th:selected="${owner == selectedSchemaOwner}"></option>
<option th:if="${selectedSchemaOwner != null && selectedSchemaOwner != '' && !#lists.contains(formOptions.schemaOwners(), selectedSchemaOwner)}"
th:value="${selectedSchemaOwner}"
th:text="${selectedSchemaOwner + ' / 조회 가능한 객체 없음'}"
selected></option>
</select>
</label> </label>
<button class="btn btn-sm rw-btn-secondary" type="submit">조회</button> <button class="btn btn-sm rw-btn-secondary" type="submit">조회</button>
</form> </form>
<datalist id="vpd-schema-owner-options">
<option value="">관리 대상 스키마</option>
<option th:each="owner : ${formOptions.schemaOwners()}" th:value="${owner}"></option>
</datalist>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-sm align-middle"> <table class="table table-sm align-middle">
<thead> <thead>
@@ -87,7 +82,15 @@
</td> </td>
</tr> </tr>
<tr th:if="${#lists.isEmpty(vpdTargets)}"> <tr th:if="${#lists.isEmpty(vpdTargets)}">
<td colspan="6" class="text-muted">조회 가능한 TABLE/VIEW가 없습니다. DB 연결 사용자 권한과 스키마 객체를 확인하세요.</td> <td colspan="6" class="text-muted">
<span th:if="${selectedSchemaOwner != null && selectedSchemaOwner != ''}"
th:text="${selectedSchemaOwner + ' 스키마에서 현재 DB 연결 사용자로 조회 가능한 TABLE/VIEW가 없습니다. 스키마명, ALL_OBJECTS 조회 권한, 객체 권한을 확인하세요.'}">
선택한 스키마에서 조회 가능한 TABLE/VIEW가 없습니다.
</span>
<span th:unless="${selectedSchemaOwner != null && selectedSchemaOwner != ''}">
조회 가능한 TABLE/VIEW가 없습니다. DB 연결 사용자 권한과 스키마 객체를 확인하세요.
</span>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>