Merge branch 'features/ui-improvements' into jenkins_with_weblogic

This commit is contained in:
daekuk
2025-12-22 09:37:59 +09:00
7 changed files with 104 additions and 35 deletions
@@ -168,7 +168,7 @@ function validateName(){
return checkError; return checkError;
} }
function localSave(){ function localSave(isSilent){
var key =$("input[name=ADPTRBZWKNAME]").val(); var key =$("input[name=ADPTRBZWKNAME]").val();
//객체 생성 //객체 생성
var save ={}; var save ={};
@@ -217,8 +217,12 @@ function localSave(){
save["adapterPropGroup"]= adapterPropGroup; save["adapterPropGroup"]= adapterPropGroup;
save["adapterProps"] = fullData; save["adapterProps"] = fullData;
submitData[key]=save; submitData[key]=save;
alert("<%=localeMessage.getString("adapterDetail.saveAlertMsg1")%>"); if (!isSilent) {
alert("<%=localeMessage.getString("adapterDetail.saveAlertMsg1")%>");
} else {
alert("어댑터 정보 저장 성공!");
}
} }
@@ -280,6 +284,8 @@ function init(key,callback){
callback(key); callback(key);
} }
$('select[name=EAIBZWKDSTCD]').select2();
}, },
error:function(e){ error:function(e){
alert(e.responseText); alert(e.responseText);
@@ -328,6 +334,8 @@ function detail(key){
} }
}); });
$('select[name=EAIBZWKDSTCD]').trigger('change');
//adapter //adapter
@@ -632,7 +640,15 @@ $(document).ready(function() {
var r = confirm("<%=localeMessage.getString("adapterDetail.checkMsg4")%>"); var r = confirm("<%=localeMessage.getString("adapterDetail.checkMsg4")%>");
if (r == false) return; if (r == false) return;
} }
// 25.12.16 수정시 어댑터 리스트 자동저장
alert("어댑터의 정보를 저장을 먼저 진행합니다.")
var isSubSaveSuccess = ModifyPopCheckAndSave(true);
if (!isSubSaveSuccess) {
alert("어댑터 정보 저장이 실패했습니다. 어댑터 정보를 확인해주세요.");
return;
}
//공통부만 form으로 구성 //공통부만 form으로 구성
var postData = $('#ajaxForm').serializeArray(); var postData = $('#ajaxForm').serializeArray();
@@ -819,24 +835,33 @@ $(document).ready(function() {
localSave(); localSave();
chkAdapterCnt('add'); chkAdapterCnt('add');
}); });
$("#btn_pop_modify").click(function(){ $("#btn_pop_modify").click(function(){ // 검색용
// ModifyPopCheckAndSave(false);
});
function ModifyPopCheckAndSave(isSilent) {
var isDuplication = false; var isDuplication = false;
$("select[name=ADAPTERLIST] option").each(function(){ $("select[name=ADAPTERLIST] option").each(function(){
if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){ if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){
isDuplication = true; isDuplication = true;
} }
}); });
if (!isDuplication){
alert("<%=localeMessage.getString("adapterDetail.checkMsg2")%>");
return;
}
localSave();
}); if (!isDuplication){
// 화면 저장시 기존 alert 표시, INSERT/UPDATE 시 메시지 표시하지 않음
if (!isSilent) {
alert("<%=localeMessage.getString("adapterDetail.checkMsg2")%>");
}
return false;
}
localSave(isSilent);
return true;
}
$("#btn_pop_delete").click(function(){ $("#btn_pop_delete").click(function(){
//
var isDuplication = false; var isDuplication = false;
$("select[name=ADAPTERLIST] option").each(function(){ $("select[name=ADAPTERLIST] option").each(function(){
if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){ if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){
@@ -479,17 +479,17 @@
<th>REDIRECT URI</th> <th>REDIRECT URI</th>
<td><input type="text" name="redirectUri"/></td> <td><input type="text" name="redirectUri"/></td>
</tr> </tr>
<tr> <tr style="display: none;">
<th><%= localeMessage.getString("clntManDtl.athrt") %> <th><%= localeMessage.getString("clntManDtl.athrt") %>
(<%= localeMessage.getString("clntManDtl.sprt") %> ,) (<%= localeMessage.getString("clntManDtl.sprt") %> ,)
</th> </th>
<td><input type="text" name="authorities"/></td> <td><input type="text" name="authorities" value=""/></td>
</tr> </tr>
<tr> <tr style="display: none;">
<th><%= localeMessage.getString("clntManDtl.rsrc") %> <th><%= localeMessage.getString("clntManDtl.rsrc") %>
(<%= localeMessage.getString("clntManDtl.sprt") %> ,) (<%= localeMessage.getString("clntManDtl.sprt") %> ,)
</th> </th>
<td><input type="text" name="resourceIds"/></td> <td><input type="text" name="resourceIds" value=""/></td>
</tr> </tr>
<tr> <tr>
<th><%= localeMessage.getString("clntManDtl.tknExprtnDt") %> <th><%= localeMessage.getString("clntManDtl.tknExprtnDt") %>
@@ -501,11 +501,11 @@
</th> </th>
<td><input type="text" name="refreshTokenValiditySeconds"/></td> <td><input type="text" name="refreshTokenValiditySeconds"/></td>
</tr> </tr>
<tr> <tr style="display: none;">
<th><%= localeMessage.getString("clntManDtl.atmtcApprvlScp") %> <th><%= localeMessage.getString("clntManDtl.atmtcApprvlScp") %>
(<%= localeMessage.getString("clntManDtl.sprt") %> ,) (<%= localeMessage.getString("clntManDtl.sprt") %> ,)
</th> </th>
<td><input type="text" name="autoApprove"/></td> <td><input type="text" name="autoApprove" value=""/></td>
</tr> </tr>
<tr> <tr>
<th><%= localeMessage.getString("clntManDtl.allwIp") %> <th><%= localeMessage.getString("clntManDtl.allwIp") %>
@@ -1,4 +1,4 @@
<%@ page language="java" contentType="text/html; charset=utf-8"%> <%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="java.io.*"%> <%@ page import="java.io.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/jsp/common/include/localemessage.jsp" %> <%@ include file="/jsp/common/include/localemessage.jsp" %>
@@ -512,6 +512,9 @@
$("#toResponseAdapter").change(); $("#toResponseAdapter").change();
$("#apiFullPath").val(data["apiFullPath"]); // 스펙 전달용 값 $("#apiFullPath").val(data["apiFullPath"]); // 스펙 전달용 값
$('#inboundHttpMethod').trigger('change');
$('#outboundHttpMethod').trigger('change');
}, },
error:function(e){ error:function(e){
alert(e.responseText); alert(e.responseText);
@@ -831,10 +834,19 @@
$("input[name=bzwkSvcKeyName]").val($("input[name=eaiTranName]").val()); $("input[name=bzwkSvcKeyName]").val($("input[name=eaiTranName]").val());
} }
// 사용자 편의를 위해 inboundRestPath 앞에 "/" 는 제외함. // 사용자 편의를 위해 Path 앞에 "/" 는 제외, 복제도 포함.
$("input[name=inboundRestPath]").val(function(index, value) { $("input[name=inboundRestPath]").val(function(index, value) {
return value.replace(/^\/+/, ""); return value.replace(/^\/+/, "");
}); });
$("input[name=inboundResponseRestPath]").val(function(index, value) {
return value.replace(/^\/+/, "");
});
$("input[name=outboundRestPath]").val(function(index, value) {
return value.replace(/^\/+/, "");
});
$("input[name=outboundResponseRestPath]").val(function(index, value) {
return value.replace(/^\/+/, "");
});
var postData = $('#ajaxForm').serializeArray(); var postData = $('#ajaxForm').serializeArray();
if (isDetail){ if (isDetail){
@@ -1232,7 +1244,15 @@
$('#stdCommonValueModal').modal('hide'); $('#stdCommonValueModal').modal('hide');
}); });
function setupCloneInterfaceModal() { function setupCloneInterfaceModal(event) {
const eaiBzwkDstcd = $('#eaiBzwkDstcd').val();
const eaiSvcDesc = $('#eaiSvcDesc').val();
const inboundHttpMethod = $('#inboundHttpMethod').val();
$('#newBizCode').val(eaiBzwkDstcd).trigger('change');
$('#newSvcDesc').val(eaiSvcDesc);
$('#newInboundHttpMethod').val(inboundHttpMethod).trigger('change');
$('#newSvcName').val(''); $('#newSvcName').val('');
if($('#inboundRestPath').prop('disabled')){ if($('#inboundRestPath').prop('disabled')){
$('#newRoutingOptionGroup').css('display','none'); $('#newRoutingOptionGroup').css('display','none');
@@ -1245,11 +1265,19 @@
const orgApiInterfaceId = getFullSvcName(); const orgApiInterfaceId = getFullSvcName();
const newBizCode = $('#newBizCode').val(); const newBizCode = $('#newBizCode').val();
const newSvcName = $('#newSvcName').val(); const newSvcName = $('#newSvcName').val();
const newSvcDesc = $('#newSvcDesc').val();
const newSendRecvType = $('#newSendRecvType').val(); const newSendRecvType = $('#newSendRecvType').val();
const newInOutType = $('#newInOutType').val(); const newInOutType = $('#newInOutType').val();
const newApiInterfaceId = newSvcName+newSendRecvType+newInOutType; const newApiInterfaceId = newSvcName+newSendRecvType+newInOutType;
const newInboundHttpMethod = $('#newInboundHttpMethod').val(); const newInboundHttpMethod = $('#newInboundHttpMethod').val();
$("input[name=newInboundRestPath]").val(function(index, value) {
return value.replace(/^\/+/, "");
});
const newInboundRestPath = $('#newInboundRestPath').val(); const newInboundRestPath = $('#newInboundRestPath').val();
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: jsonUrl, url: jsonUrl,
@@ -1257,12 +1285,13 @@
cmd: 'CLONE', cmd: 'CLONE',
orgApiInterfaceId, orgApiInterfaceId,
newBizCode, newBizCode,
newSvcDesc,
newApiInterfaceId, newApiInterfaceId,
newInboundHttpMethod, newInboundHttpMethod,
newInboundRestPath, newInboundRestPath,
}, },
beforeSend: function() { beforeSend: function() {
$("[id^='btn_']").prop("disabled", true); $("[id=doCloneInterfaceButton]").prop("disabled", true);
$("#doCloneInterfaceButton").text("처리중 . . . . ."); $("#doCloneInterfaceButton").text("처리중 . . . . .");
}, },
success: function () { success: function () {
@@ -1986,7 +2015,7 @@
</div> </div>
</div> </div>
<div class="modal fade" id="cloneInterfaceModal" tabindex="-1" role="dialog" aria-labelledby=cloneInterfaceModalLabel" aria-hidden="true"> <div class="modal fade" id="cloneInterfaceModal" tabindex="-1" role="dialog" aria-labelledby=cloneInterfaceModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document"> <div class="modal-dialog modal-xl" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="cloneInterfaceModalLabel">API 인터페이스 복제</h5> <h5 class="modal-title" id="cloneInterfaceModalLabel">API 인터페이스 복제</h5>
@@ -2000,12 +2029,12 @@
<fieldset class="groupbox-border" style="margin-top:0px !important"> <fieldset class="groupbox-border" style="margin-top:0px !important">
<legend class="groupbox-border">BASIC</legend> <legend class="groupbox-border">BASIC</legend>
<div class="row"> <div class="row">
<div class="form-group col-md-4"> <div class="form-group col-md-2">
<label for="newBizCode"><span class="material-icons-outlined">work</span> 업무구분</label> <label for="newBizCode"><span class="material-icons-outlined">work</span> 업무구분</label>
<select id="newBizCode" class="form-select" name="newBizCode" style="width: 100%"> <select id="newBizCode" class="form-select" name="newBizCode" style="width: 100%">
</select> </select>
</div> </div>
<div class="form-group col-md-8"> <div class="form-group col-md-6">
<label for="newSvcName"><span class="material-icons-outlined">badge</span> API ID</label> <label for="newSvcName"><span class="material-icons-outlined">badge</span> API ID</label>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" id="newSvcName" name="newSvcName" required> <input type="text" class="form-control" id="newSvcName" name="newSvcName" required>
@@ -2017,6 +2046,12 @@
</span> </span>
</div> </div>
</div> </div>
<div class="form-group col-md-4">
<label for="newSvcDesc"><span class="material-icons-outlined">badge</span> API 명</label>
<div class="input-group">
<input type="text" class="form-control" id="newSvcDesc" name="newSvcDesc">
</div>
</div>
</div> </div>
</fieldset> </fieldset>
<fieldset id="newRoutingOptionGroup" class="groupbox-border"> <fieldset id="newRoutingOptionGroup" class="groupbox-border">
@@ -2049,4 +2084,11 @@
</div> </div>
</div><!-- end right_box --> </div><!-- end right_box -->
</body> </body>
</html>loneInterfaceButton">복제</button>
</div>
</div>
</div>
</div>
</div><!-- end right_box -->
</body>
</html> </html>
@@ -98,7 +98,6 @@
function detail(key) { function detail(key) {
// console.log('Before AJAX call, key:', key); // Log the key before the AJAX call // console.log('Before AJAX call, key:', key); // Log the key before the AJAX call
debugger;
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: url, url: url,
@@ -292,13 +292,13 @@
} }
function orgNameFormatter(cellvalue, options, rowObject) { function orgNameFormatter(cellvalue, options, rowObject) {
if (cellValue == null) return ""; if (cellvalue == null) return "";
if (cellValue === "null" || cellValue === "NULL") return ""; if (cellvalue === "null" || cellValue === "NULL") return "";
if (String(cellValue).trim() === "") return ""; if (String(cellvalue).trim() === "") return "";
if (cellValue === "미분류") return ""; if (cellvalue === "미분류") return "";
return cellvalue; return cellvalue;
} }
@@ -271,10 +271,12 @@ public class ApiInterfaceController extends OnlBaseAnnotationController {
} }
@PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.json", params = "cmd=CLONE") @PostMapping(value = "/onl/transaction/apim/apiInterfaceMan.json", params = "cmd=CLONE")
public ResponseEntity<?> cloneApiInterface(String orgApiInterfaceId, String newBizCode, String newApiInterfaceId, String newInboundHttpMethod, String newInboundRestPath, boolean importDupliCheck) throws BizException { public ResponseEntity<?> cloneApiInterface(String orgApiInterfaceId, String newBizCode,
String newApiInterfaceId, String newInboundHttpMethod,
String newInboundRestPath, String newSvcDesc, boolean importDupliCheck) throws BizException {
try { try {
ApiInterfaceUI orgApiInterfaceUI = service.selectDetail(orgApiInterfaceId); ApiInterfaceUI orgApiInterfaceUI = service.selectDetail(orgApiInterfaceId);
ApiInterfaceUI apiInterfaceUI = service.cloneApiInterface(orgApiInterfaceUI, newBizCode, newApiInterfaceId, newInboundHttpMethod, newInboundRestPath, importDupliCheck); ApiInterfaceUI apiInterfaceUI = service.cloneApiInterface(orgApiInterfaceUI, newBizCode, newApiInterfaceId, newInboundHttpMethod, newInboundRestPath, newSvcDesc, importDupliCheck);
Map<String, Object> resultMap = reloadSync(apiInterfaceUI); Map<String, Object> resultMap = reloadSync(apiInterfaceUI);
return ResponseEntity.ok(resultMap); return ResponseEntity.ok(resultMap);
} catch(Exception e) { } catch(Exception e) {
@@ -1159,7 +1159,7 @@ public class ApiInterfaceService extends OnlBaseService {
public ApiInterfaceUI cloneApiInterface(ApiInterfaceUI orgApiInterfaceUI, String newBizCd, public ApiInterfaceUI cloneApiInterface(ApiInterfaceUI orgApiInterfaceUI, String newBizCd,
String newApiInterfaceId, String newInboundHttpMethod, String newApiInterfaceId, String newInboundHttpMethod,
String newInboundRestPath, boolean importDupliCheck) throws Exception { String newInboundRestPath, String newSvcDesc, boolean importDupliCheck) throws Exception {
Optional<EAIMessageEntity> optional = eaiMessageQueryService.findById(newApiInterfaceId); Optional<EAIMessageEntity> optional = eaiMessageQueryService.findById(newApiInterfaceId);
if (optional.isPresent()) { if (optional.isPresent()) {
@@ -1173,6 +1173,7 @@ public class ApiInterfaceService extends OnlBaseService {
apiInterfaceUI.setEaiBzwkDstcd(newBizCd); apiInterfaceUI.setEaiBzwkDstcd(newBizCd);
settingInterfaceId(apiInterfaceUI, newApiInterfaceId); settingInterfaceId(apiInterfaceUI, newApiInterfaceId);
apiInterfaceUI.setEaiSvcName(newApiInterfaceId); apiInterfaceUI.setEaiSvcName(newApiInterfaceId);
apiInterfaceUI.setEaiSvcDesc(newSvcDesc);
apiInterfaceUI.setInboundHttpMethod(newInboundHttpMethod); apiInterfaceUI.setInboundHttpMethod(newInboundHttpMethod);
apiInterfaceUI.setInboundRestPath(newInboundRestPath); apiInterfaceUI.setInboundRestPath(newInboundRestPath);