Merge branch 'jenkins_with_weblogic' into devs/sso
This commit is contained in:
@@ -640,7 +640,6 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
// 25.12.16 수정시 어댑터 리스트 자동저장
|
||||
alert("어댑터의 정보를 저장을 먼저 진행합니다.")
|
||||
var isSubSaveSuccess = ModifyPopCheckAndSave(true);
|
||||
|
||||
if (!isSubSaveSuccess) {
|
||||
|
||||
@@ -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>
|
||||
@@ -103,6 +103,14 @@
|
||||
init(key, detail);
|
||||
|
||||
$("#btn_modify").click(function () {
|
||||
// 필수값 체크
|
||||
var form = $('#ajaxForm')[0];
|
||||
|
||||
if (form.checkValidity() === false) {
|
||||
form.reportValidity();
|
||||
return;
|
||||
}
|
||||
|
||||
var postData = $('#ajaxForm').serializeArray();
|
||||
if (isDetail) {
|
||||
postData.push({
|
||||
|
||||
@@ -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;">
|
||||
|
||||
@@ -5,8 +5,6 @@ plugins {
|
||||
id 'idea'
|
||||
id 'war'
|
||||
id 'com.diffplug.eclipse.apt' version '3.41.1'
|
||||
id 'project-report'
|
||||
id 'checkstyle'
|
||||
}
|
||||
|
||||
group 'com.eactive'
|
||||
@@ -36,10 +34,6 @@ java {
|
||||
languageVersion = JavaLanguageVersion.of(8)
|
||||
}
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
toolVersion = '8.45.1'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
@@ -267,12 +261,4 @@ eclipse {
|
||||
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(Checkstyle) {
|
||||
reports {
|
||||
xml.required = false
|
||||
html.required = true
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.apim.obp;
|
||||
|
||||
import com.eactive.apim.portal.apprequest.entity.AppRequest;
|
||||
import com.eactive.apim.portal.apprequest.entity.QAppRequest;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIMessageEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.QEAIMessageEntity;
|
||||
import com.eactive.eai.data.entity.onl.unifbwk.QUnifBwkTp;
|
||||
@@ -222,34 +220,4 @@ public class ObpGwMetricJpaDAO {
|
||||
|
||||
return new UriMethodResult(uriMap, methodMap);
|
||||
}
|
||||
|
||||
/**
|
||||
* AppId 조회 (PTL_APP_REQUEST) - org_id로 조회
|
||||
*
|
||||
* @param orgIds 기관 ID 목록
|
||||
* @return 기관 ID → 앱 ID 맵
|
||||
*/
|
||||
public Map<String, String> selectAppIdsByOrgIds(Set<String> orgIds) {
|
||||
if (orgIds == null || orgIds.isEmpty()) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
QAppRequest appRequest = QAppRequest.appRequest;
|
||||
|
||||
List<Tuple> results = getQueryFactory()
|
||||
.select(appRequest.org.id, appRequest.id)
|
||||
.from(appRequest)
|
||||
.where(appRequest.org.id.in(orgIds))
|
||||
.fetch();
|
||||
|
||||
Map<String, String> result = new HashMap<>();
|
||||
for (Tuple tuple : results) {
|
||||
String orgId = tuple.get(appRequest.org.id);
|
||||
String appId = tuple.get(appRequest.id);
|
||||
if (orgId != null && appId != null) {
|
||||
result.put(orgId, appId);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+47
-21
@@ -8,12 +8,6 @@ import java.util.stream.Collectors;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.EAILog;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAILogId;
|
||||
import com.eactive.eai.data.entity.onl.logger.QEAILog;
|
||||
@@ -26,6 +20,12 @@ import com.querydsl.core.types.dsl.EntityPathBase;
|
||||
import com.querydsl.jpa.impl.JPAQuery;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
|
||||
@@ -43,26 +43,43 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
||||
|
||||
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
||||
|
||||
// Count Query
|
||||
JPAQuery<?> countQuery = new JPAQueryFactory(em)
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
|
||||
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, qeaiMessageEntity, countQuery);
|
||||
|
||||
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
|
||||
|
||||
long totalCount = query.select(qeaiLog.id.msgdpstyms.count()).fetchOne();
|
||||
long totalCount = countQuery.select(qeaiLog.id.msgdpstyms.count()).fetchOne();
|
||||
|
||||
if (totalCount == 0) {
|
||||
return new PageImpl<>(new ArrayList<>(), pageable, 0);
|
||||
}
|
||||
|
||||
// List Query 분리
|
||||
JPAQuery<?> listQuery = new JPAQueryFactory(em)
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname));
|
||||
|
||||
List<EAILogDto> list = query
|
||||
List<EAILogDto> list = listQuery
|
||||
// .select(Projections.constructor(EAILogDto.class, qeaiLog, qeaiMessageEntity.eaisvcdesc))
|
||||
.select(Projections.constructor(EAILogDto.class,
|
||||
qeaiLog.id, qeaiLog.trackasiskey1ctnt, qeaiLog.trackasiskey2ctnt, qeaiLog.keymgtmsgctnt,
|
||||
qeaiLog.eaisvcname, qeaiLog.extbizcd, qeaiLog.refkey, qeaiLog.clientname,
|
||||
qeaiLog.orgname, qeaiLog.msgprcssyms, qeaiLog.companycode, qeaiLog.eaierrctnt,
|
||||
qeaiLog.id,
|
||||
qeaiLog.trackasiskey1ctnt,
|
||||
qeaiLog.trackasiskey2ctnt,
|
||||
qeaiLog.keymgtmsgctnt,
|
||||
qeaiLog.eaisvcname,
|
||||
qeaiLog.extbizcd,
|
||||
qeaiLog.refkey,
|
||||
qeaiLog.clientname,
|
||||
qeaiLog.orgname,
|
||||
qeaiLog.msgprcssyms,
|
||||
qeaiLog.companycode,
|
||||
qeaiLog.eaierrctnt,
|
||||
qeaiMessageEntity.eaisvcdesc))
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eaisvcname))
|
||||
.orderBy(qeaiLog.id.msgdpstyms.desc(), qeaiLog.id.eaisvcserno.asc(), qeaiLog.id.logprcssserno.asc())
|
||||
.limit(1000)
|
||||
.fetch();
|
||||
@@ -73,9 +90,15 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
public Map<String, Long> countDetailedTransactions(Class<? extends EAILog> clazz, EAILogSearch eaiLogSearch) {
|
||||
QEAILog qeaiLog = QEAILog.eAILog;
|
||||
EntityPathBase<?> entityPathBase = new EntityPathBase<>(clazz, qeaiLog.getMetadata().getName());
|
||||
|
||||
QEAIMessageEntity qeaiMessageEntity = QEAIMessageEntity.eAIMessageEntity;
|
||||
|
||||
JPAQuery<?> query = new JPAQueryFactory(em).from(entityPathBase);
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, query);
|
||||
JPAQuery<?> query = new JPAQueryFactory(em)
|
||||
.from(entityPathBase)
|
||||
.leftJoin(qeaiMessageEntity)
|
||||
.on(qeaiLog.eaisvcname.eq(qeaiMessageEntity.eAIMessageEntity.eaisvcname));
|
||||
|
||||
appendConditions(eaiLogSearch, qeaiLog, entityPathBase, qeaiMessageEntity, query);
|
||||
|
||||
List<Tuple> results = query.select(
|
||||
qeaiLog.id.logprcssserno, // 로그 처리 상태
|
||||
@@ -91,8 +114,7 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
return reult;
|
||||
}
|
||||
|
||||
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, JPAQuery<?> query) {
|
||||
|
||||
private void appendConditions(EAILogSearch eaiLogSearch, QEAILog qeaiLog, EntityPathBase<?> entityPathBase, QEAIMessageEntity qeaiMessageEntity, JPAQuery<?> query) {
|
||||
if (StringUtils.equalsIgnoreCase(eaiLogSearch.getAuthChk(), "Y")) {
|
||||
QUserBusiness qUserBusiness = QUserBusiness.userBusiness;
|
||||
JPAQuery<String> subQuery = new JPAQueryFactory(em)
|
||||
@@ -127,6 +149,10 @@ public class EAILogRepositoryImpl implements EAILogRepository {
|
||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcName())) {
|
||||
query.where(qeaiLog.eaisvcname.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcName()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchEaiSvcDesc())) {
|
||||
query.where(qeaiMessageEntity.eaisvcdesc.containsIgnoreCase(eaiLogSearch.getSearchEaiSvcDesc()));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(eaiLogSearch.getSearchKeyMgtMsgCtnt())) {
|
||||
query.where(qeaiLog.keymgtmsgctnt.contains(eaiLogSearch.getSearchKeyMgtMsgCtnt()));
|
||||
|
||||
@@ -15,6 +15,7 @@ public class EAILogSearch {
|
||||
private String searchEaiBzwkDstcd;
|
||||
private String searchEaiSvcSerno;
|
||||
private String searchEaiSvcName;
|
||||
private String searchEaiSvcDesc;
|
||||
private String searchKeyMgtMsgCtnt;
|
||||
private String searchTrackAsisKey1Ctnt;
|
||||
private String searchTrackAsisKey2Ctnt;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.eactive.eai.rms.onl.apim.obp;
|
||||
|
||||
import com.eactive.apim.portal.apprequest.entity.AppRequest;
|
||||
import com.eactive.apim.portal.apprequest.repository.AppRequestRepository;
|
||||
import com.eactive.apim.portal.obp.entity.ObpGwMetric;
|
||||
import com.eactive.eai.rms.common.base.BaseService;
|
||||
import com.eactive.eai.rms.common.datasource.DataSourceContextHolder;
|
||||
@@ -44,10 +46,14 @@ public class ObpGwMetricManService extends BaseService {
|
||||
|
||||
private final ObpGwMetricJpaDAO obpGwMetricJpaDAO;
|
||||
private final ObpGwMetricService obpGwMetricService;
|
||||
private final AppRequestRepository appRequestRepository;
|
||||
|
||||
public ObpGwMetricManService(ObpGwMetricJpaDAO obpGwMetricJpaDAO, ObpGwMetricService obpGwMetricService) {
|
||||
public ObpGwMetricManService(ObpGwMetricJpaDAO obpGwMetricJpaDAO,
|
||||
ObpGwMetricService obpGwMetricService,
|
||||
AppRequestRepository appRequestRepository) {
|
||||
this.obpGwMetricJpaDAO = obpGwMetricJpaDAO;
|
||||
this.obpGwMetricService = obpGwMetricService;
|
||||
this.appRequestRepository = appRequestRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,7 +180,8 @@ public class ObpGwMetricManService extends BaseService {
|
||||
.map(ObpGwMetricVO::getOrgId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toSet());
|
||||
Map<String, String> appIdMap = obpGwMetricJpaDAO.selectAppIdsByOrgIds(orgIds);
|
||||
// AppRequestRepository(@EMSDataSource)를 사용하여 MONITORING 스키마에서 조회
|
||||
Map<String, String> appIdMap = selectAppIdsByOrgIds(orgIds);
|
||||
|
||||
int insertCount = 0;
|
||||
int updateCount = 0;
|
||||
@@ -290,4 +297,30 @@ public class ObpGwMetricManService extends BaseService {
|
||||
.map(ObpGwMetricAfterDTO::from)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* org.id 목록으로 AppRequest를 조회하여 orgId -> appId 맵 반환
|
||||
*
|
||||
* <p>AppRequestRepository(@EMSDataSource)를 사용하여 MONITORING 스키마에서 조회</p>
|
||||
*
|
||||
* @param orgIds 기관 ID 목록
|
||||
* @return orgId -> appId 맵
|
||||
*/
|
||||
private Map<String, String> selectAppIdsByOrgIds(Set<String> orgIds) {
|
||||
if (orgIds == null || orgIds.isEmpty()) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
List<AppRequest> appRequests = appRequestRepository.findByOrg_IdIn(orgIds);
|
||||
|
||||
Map<String, String> result = new HashMap<>();
|
||||
for (AppRequest appRequest : appRequests) {
|
||||
String orgId = appRequest.getOrg() != null ? appRequest.getOrg().getId() : null;
|
||||
String appId = appRequest.getId();
|
||||
if (orgId != null && appId != null) {
|
||||
result.put(orgId, appId);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.eactive.eai.rms.onl.manage.authoutbound;
|
||||
|
||||
import com.eactive.eai.agent.command.CommonCommand;
|
||||
import com.eactive.eai.rms.common.base.OnlBaseAnnotationController;
|
||||
import com.eactive.eai.rms.common.login.SessionManager;
|
||||
import com.eactive.eai.rms.common.vo.GridResponse;
|
||||
import com.eactive.eai.rms.onl.manage.comm.property.PropertyGroupUI;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Controller
|
||||
public class OutboundFixedCredentialController extends OnlBaseAnnotationController {
|
||||
enum CommandType { RELOAD, DELETE };
|
||||
|
||||
public static final Log logger = LogFactory.getLog(OutboundFixedCredentialController.class);
|
||||
|
||||
@Autowired
|
||||
OutboundOAuthCredentialManService service ;
|
||||
|
||||
@GetMapping(value = "/onl/admin/authoutbound/outboundFixedCredentialMan.view")
|
||||
public void view() {
|
||||
}
|
||||
|
||||
@GetMapping(value = "/onl/admin/authoutbound/outboundFixedCredentialMan.view", params = "cmd=DETAIL")
|
||||
public String viewDetail() {
|
||||
return "/onl/admin/authoutbound/outboundFixedCredentialManDetail";
|
||||
}
|
||||
|
||||
@PostMapping(value= "/onl/admin/authoutbound/outboundFixedCredentialMan.json", params = "cmd=LIST")
|
||||
public ResponseEntity<GridResponse<OutboundOAuthCredentialUI>>selectList(String searchAdapterGroupName, Pageable pageable) {
|
||||
Page<OutboundOAuthCredentialUI> page = service.selectList(pageable, searchAdapterGroupName);
|
||||
Page<OutboundOAuthCredentialUI> filteredPage =
|
||||
new PageImpl<>(
|
||||
page.filter(i -> "fixed_token".equals(i.getGrantType()))
|
||||
.stream()
|
||||
.collect(Collectors.toList()),
|
||||
pageable,
|
||||
page.getTotalElements() // 또는 filtered.size()
|
||||
);
|
||||
return ResponseEntity.ok(new GridResponse<>(filteredPage));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/onl/admin/authoutbound/outboundFixedCredentialMan.json", params = "cmd=DETAIL")
|
||||
public ResponseEntity<OutboundOAuthCredentialUI> selectDetail(String adapterGroupName) throws Exception {
|
||||
OutboundOAuthCredentialUI outboundOAuthCredentialUI = service.selectDetail(adapterGroupName);
|
||||
return ResponseEntity.ok(outboundOAuthCredentialUI);
|
||||
}
|
||||
|
||||
@PostMapping(value= "/onl/admin/authoutbound/outboundFixedCredentialMan.json",params = "cmd=LIST_DETAIL_COMBO")
|
||||
public ResponseEntity<Map<String, Object>> selectDetailCombo() throws Exception {
|
||||
Map<String, Object> map = service.selectDetailCombo();
|
||||
return ResponseEntity.ok(map);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/onl/admin/authoutbound/outboundFixedCredentialMan.json", params = "cmd=INSERT")
|
||||
public ResponseEntity<Void> insert(OutboundOAuthCredentialUI outboundOAuthCredentialUI) throws Exception {
|
||||
service.insert(outboundOAuthCredentialUI);
|
||||
commandOAuthInfo(CommandType.RELOAD, outboundOAuthCredentialUI.getAdapterGroupName());
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping(value = "/onl/admin/authoutbound/outboundFixedCredentialMan.json", params = "cmd=UPDATE")
|
||||
public ResponseEntity<Void> update(OutboundOAuthCredentialUI outboundOAuthCredentialUI) throws Exception {
|
||||
service.update(outboundOAuthCredentialUI);
|
||||
commandOAuthInfo(CommandType.RELOAD, outboundOAuthCredentialUI.getAdapterGroupName());
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
@PostMapping(value = "/onl/admin/authoutbound/outboundFixedCredentialMan.json", params = "cmd=DELETE")
|
||||
public ResponseEntity<Void> delete(String adapterGroupName) throws Exception {
|
||||
service.delete(adapterGroupName);
|
||||
commandOAuthInfo(CommandType.DELETE, adapterGroupName);
|
||||
return ResponseEntity.ok().build();
|
||||
}
|
||||
|
||||
private boolean commandOAuthInfo(CommandType commandType, String adapterGroupName) {
|
||||
String commandClass ;
|
||||
|
||||
if(CommandType.DELETE == commandType){
|
||||
commandClass = "com.eactive.eai.agent.authoutbound.RemoveOutboundOAuthCredentialCommand";
|
||||
}else{
|
||||
commandClass = "com.eactive.eai.agent.authoutbound.ReloadOutboundOAuthCredentialCommand";
|
||||
}
|
||||
logger.warn("Command:" + commandType + ", Target: " + adapterGroupName);
|
||||
CommonCommand command = new CommonCommand(commandClass, adapterGroupName);
|
||||
try {
|
||||
agentUtilService.broadcast(command);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Command error", e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user