API SPEC 신규일때 인터페이스 하면 값을 세팅
This commit is contained in:
@@ -510,6 +510,8 @@
|
|||||||
|
|
||||||
$("#fromResponseAdapter").change();
|
$("#fromResponseAdapter").change();
|
||||||
$("#toResponseAdapter").change();
|
$("#toResponseAdapter").change();
|
||||||
|
|
||||||
|
$("#apiFullPath").val(data["apiFullPath"]); // 스펙 전달용 값
|
||||||
},
|
},
|
||||||
error:function(e){
|
error:function(e){
|
||||||
alert(e.responseText);
|
alert(e.responseText);
|
||||||
@@ -931,7 +933,16 @@
|
|||||||
|
|
||||||
function showApiSpecPopup() {
|
function showApiSpecPopup() {
|
||||||
var eaiSvcName = getFullSvcName();
|
var eaiSvcName = getFullSvcName();
|
||||||
var args = {title:'API 스펙 관리', parent: true};
|
var eaiSvcDesc = $('#eaiSvcDesc').val();
|
||||||
|
var apipath = $('#apiFullPath').val();
|
||||||
|
var contentType = $('#contentType').val();
|
||||||
|
var args = {
|
||||||
|
title:'API 스펙 관리',
|
||||||
|
parent: true,
|
||||||
|
apipath : apipath,
|
||||||
|
eaiSvcDesc : eaiSvcDesc,
|
||||||
|
contentType : contentType
|
||||||
|
};
|
||||||
var popupUrl = url_spec + '?cmd=DETAIL&eaiSvcName=' + encodeURIComponent(eaiSvcName);
|
var popupUrl = url_spec + '?cmd=DETAIL&eaiSvcName=' + encodeURIComponent(eaiSvcName);
|
||||||
showModal(popupUrl, args, 1200, 800);
|
showModal(popupUrl, args, 1200, 800);
|
||||||
}
|
}
|
||||||
@@ -1503,6 +1514,7 @@
|
|||||||
<label class="btn btn-outline-primary" for="btnTypeOutword"><i class="bi bi-arrow-left-circle"></i> 타발</label>
|
<label class="btn btn-outline-primary" for="btnTypeOutword"><i class="bi bi-arrow-left-circle"></i> 타발</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="hidden" id="apiFullPath" value="">
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
} else {
|
} else {
|
||||||
buttonControl(false);
|
buttonControl(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeCodeMirror();
|
initializeCodeMirror();
|
||||||
initializeSummernote();
|
initializeSummernote();
|
||||||
}
|
}
|
||||||
@@ -97,6 +98,7 @@
|
|||||||
|
|
||||||
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,
|
||||||
@@ -150,6 +152,37 @@
|
|||||||
// console.log('After setting apiId, key:', key); // Log the key after setting apiId
|
// console.log('After setting apiId, key:', key); // Log the key after setting apiId
|
||||||
|
|
||||||
buttonControl(true);
|
buttonControl(true);
|
||||||
|
|
||||||
|
// 조회된 Spec 데이터가 없다면 인터페이스 화면의 값을 세팅함.
|
||||||
|
if (!data.apiId) {
|
||||||
|
var args = window.dialogArguments;
|
||||||
|
|
||||||
|
if (args && args.apipath) {
|
||||||
|
// HS04 의 fullpath 메서드/URL로 분리
|
||||||
|
var rawString = args.apipath;
|
||||||
|
|
||||||
|
var parts = rawString.split('|');
|
||||||
|
|
||||||
|
var method = parts[0].trim();
|
||||||
|
var url = parts[1].trim();
|
||||||
|
|
||||||
|
if ($('#apiName').val() === "" && args.eaiSvcDesc) {
|
||||||
|
$('#apiName').val(args.eaiSvcDesc);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#apiUrl').val() === "" && url) {
|
||||||
|
$('#apiUrl').val(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (method) {
|
||||||
|
$('#apiMethod').val(method);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#apiContentType').val() === "" && args.contentType) {
|
||||||
|
$('#apiContentType').val(method);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
console.error('AJAX error:', e); // Log any errors
|
console.error('AJAX error:', e); // Log any errors
|
||||||
|
|||||||
@@ -248,6 +248,7 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
String stdKey = stdMessageUI.getBzwkSvcKeyName();
|
String stdKey = stdMessageUI.getBzwkSvcKeyName();
|
||||||
String inboundRestPath = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_URL_DELIMITER);
|
String inboundRestPath = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_URL_DELIMITER);
|
||||||
apiInterfaceUI.setInboundRestPath(inboundRestPath);
|
apiInterfaceUI.setInboundRestPath(inboundRestPath);
|
||||||
|
apiInterfaceUI.setApiFullPath(standardMessageInfo.getApifullpath());
|
||||||
|
|
||||||
apiInterfaceUI.setStandardMessageItems(stdMessageUI.getStandardMessageItems());
|
apiInterfaceUI.setStandardMessageItems(stdMessageUI.getStandardMessageItems());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user