API SPEC 신규일때 인터페이스 하면 값을 세팅
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
} else {
|
||||
buttonControl(false);
|
||||
}
|
||||
|
||||
initializeCodeMirror();
|
||||
initializeSummernote();
|
||||
}
|
||||
@@ -97,6 +98,7 @@
|
||||
|
||||
function detail(key) {
|
||||
// console.log('Before AJAX call, key:', key); // Log the key before the AJAX call
|
||||
debugger;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
@@ -150,6 +152,37 @@
|
||||
// console.log('After setting apiId, key:', key); // Log the key after setting apiId
|
||||
|
||||
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) {
|
||||
console.error('AJAX error:', e); // Log any errors
|
||||
|
||||
Reference in New Issue
Block a user