forked from kimhyungsik/ax_hub_mcp_tool
refactor: apply new Naming standard (uid, categoryKey, subToolName) across modules
This commit is contained in:
@@ -283,7 +283,7 @@
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">소속 도메인 그룹</label>
|
||||
<input type="text" class="form-control" name="group" list="groupList" placeholder="선택 또는 직접 입력 (대문자)" oninput="this.value = this.value.toUpperCase()" required>
|
||||
<input type="text" class="form-control" name="categoryKey" pattern="^[a-z0-9][a-z0-9_-]*$" list="groupList" placeholder="선택 또는 직접 입력 (대문자)" oninput="this.value = this.value.toUpperCase()" required>
|
||||
<datalist id="groupList">
|
||||
<option value="COMMON">COMMON (공통)</option>
|
||||
<option value="CUSTOMER">CUSTOMER (고객)</option>
|
||||
@@ -353,7 +353,7 @@
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th style="width: 10%; min-width: 100px;">그룹</th>
|
||||
<th style="width: 20%; min-width: 150px;">Tool 이름</th>
|
||||
<th style="width: 20%; min-width: 150px;">서브툴 이름</th>
|
||||
<th style="width: 35%; min-width: 200px;">설명</th>
|
||||
<th style="width: 15%; min-width: 180px;">Pod 모듈</th>
|
||||
<th style="width: 20%; min-width: 150px;">인터페이스 (ID)</th>
|
||||
@@ -386,12 +386,12 @@
|
||||
<div class="modal-body">
|
||||
<form id="editToolForm">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Tool 이름 (수정불가)</label>
|
||||
<input type="text" class="form-control" id="editToolName" name="toolName" readonly>
|
||||
<label class="form-label">서브툴 이름 (수정불가)</label>
|
||||
<input type="text" class="form-control" id="editSubToolName" name="subToolName" readonly>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">소속 도메인 그룹</label>
|
||||
<input type="text" class="form-control" id="editDomainGroup" name="domainGroup" oninput="this.value = this.value.toUpperCase()">
|
||||
<input type="text" class="form-control" id="editCategoryKey" name="categoryKey" pattern="^[a-z0-9][a-z0-9_-]*$" oninput="this.value = this.value.toUpperCase()">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label">설명</label>
|
||||
@@ -485,14 +485,14 @@
|
||||
|
||||
// 그룹명 기준으로 오름차순 정렬
|
||||
tools.sort((a, b) => {
|
||||
const gA = a.domainGroup || '';
|
||||
const gB = b.domainGroup || '';
|
||||
const gA = a.categoryKey || '';
|
||||
const gB = b.categoryKey || '';
|
||||
return gA.localeCompare(gB);
|
||||
});
|
||||
|
||||
// 그룹 필터 옵션 채우기
|
||||
const groupSet = new Set();
|
||||
tools.forEach(t => groupSet.add(t.domainGroup || 'UNKNOWN'));
|
||||
tools.forEach(t => groupSet.add(t.categoryKey || 'UNKNOWN'));
|
||||
const groupSelect = document.getElementById('groupFilterSelect');
|
||||
const currentSelectedGroup = groupSelect.value;
|
||||
groupSelect.innerHTML = '<option value="ALL">ALL (전체 그룹)</option>';
|
||||
@@ -513,10 +513,10 @@
|
||||
|
||||
return `
|
||||
<tr class="tool-row">
|
||||
<td class="text-nowrap"><span class="badge bg-secondary tool-group">${t.domainGroup || 'UNKNOWN'}</span></td>
|
||||
<td class="text-nowrap"><span class="badge bg-secondary tool-group">${t.categoryKey || 'UNKNOWN'}</span></td>
|
||||
<td class="fw-bold text-primary text-break tool-name">
|
||||
<a href="javascript:void(0)" onclick="openEditModal('${t.toolName}', '${t.domainGroup}', '${escDesc}', ${isReg})" class="text-decoration-none">
|
||||
${t.toolName}
|
||||
<a href="javascript:void(0)" onclick="openEditModal('${t.subToolName}', '${t.categoryKey}', '${escDesc}', ${isReg})" class="text-decoration-none">
|
||||
${t.subToolName}
|
||||
</a>
|
||||
${badgeHtml}
|
||||
</td>
|
||||
@@ -555,9 +555,9 @@
|
||||
}
|
||||
|
||||
let editModalInstance = null;
|
||||
function openEditModal(toolName, domainGroup, description, isReg) {
|
||||
document.getElementById('editToolName').value = toolName;
|
||||
document.getElementById('editDomainGroup').value = domainGroup !== 'null' ? domainGroup : '';
|
||||
function openEditModal(subToolName, categoryKey, description, isReg) {
|
||||
document.getElementById('editSubToolName').value = subToolName;
|
||||
document.getElementById('editCategoryKey').value = categoryKey !== 'null' ? categoryKey : '';
|
||||
document.getElementById('editDescription').value = description;
|
||||
document.getElementById('editRegister').value = isReg ? 'true' : 'false';
|
||||
|
||||
@@ -568,8 +568,8 @@
|
||||
}
|
||||
|
||||
function submitToolUpdate() {
|
||||
const toolName = document.getElementById('editToolName').value;
|
||||
const domainGroup = document.getElementById('editDomainGroup').value;
|
||||
const subToolName = document.getElementById('editSubToolName').value;
|
||||
const categoryKey = document.getElementById('editCategoryKey').value;
|
||||
const description = document.getElementById('editDescription').value;
|
||||
const register = document.getElementById('editRegister').value;
|
||||
|
||||
@@ -582,8 +582,8 @@
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
toolName: toolName,
|
||||
domainGroup: domainGroup,
|
||||
subToolName: subToolName,
|
||||
categoryKey: categoryKey,
|
||||
description: description,
|
||||
register: register
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user