Merge remote-tracking branch 'origin/jenkins_with_weblogic' of C:/eactive/bundle/bundles/20260110/eapim-admin_incremental_2025-12-15.bundle into jenkins_with_weblogic
This commit is contained in:
@@ -0,0 +1,130 @@
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@ include file="/jsp/common/include/localemessage.jsp" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "No-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
<script language="javascript" >
|
||||
var url = '<c:url value="/onl/admin/authoutbound/outboundFixedCredentialMan.json" />';
|
||||
var url_view = '<c:url value="/onl/admin/authoutbound/outboundFixedCredentialMan.view" />';
|
||||
|
||||
$(document).ready(function() {
|
||||
var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
|
||||
$('#grid').jqGrid({
|
||||
datatype:"json",
|
||||
mtype: 'POST',
|
||||
url: url,
|
||||
postData : gridPostData,
|
||||
colNames:['어댑터 그룹 명',
|
||||
'고정토큰',
|
||||
'사용여부',
|
||||
'생성일시',
|
||||
'수정일시',
|
||||
],
|
||||
colModel:[
|
||||
{ name : 'adapterGroupName', align:'center', sortable:false, width:'60' },
|
||||
{ name : 'clientSecret', align:'left' },
|
||||
{ name : 'useYn', align:'center', width:'40' },
|
||||
{ name : 'createdAt', align:'center', width:'40' },
|
||||
{ name : 'updatedAt', align:'center', width:'40' }
|
||||
],
|
||||
jsonReader: {
|
||||
repeatitems:false
|
||||
},
|
||||
pager : $('#pager'),
|
||||
page : '${param.page}',
|
||||
rowNum : '${rmsDefaultRowNum}',
|
||||
height: $("#container").height(),
|
||||
autowidth: true,
|
||||
viewrecords: true,
|
||||
rowList : eval('[${rmsDefaultRowList}]'),
|
||||
gridComplete:function (d){
|
||||
var colModel = $(this).getGridParam("colModel");
|
||||
for(var i = 0 ; i< colModel.length; i++){
|
||||
$(this).setColProp(colModel[i].name, {sortable : false}); //그리드 헤더 화살표 삭제(정렬X)
|
||||
}
|
||||
|
||||
},
|
||||
ondblClickRow: function(rowId) {
|
||||
var rowData = $(this).getRowData(rowId);
|
||||
var adapterGroupName = rowData['adapterGroupName'];
|
||||
var url2 = url_view;
|
||||
url2 += '?cmd=DETAIL';
|
||||
url2 += '&page='+$(this).getGridParam("page");
|
||||
url2 += '&returnUrl='+getReturnUrl();
|
||||
url2 += '&menuId='+'${param.menuId}';
|
||||
//key값
|
||||
url2 += '&adapterGroupName='+adapterGroupName;
|
||||
goNav(url2);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
resizeJqGridWidth('grid','content_middle','1000');
|
||||
|
||||
$("#btn_search").click(function(){
|
||||
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
|
||||
$("#grid").setGridParam({ postData: postData ,page : "1" }).trigger("reloadGrid");
|
||||
});
|
||||
|
||||
$("#btn_new").click(function(){
|
||||
var url2 = url_view;
|
||||
url2 += '?cmd=DETAIL';
|
||||
url2 += '&page='+$("#grid").getGridParam("page");
|
||||
url2 += '&returnUrl='+getReturnUrl();
|
||||
url2 += '&menuId='+'${param.menuId}';
|
||||
|
||||
goNav(url2);
|
||||
});
|
||||
|
||||
$("input[name^=search]").keydown(function(key){
|
||||
if (key.keyCode == 13){
|
||||
$("#btn_search").click();
|
||||
}
|
||||
});
|
||||
|
||||
buttonControl();
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="right_box">
|
||||
<div class="content_top">
|
||||
<ul class="path">
|
||||
<li><a href="#">${rmsMenuPath}</a></li>
|
||||
</ul>
|
||||
</div><!-- end content_top -->
|
||||
<div class="content_middle" id="content_middle">
|
||||
<div class="search_wrap">
|
||||
<button type="button" class="cssbtn" id="btn_new" level="W" ><i class="material-icons">add</i> <%= localeMessage.getString("button.new") %></button>
|
||||
<button type="button" class="cssbtn" id="btn_search" level="R"><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %></button>
|
||||
</div>
|
||||
<div class="title" id="title" >${rmsMenuName}</div>
|
||||
|
||||
<table class="search_condition" cellspacing=0;>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:180px;"><%= localeMessage.getString("adapter.adptrBzwkGroupName") %></th>
|
||||
<td><input type="text" name="searchAdapterGroupName" value="${param.searchAdapterGroupName}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table id="grid" ></table>
|
||||
<div id="pager"></div>
|
||||
</div><!-- end content_middle -->
|
||||
</div><!-- end right_box -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
|
||||
<%@ include file="/jsp/common/include/localemessage.jsp" %>
|
||||
<%
|
||||
response.setHeader("Pragma", "No-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
|
||||
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
|
||||
<link href="<c:url value="/addon/bootstrap-5.3.2/css/bootstrap.min.css"/>" rel="stylesheet" />
|
||||
<script src="<c:url value="/addon/bootstrap-5.3.2/js/bootstrap.bundle.min.js"/>"></script>
|
||||
<link href="<c:url value="/addon/select2-4.1.0/css/select2.min.css"/>" rel="stylesheet"/>
|
||||
<link href="<c:url value="/addon/select2-4.1.0/css/select2-bootstrap.min.css"/>" rel="stylesheet"/>
|
||||
<script src="<c:url value="/addon/select2-4.1.0/js/select2.min.js"/>"></script>
|
||||
<link href="<c:url value="/addon/bootstrap5-toggle-5.0.6/css/bootstrap5-toggle.min.css"/>" rel="stylesheet" />
|
||||
<script src="<c:url value="/addon/bootstrap5-toggle-5.0.6/js/bootstrap5-toggle.jquery.min.js"/>"></script>
|
||||
<link href="<c:url value="/addon/bootstrap-icons-1.11.3/bootstrap-icons.min.css"/>" rel="stylesheet" />
|
||||
<script src="<c:url value="/addon/jquery-validation-1.19.5/jquery.validate.min.js"/>"></script>
|
||||
<script src="<c:url value="/addon/jquery-validation-1.19.5/localization/messages_ko.min.js"/>"></script>
|
||||
<script src="<c:url value="/addon/jquery-confirm/jquery-confirm.min.js"/>"></script>
|
||||
<link href="<c:url value="/addon/jquery-confirm/jquery-confirm.min.css"/>" rel="stylesheet"/>
|
||||
|
||||
<script language="javascript">
|
||||
var url = '<c:url value="/onl/admin/authoutbound/outboundFixedCredentialMan.json" />';
|
||||
var url_view = '<c:url value="/onl/admin/authoutbound/outboundFixedCredentialMan.view" />';
|
||||
var isDetail = false;
|
||||
|
||||
$.fn.select2.defaults.set( "theme", "bootstrap" );
|
||||
function init(key, callback) {
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url:url,
|
||||
dataType:"json",
|
||||
data:{cmd: 'LIST_DETAIL_COMBO'},
|
||||
success:function(json){
|
||||
new makeOptions("ADPTRBZWKGROUPNAME","ADPTRBZWKGROUPDESC").setObj($("select[name=adapterGroupName]")).setFormat(codeName3OptionFormat).setNoValueInclude(true).setData(json.toList).rendering();
|
||||
$('#adapterGroupName').select2();
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback(key);
|
||||
}
|
||||
},
|
||||
error:function(e){
|
||||
alert(e.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function detail(key) {
|
||||
$("input[name=grantType]").attr('readonly',true);
|
||||
if (!isDetail){
|
||||
$("input[name=grantType]").val('fixed_token');
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: {
|
||||
cmd: 'DETAIL',
|
||||
adapterGroupName: key
|
||||
},
|
||||
success: function (json) {
|
||||
var data = json;
|
||||
$('#adapterGroupName').attr("readonly", "readonly");
|
||||
$("select[name=adapterGroupName]").val(data["adapterGroupName"]).trigger('change');
|
||||
$("#ajaxForm input,#ajaxForm textarea").each(function(){
|
||||
var name = $(this).attr("name");
|
||||
var tag = $(this).prop("tagName").toLowerCase();
|
||||
$(tag+"[name="+name+"]").val(data[name.toLowerCase()]);
|
||||
if(data[name]){
|
||||
$(tag+"[name="+name+"]").val(data[name]);
|
||||
}
|
||||
});
|
||||
if('Y' == data.useYn){
|
||||
$('#toggleUseYn').bootstrapToggle('on');
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
alert(e.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var returnUrl = getReturnUrlForReturn();
|
||||
var key = "${param.adapterGroupName}";
|
||||
|
||||
if (key != "" && key != "null") {
|
||||
isDetail = true;
|
||||
}
|
||||
|
||||
init(key, detail);
|
||||
|
||||
$("#btn_modify").click(function () {
|
||||
var postData = $('#ajaxForm').serializeArray();
|
||||
if (isDetail) {
|
||||
postData.push({
|
||||
name: "cmd",
|
||||
value: "UPDATE"
|
||||
});
|
||||
|
||||
postData.push({
|
||||
name: "intervalSec",
|
||||
value: 0
|
||||
});
|
||||
|
||||
} else {
|
||||
postData.push({
|
||||
name: "cmd",
|
||||
value: "INSERT"
|
||||
});
|
||||
|
||||
postData.push({
|
||||
name: "intervalSec",
|
||||
value: 0
|
||||
});
|
||||
}
|
||||
const useYn = $('#toggleUseYn').prop('checked') ? 'Y' : 'N';
|
||||
postData.push({ name: "useYn" , value: useYn});
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: postData,
|
||||
success: function (args) {
|
||||
alert("<%= localeMessage.getString("common.saveMsg") %>");
|
||||
goNav(returnUrl);//LIST로 이동
|
||||
},
|
||||
error: function (e) {
|
||||
alert(e.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#btn_delete").click(function () {
|
||||
var postData = [{name: 'adapterGroupName', value: $('#adapterGroupName').val()}]
|
||||
postData.push({
|
||||
name: "cmd",
|
||||
value: "DELETE"
|
||||
});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: postData,
|
||||
success: function (args) {
|
||||
alert("<%= localeMessage.getString("common.deleteMsg") %>");
|
||||
goNav(returnUrl);//LIST로 이동
|
||||
},
|
||||
error: function (e) {
|
||||
alert(e.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#btn_previous").click(function () {
|
||||
goNav(returnUrl);//LIST로 이동
|
||||
});
|
||||
|
||||
$('#toggleClientSecret').click(function () {
|
||||
const inputType = $("#clientSecret").prop("type");
|
||||
if(inputType == 'password'){
|
||||
$("#clientSecret").prop("type", "text");
|
||||
$(this).css('color', 'red');
|
||||
}else{
|
||||
$("#clientSecret").prop("type", "password");
|
||||
$(this).css('color', 'rgb(65 125 200)');
|
||||
}
|
||||
});
|
||||
buttonControl(key);
|
||||
titleControl(key);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="right_box">
|
||||
<div class="content_top">
|
||||
<ul class="path">
|
||||
<li><a href="#">${rmsMenuPath}</a></li>
|
||||
</ul>
|
||||
</div><!-- end content_top -->
|
||||
<div class="content_middle" id="content_middle">
|
||||
<div class="search_wrap">
|
||||
<button type="button" class="cssbtn" id="btn_delete" level="W" status="DETAIL"><i class="material-icons">delete</i> <%= localeMessage.getString("button.delete") %></button>
|
||||
<button type="button" class="cssbtn" id="btn_modify" level="R" status="DETAIL,NEW"><i class="material-icons">save</i> <%= localeMessage.getString("button.modify") %></button>
|
||||
<button type="button" class="cssbtn" id="btn_previous" level="R" status="DETAIL,NEW"><i class="material-icons">arrow_back</i> <%= localeMessage.getString("button.previous") %></button>
|
||||
</div>
|
||||
<div class="title" id="title" >${rmsMenuName}</div>
|
||||
|
||||
<form id="ajaxForm">
|
||||
<fieldset class="groupbox-border" style="margin-top:0px !important">
|
||||
<div class="row mb-3">
|
||||
<legend class="groupbox-border">BASIC OPTIONS</legend>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="adapterGroupName"><span class="material-icons-outlined">outlet</span> 어댑터 명</label>
|
||||
<select id="adapterGroupName" class="form-control" name="adapterGroupName" style="width: 100%" required>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="grantType"><span class="material-icons-outlined">verified_user</span> Grant Type</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="grantType" name="grantType" required></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-5" style="display:none">
|
||||
<label for="url"><span class="material-icons-outlined">link</span> Url</label>
|
||||
<input type="text" class="form-control" id="url" name="url" required type="hidden" value="test"></input>
|
||||
</div>
|
||||
<div class="form-group col-md-1">
|
||||
<label for="toggleUseYn"><span class="material-icons">check_circle</span> 사용여부</label><br>
|
||||
<input type="checkbox" name="toggleUseYn" id="toggleUseYn" data-toggle="toggle" data-onstyle="success" data-on="사용" data-off="미사용" data-width="100" data-offstyle="secondary" data-style="ios" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3" style="display:none">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="clientId"><span class="material-icons-outlined">lock</span> Client ID</label>
|
||||
<input type="text" class="form-control" id="clientId" name="clientId" required type="hidden"></input>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="row mb-3">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="clientSecret"><span class="material-icons-outlined">key</span> fixed Token</label>
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" id="clientSecret" name="clientSecret" autocomplete="new-password" required></input>
|
||||
<span class="input-group-text">
|
||||
<span class="material-icons-outlined" style="cursor: pointer; font-size: 1.25em; padding-top: 3px; user-select: none;" id="toggleClientSecret">visibility</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<div class="form-group col-md-6" style="display:none">
|
||||
<label for="scope"><span class="material-icons-outlined">work</span> Scope(','로 구분)</label>
|
||||
<input type="text" class="form-control" id="scope" name="scope" required type="hidden"></input>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div><!-- end content_middle -->
|
||||
</div><!-- end right_box -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -705,11 +705,22 @@
|
||||
$("input[name=eaiSvcName]").val('${param.eaiSvcName }');
|
||||
|
||||
var rawDesc = '${param.eaiSvcDesc}';
|
||||
|
||||
// XSS filter 값 복구
|
||||
function decodeHTMLEntities(text) {
|
||||
if (!text) return "";
|
||||
var textArea = document.createElement('textarea');
|
||||
textArea.innerHTML = text;
|
||||
return textArea.value;
|
||||
}
|
||||
|
||||
var cleanDesc = decodeURIComponent(rawDesc);
|
||||
cleanDesc = decodeHTMLEntities(cleanDesc);
|
||||
|
||||
if (rawDesc && rawDesc !== "") {
|
||||
$("input[name=eaiSvcDesc]").val(decodeURIComponent(rawDesc));
|
||||
if (cleanDesc) {
|
||||
$("input[name=eaiSvcDesc]").val(cleanDesc);
|
||||
} else {
|
||||
$("input[name=eaiSvcDesc]").val("");
|
||||
$("input[name=eaiSvcDesc]").val("");
|
||||
}
|
||||
|
||||
//$("input[name=cnvsnDesc]").val('${param.cnvsnDesc }');
|
||||
|
||||
@@ -482,7 +482,6 @@
|
||||
|
||||
$("input[name^=search]").keydown(function (key) {
|
||||
if (key.keyCode == 13) {
|
||||
guidEvent();
|
||||
$("#btn_search").click();
|
||||
}
|
||||
});
|
||||
@@ -618,8 +617,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%=localeMessage.getString("tracking.eaisvcserno_tmp")%></th>
|
||||
<td><input type="text" name="searchEaiSvcSerno" value="${param.searchEaiSvcSerno}"></td>
|
||||
<th>API 명</th>
|
||||
<td><input type="text" name="searchEaiSvcDesc" value="${param.searchEaiSvcDesc}"></td>
|
||||
|
||||
<th><%=localeMessage.getString("tracking.logprcssserno")%></th>
|
||||
<td>
|
||||
<div >
|
||||
@@ -658,8 +658,11 @@
|
||||
</td> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%=localeMessage.getString("tracking.eaisvcserno_tmp")%></th>
|
||||
<td colspan="3"><input type="text" name="searchEaiSvcSerno" value="${param.searchEaiSvcSerno}"></td>
|
||||
|
||||
<th><%=localeMessage.getString("tracking.keymgtmsgctnt")%></th>
|
||||
<td colspan="5"><input type="text" name="searchKeyMgtMsgCtnt" value="${param.searchKeyMgtMsgCtnt}"></td>
|
||||
<td colspan="2"><input type="text" name="searchKeyMgtMsgCtnt" value="${param.searchKeyMgtMsgCtnt}"></td>
|
||||
|
||||
<%-- <th><%=localeMessage.getString("tracking.orgGUID")%></th>
|
||||
<td colspan="4"><input type="text" name="searchGuid" value="" maxlength="<%=DbTrackingService.GUID_LENGTH%>"></td> --%>
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
var eaiSvcSerno = urlParams.get("eaiSvcSerno");
|
||||
var logPrcssSerno = urlParams.get("logPrcssSerno");
|
||||
let fullMessageData;
|
||||
let layoutInfo = [];
|
||||
let bzwkdatatntInfo;
|
||||
|
||||
var eaiSvcCode = "";
|
||||
|
||||
@@ -198,6 +200,8 @@
|
||||
const isInboundWithoutNet = !json.GSTATSYSADPTRBZWKGROUPNAME.includes('NET');
|
||||
const isOutboundWithoutNet = !json.PSVSYSADPTRBZWKGROUPNAME.includes('NET');
|
||||
fullMessageData = json.FULLMESSAGEDATA;
|
||||
layoutInfo = json.standardHeader;
|
||||
bzwkdatatntInfo = json.BZWKDATATNT;
|
||||
|
||||
if((isInboundPart && isInboundWithoutNet) || (isOutboundPart && isOutboundWithoutNet)){
|
||||
selectHttpLog(url, prcsDate, json.EAISVCSERNO.trim(), logPrcssSerno);
|
||||
@@ -353,6 +357,10 @@
|
||||
|
||||
$('#btn_pretty_body').click(function(){
|
||||
const syntax = $('#selectBodySyntax').val();
|
||||
|
||||
// FLAT view를 위해 생성된 데이터 -> 기존 업무데이터
|
||||
bodyCodeEditor.setValue(bzwkdatatntInfo);
|
||||
|
||||
const value = bodyCodeEditor.getValue();
|
||||
let prettyValue = value;
|
||||
if(syntax === 'JSN'){
|
||||
@@ -392,6 +400,7 @@
|
||||
$('#btn_pretty_body').css('display', 'block');
|
||||
bodyCodeEditor.setOption("mode", "application/json");
|
||||
}else if(syntax === 'XML'){
|
||||
$('#btn_pretty_body').css('display', 'block');
|
||||
$('#btn_pretty_body').css('display', 'block');
|
||||
bodyCodeEditor.setOption("mode", "application/xml");
|
||||
}else{
|
||||
@@ -789,6 +798,78 @@ $(document).ready(function() {
|
||||
alert('전체 전문 복사되었습니다.')
|
||||
});
|
||||
|
||||
// FLAT 데이터를 전문정보로 잘라서 JSON / XML VIEW 로 볼 수 있는 버튼
|
||||
$('#btn_convert_view').click(function() {
|
||||
var type = $('select[id=selectBodySyntax]').val();
|
||||
|
||||
if (!fullMessageData || !layoutInfo) {
|
||||
alert("데이터가 없습니다.");
|
||||
return;
|
||||
}
|
||||
|
||||
parserCommon(fullMessageData, layoutInfo, type);
|
||||
});
|
||||
|
||||
function parserCommon(flatData, layoutInfo, type) {
|
||||
var cursor = 0;
|
||||
var parsedList = [];
|
||||
|
||||
layoutInfo.forEach(function(field) {
|
||||
var fieldLen = field.length;
|
||||
|
||||
if (fieldLen > 0) {
|
||||
var rawValue = flatData.substring(cursor, cursor + fieldLen);
|
||||
|
||||
parsedList.push({
|
||||
engName: field.name,
|
||||
korName: field.desc || field.name,
|
||||
value: rawValue // trim 금지.
|
||||
});
|
||||
|
||||
cursor += fieldLen;
|
||||
}
|
||||
});
|
||||
|
||||
// CodeMirror 에디터에 값 세팅
|
||||
var finalString = "";
|
||||
|
||||
if (type == "JSN") {
|
||||
|
||||
var jsonResult = {};
|
||||
|
||||
parsedList.forEach(function(item) {
|
||||
jsonResult[item.engName] = {
|
||||
"한글명": item.korName,
|
||||
"값": item.value
|
||||
};
|
||||
});
|
||||
|
||||
finalString = JSON.stringify(jsonResult, null, 4);
|
||||
|
||||
} else if (type == "XML") {
|
||||
|
||||
var xmlResult = "<Root>\n";
|
||||
|
||||
parsedList.forEach(function(item) {
|
||||
var cleanTagName = item.korName.replace(/[^a-zA-Z0-9가-힣]/g, "");
|
||||
if (!cleanTagName) cleanTagName = item.engName;
|
||||
|
||||
xmlResult += "\t<" + cleanTagName + ">" + item.value + "</" + cleanTagName + ">\n";
|
||||
});
|
||||
xmlResult += "</Root>";
|
||||
|
||||
finalString = xmlResult;
|
||||
|
||||
} else {
|
||||
finalString = flatData;
|
||||
}
|
||||
|
||||
bodyCodeEditor.setValue(finalString);
|
||||
$('#selectBodySyntax').val(type).trigger('change');
|
||||
|
||||
// console.log("변환 완료:", parsedList);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -905,6 +986,9 @@ html,hbody {
|
||||
<td>
|
||||
<button type="button" class="cssbtn" id="btn_pretty_body" ><i class="material-icons">format_align_left</i> <%= localeMessage.getString("trackingDetail.btnMakePretty") %></button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="cssbtn" id="btn_convert_view" ><i class="material-icons">format_align_left</i>FLAT_View</button>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<span style="text-align: center;">
|
||||
<select id="selectBodySyntax" style="width:100px;">
|
||||
|
||||
Reference in New Issue
Block a user