Merge remote-tracking branch 'origin/jenkins_with_weblogic' into devs/bap-monitoring
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%
|
||||
String systemColor = System.getProperty("theme.color");
|
||||
String range = (String)request.getParameter("range");
|
||||
String color = (String)request.getParameter("color");
|
||||
String change = (String)request.getParameter("change");
|
||||
if(color == null || color.length() == 0) color= systemColor;
|
||||
|
||||
if("all".equals(range)) {
|
||||
System.setProperty("theme.color", color);
|
||||
}
|
||||
%>
|
||||
<c:set var="themeColor" value="<%= color %>" scope="session" />
|
||||
<html>
|
||||
<head>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||
<META HTTP-EQUIV="Cache-control" CONTENT="no-cache">
|
||||
<title>Change Theme Color</title>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/css/web_ui.css"/>"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/css/theme_${themeColor}.css"/>" />
|
||||
<script language="javascript" src="<c:url value="/js/jquery-1.12.1.min.js"/>"></script>
|
||||
<script language="javascript" src="<c:url value="/js/prefixfree.min.js"/>"></script>
|
||||
<script language="JavaScript">
|
||||
<% if( "change".equals(change) ) { %>
|
||||
// window.opener.location.reload();
|
||||
alert("color changed !");
|
||||
<% } %>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table width="100%" height="100%" >
|
||||
<tr>
|
||||
<td valign="middle" width="100%">
|
||||
<form name="form" action="<c:url value="/color.jsp"/>" method="get">
|
||||
<table width="200px" align="center" cellspacing="0" border="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>Theme Color</td>
|
||||
<td align="center" valign="middle" height="25px">
|
||||
<select name="color">
|
||||
<option value="black" <%= "black".equals(color)?"selected":"" %> >black</option>
|
||||
<option value="blue" <%= "blue".equals(color)?"selected":"" %> >blue</option>
|
||||
<option value="green" <%= "green".equals(color)?"selected":"" %> >green</option>
|
||||
<option value="orange" <%= "orange".equals(color)?"selected":"" %> >orange</option>
|
||||
<option value="yellow" <%= "yellow".equals(color)?"selected":"" %> >yellow</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Range</td>
|
||||
<td align="center" valign="middle" height="25px">
|
||||
<select name="range">
|
||||
<option value="current" <%= "current".equals(range)?"selected":"" %> >current</option>
|
||||
<option value="all" <%= "all".equals(range)?"selected":"" %> >all</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="2" ><hr width="200"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center" height="25px">
|
||||
<input type="submit" name="change" value="change">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"><a href="#" onClick="history.back()"><img
|
||||
src="/monitoring/common/images/btn6_previous.gif"
|
||||
src="/monitoring/common/image/btn6_previous.gif"
|
||||
width="79" height="22" border="0"></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -427,7 +427,7 @@
|
||||
if('Y' == data.transformYn){
|
||||
$('#toggleTransformYn').bootstrapToggle('on');
|
||||
}
|
||||
if('Y' == data.sinYn){
|
||||
if('Y' == data.simYn){
|
||||
$('#toggleSimYn').bootstrapToggle('on');
|
||||
}
|
||||
if('Y' == data.apiEnabledYn){
|
||||
@@ -1317,6 +1317,7 @@
|
||||
<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_api_spec" level="R" status="DETAIL,NEW"><i class="material-icons">description</i> API 스펙</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>
|
||||
<%-- <button type="button" class="cssbtn" id="btn_excel_export" level="R" status="DETAIL"><i class="material-icons">table_view</i> <%= localeMessage.getString("button.excel") %></button> --%>
|
||||
</div>
|
||||
<div class="title" id="title" style="font-size:1.4em">${rmsMenuName}</div>
|
||||
<form id="ajaxForm"
|
||||
@@ -1360,7 +1361,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<div class="form-group col-md-5">
|
||||
<label for="eaiSvcDesc"><span class="material-icons-outlined">chat</span> 설명</label>
|
||||
<input type="text" class="form-control" id="eaiSvcDesc" name="eaiSvcDesc" required></input>
|
||||
</div>
|
||||
@@ -1368,6 +1369,10 @@
|
||||
<label for="toggleTransformYn"><span class="material-icons">account_tree</span> 전문변환</label><br>
|
||||
<input type="checkbox" name="toggleTransformYn" id="toggleTransformYn" data-toggle="toggle" data-onstyle="success" data-on="사용" data-off="미사용" data-width="100" data-offstyle="secondary" data-style="ios" />
|
||||
</div>
|
||||
<div class="form-group col-md-1">
|
||||
<label for="toggleSimYn"><span class="material-icons" >science</span> 가상응답</label><br>
|
||||
<input type="checkbox" name="toggleSimYn" id="toggleSimYn" data-toggle="toggle" data-onstyle="success" data-on="사용" data-off="미사용" data-width="100" data-offstyle="secondary" data-style="ios"/>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -1424,14 +1429,17 @@
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="eaiBzwkDstcd">요청/응답 구분</label><br>
|
||||
<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
|
||||
<input type="radio" class="btn-check" name="btnRadioReqRes" id="btnTypeRequest" x-model="apiInterface.requestType"
|
||||
value="S" :disabled="apiInterface.syncAsyncType !== 'async' || $store.formState.isReqResDisabled" checked>
|
||||
<label class="btn btn-outline-primary" for="btnTypeRequest"><i class="bi bi-arrow-bar-right"></i> 요청</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnRadioReqRes" id="btnTypeResponse" x-model="apiInterface.requestType"
|
||||
<div class="btn-group" role="group" aria-label="Basic radio toggle button group"
|
||||
x-effect="if (apiInterface.syncAsyncType !== 'async') apiInterface.requestType = 'S'">
|
||||
<input type="radio" class="btn-check" name="btnRadioReqRes" id="btnTypeRequest"
|
||||
x-model="apiInterface.requestType"
|
||||
value="S" :disabled="apiInterface.syncAsyncType !== 'async' || $store.formState.isReqResDisabled">
|
||||
<label class="btn btn-outline-primary" for="btnTypeRequest"><i class="bi bi-arrow-bar-right"></i> 요청</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnRadioReqRes" id="btnTypeResponse"
|
||||
x-model="apiInterface.requestType"
|
||||
value="R" :disabled="apiInterface.syncAsyncType !== 'async' || $store.formState.isReqResDisabled">
|
||||
<label class="btn btn-outline-primary" for="btnTypeResponse"><i class="bi bi-arrow-bar-left"></i> 응답</label>
|
||||
<label class="btn btn-outline-primary" for="btnTypeResponse"><i class="bi bi-arrow-bar-left"></i> 응답</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
@@ -1702,8 +1710,11 @@
|
||||
응답 수신 메소드
|
||||
</label>
|
||||
<select id="outboundResponseHttpMethod" class="form-select" name="outboundResponseHttpMethod" disabled>
|
||||
<option value="get">GET</option>
|
||||
<option value="post">POST</option>
|
||||
<option value="post">POST</option>
|
||||
<option value="get">GET</option>
|
||||
<option value="put">PUT</option>
|
||||
<option value="patch">PATCH</option>
|
||||
<option value="delete">DELETE</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-8">
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<%@ page contentType="text/html;charset=utf-8"%>
|
||||
<%@page import="ch.qos.logback.core.*"%>
|
||||
<%@page import="ch.qos.logback.classic.*"%>
|
||||
<%@page import="org.slf4j.*"%>
|
||||
<%@page import="java.util.*"%>
|
||||
<%
|
||||
|
||||
String loggerName = request.getParameter("loggerName");
|
||||
String slevel = request.getParameter("level");
|
||||
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
|
||||
if (loggerName != null && !"".equals(loggerName) && slevel != null && !"".equals(slevel)){
|
||||
Level level = Level.ERROR;
|
||||
if ("DEBUG".equals(slevel)){
|
||||
level = Level.DEBUG;
|
||||
}else if ("INFO".equals(slevel)){
|
||||
level = Level.INFO;
|
||||
}else if ("WARN".equals(slevel)){
|
||||
level = Level.WARN;
|
||||
}else if ("ERROR".equals(slevel)){
|
||||
level = Level.ERROR;
|
||||
}else if ("TRACE".equals(slevel)){
|
||||
level = Level.TRACE;
|
||||
}
|
||||
|
||||
lc.getLogger(loggerName).setLevel(level);
|
||||
%>
|
||||
<%=loggerName %> 의 로그 level이 <%=slevel %> 로 변경되었습니다.
|
||||
<%
|
||||
}
|
||||
|
||||
List<ch.qos.logback.classic.Logger> logs = lc.getLoggerList();;
|
||||
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
function changeSessionKey(selectBox) {
|
||||
var loggerName = selectBox.title;
|
||||
var level = selectBox.value;
|
||||
document.frm.loggerName.value=loggerName;
|
||||
document.frm.level.value=level;
|
||||
document.frm.submit();
|
||||
}
|
||||
</script>
|
||||
<form name="frm" action="">
|
||||
<input type=hidden name="loggerName" />
|
||||
<input type=hidden name="level" />
|
||||
|
||||
</form>
|
||||
<table>
|
||||
<%
|
||||
ArrayList<String> al = new ArrayList<String>();
|
||||
for(ch.qos.logback.classic.Logger log : logs){
|
||||
if (log.getLevel() != null){
|
||||
al.add(log.getName());
|
||||
}
|
||||
}
|
||||
al.sort(null);
|
||||
for(String name : al){
|
||||
ch.qos.logback.classic.Logger l = lc.getLogger(name);
|
||||
%>
|
||||
<tr>
|
||||
<td><%=l.getName() %></td><td><select name="level" onchange="changeSessionKey(this)" title="<%=l.getName()%>">
|
||||
<option value=TRACE <%=Level.TRACE==l.getLevel()?"selected":"" %>>
|
||||
TRACE
|
||||
</option>
|
||||
<option value="DEBUG" <%=Level.DEBUG==l.getLevel()?"selected":"" %>>
|
||||
DEBUG
|
||||
</option>
|
||||
<option value="INFO" <%=Level.INFO==l.getLevel()?"selected":"" %>>
|
||||
INFO
|
||||
</option>
|
||||
<option value="WARN" <%=Level.WARN==l.getLevel()?"selected":"" %>>
|
||||
WARN
|
||||
</option>
|
||||
<option value="ERROR" <%=Level.ERROR==l.getLevel()?"selected":"" %>>
|
||||
ERROR
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
@@ -0,0 +1,409 @@
|
||||
<%@page import="com.eactive.eai.rms.common.datasource.DataSourceTypeManager"%>
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||
<%@ page import="java.io.*,
|
||||
java.util.*,
|
||||
javax.xml.parsers.*,
|
||||
org.w3c.dom.*,
|
||||
javax.xml.xpath.*,
|
||||
java.sql.*,
|
||||
javax.sql.*,
|
||||
com.eactive.eai.agent.command.*,
|
||||
com.eactive.eai.agent.*,
|
||||
com.eactive.eai.rms.onl.common.util.*,
|
||||
com.eactive.eai.rms.common.datasource.*,
|
||||
org.apache.commons.logging.Log,
|
||||
org.apache.commons.logging.LogFactory,
|
||||
java.util.Arrays,
|
||||
com.eactive.eai.rms.common.util.StringUtils,
|
||||
com.eactive.eai.common.util.*
|
||||
" %>
|
||||
<!-- import 에서 DataSourceFactory의 경로에 파일이 없어서 컴파일 에러가 나서 주석처리함 24.08.29 -->
|
||||
<!-- com.eactive.eai.transformer.dao.jdbc.DataSourceFactory, -->
|
||||
<%!
|
||||
private static final Logger logger = Logger.getLogger("runSql.jsp");
|
||||
|
||||
private String NEW_LINE = "\n";
|
||||
private int MAX_FETCH_SIZE = 1000;
|
||||
|
||||
private static Object obj = new Object();
|
||||
|
||||
public StringBuffer ListToString(List<String[]> list){
|
||||
StringBuffer sb = new StringBuffer();
|
||||
//first item is ColName
|
||||
boolean isHead = true;
|
||||
for(int row=1;row<list.size();row++){
|
||||
String[] ar = (String[])list.get(row);
|
||||
for(int i =0; i < ar.length; i++){
|
||||
sb.append(ar[i]).append("\t");
|
||||
}
|
||||
sb.append(NEW_LINE);
|
||||
if(isHead){
|
||||
sb.append(StringUtils.repeat("--",sb.length())).append(NEW_LINE);
|
||||
isHead= false;
|
||||
}
|
||||
}
|
||||
return sb;
|
||||
}
|
||||
|
||||
public HashMap runSql(List<String> list,String displayType, String serviceType ) throws Exception {
|
||||
Connection conn = null;
|
||||
Statement stmt = null;
|
||||
String driver = null;
|
||||
String url = null;
|
||||
String id =null;
|
||||
String pwd=null;
|
||||
ResultSet rs = null;
|
||||
|
||||
HashMap<String, Object> results = new HashMap();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
StringBuffer errorBuff = new StringBuffer();
|
||||
|
||||
int rownum = 0;
|
||||
try {
|
||||
DataSourceType dataType = DataSourceTypeManager.getDataSourceType(serviceType);
|
||||
|
||||
String jndiName = dataType.getJndiName();
|
||||
ServiceLocator sl = ServiceLocator.getInstance();
|
||||
DataSource ds = sl.getDataSource( jndiName);
|
||||
|
||||
conn = ds.getConnection();
|
||||
stmt = conn.createStatement();
|
||||
|
||||
int cnt = 0;
|
||||
for(String sql : list) {
|
||||
try{
|
||||
|
||||
sql = sql.trim();
|
||||
if(sql.length() == 0) continue;
|
||||
// System.out.println(sql);
|
||||
if(sql.toUpperCase().startsWith("SELECT")){
|
||||
|
||||
// 메모리 문제로 조회건수를 100건으로 제한하도록 한다. // 요건에 따라 변경 필요
|
||||
sql = sql + "\n fetch first "+MAX_FETCH_SIZE+" rows only"; // DB2
|
||||
stmt.execute(sql);
|
||||
rs = stmt.getResultSet();
|
||||
|
||||
List ret = new ArrayList();
|
||||
int maxColumn = rs.getMetaData().getColumnCount();
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
String[] colName = new String[maxColumn];
|
||||
int[] colSize = new int[maxColumn];
|
||||
//get Col Name
|
||||
for(int i =1; i<=maxColumn; i++){
|
||||
colName[i-1] = rsmd.getColumnName(i);
|
||||
colSize[i-1] = rsmd.getPrecision(i);
|
||||
}
|
||||
ret.add(colSize);
|
||||
ret.add(colName);
|
||||
while(rs.next()) {
|
||||
String[] row = new String[maxColumn];
|
||||
for (int i=0;i<maxColumn;i++){
|
||||
row[i] = rs.getString(i+1);
|
||||
}
|
||||
ret.add(row);
|
||||
}
|
||||
if( "FLAT".equals(displayType) ) sb = ListToString(ret);
|
||||
if( "GRID".equals(displayType) ) results.put("SEL"+(cnt++),ret);
|
||||
} else { //INSERT, UPDATE, DELETE
|
||||
throw new Exception("SELECT 만 지원합니다.");
|
||||
//if ((sql.toUpperCase().startsWith("UPDATE") || sql.toUpperCase().startsWith("DELETE")) && !(sql.toUpperCase().contains("WHERE"))) {
|
||||
// throw new Exception("UPDATE/DELETE문은 반드시 WHERE절을 포함해야 합니다.");
|
||||
//}
|
||||
//int affected = stmt.executeUpdate(sql);
|
||||
//sb.append("==> Execute - ["+sql.trim()+"], affected "+ affected +" rows").append(NEW_LINE);
|
||||
}
|
||||
|
||||
}catch(Exception e){
|
||||
errorBuff.append("==> Error - ["+sql + "] : " +e.getMessage()).append(NEW_LINE);
|
||||
}
|
||||
}
|
||||
}catch(Exception e) {
|
||||
logger.error(e.getMessage(),e);
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
if(stmt != null) stmt.close();
|
||||
if(conn != null) conn.close();
|
||||
if(rs != null) rs.close();
|
||||
}
|
||||
catch (SQLException sqle) {
|
||||
logger.error("SQLException was thrown: " + sqle.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
HashMap retMap = new HashMap();
|
||||
retMap.put("records",results);
|
||||
retMap.put("result", sb.toString());
|
||||
retMap.put("error", errorBuff.toString());
|
||||
return retMap;
|
||||
}
|
||||
|
||||
public HashMap execute(String statements, String displayType,String serviceType,ServletRequest request) throws Exception {
|
||||
String[] results = new String[2];
|
||||
|
||||
String[] arr = statements.split(";");
|
||||
List<String> list = Arrays.asList(arr);
|
||||
|
||||
return runSql(list, displayType, serviceType);
|
||||
}
|
||||
%>
|
||||
|
||||
|
||||
<%
|
||||
response.setHeader("Pragma", "No-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setHeader("Expires", "0");
|
||||
%>
|
||||
|
||||
<%
|
||||
request.setCharacterEncoding("utf-8");
|
||||
String filter = request.getParameter("filter");
|
||||
|
||||
String displayType = request.getParameter("displayType");
|
||||
String serviceType = request.getParameter("serviceType");
|
||||
String statement = request.getParameter("statement");
|
||||
String userType=request.getParameter("userType");
|
||||
String run=request.getParameter("run");
|
||||
|
||||
if (run == null) run = "";
|
||||
if (displayType == null) displayType = "GRID";
|
||||
if (serviceType == null) serviceType = "";
|
||||
if (statement == null) statement = "";
|
||||
|
||||
HashMap runResult =new HashMap();
|
||||
|
||||
String errorMessage = "";
|
||||
|
||||
if (!"".equals(run) ){
|
||||
runResult = execute(statement,displayType, serviceType,request);
|
||||
//response.sendRedirect("/monitoring/jsp/common/jsonResult.jsp");
|
||||
errorMessage = (String)runResult.get("error");
|
||||
if(errorMessage == null) errorMessage = "";
|
||||
}else{
|
||||
;
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
|
||||
<%@ include file="/jsp/common/include/localemessage.jsp" %>
|
||||
<script language="javascript" src="<c:url value="/common/js/common.js" />"></script>
|
||||
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
<%-- <script language="javascript" src="<c:url value="/js/jquery-1.7.2.min.js"/>"></script>
|
||||
<script language="javascript" src="<c:url value="/js/jquery-ui.min.js"/>"></script> --%>
|
||||
<script language="javascript" >
|
||||
var $ = jQuery.noConflict();
|
||||
var url = '<c:url value="/runSql.jsp" />';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('select[name=serviceType]').val("<%=serviceType%>");
|
||||
//$('select[name=serviceType]').attr('disabled','disabled');
|
||||
$("#btn_submit").click(function(){
|
||||
var serviceType = $('select[name=serviceType] option:selected').val();
|
||||
var postData = new Array();
|
||||
var statement = $("textarea[name=statement]").val();
|
||||
if(statement == "" || statement == null){
|
||||
alert("<%= localeMessage.getString("runSql.checkMsg") %>");
|
||||
return;
|
||||
}
|
||||
document.forms.runSql.run.value = "1";
|
||||
document.forms.runSql.action= url;
|
||||
document.forms.runSql.submit();
|
||||
/* postData.push({name: "statement" , value:statement});
|
||||
postData.push({name: "serviceType", value:serviceType});
|
||||
postData.push({name: "run", value:"1"});
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
//url:url,
|
||||
data:postData,
|
||||
success:function(args){
|
||||
alert("executed");
|
||||
|
||||
$("textarea[name=result]").val($(args).find('result'));
|
||||
},
|
||||
error:function(xhr, status, errorMsg){
|
||||
//$("textarea[name=result]").val(errorMsg);
|
||||
//alert(JSON.parse(xhr.responseText).errorMsg);
|
||||
}
|
||||
}); */
|
||||
|
||||
});
|
||||
|
||||
$("#btn_close").click(function(){
|
||||
window.close();
|
||||
});
|
||||
|
||||
$("#btn_download").click(function() {
|
||||
var displayType = $("select[name=displayType]").val();
|
||||
if(displayType=="FLAT"){
|
||||
download();
|
||||
}else{
|
||||
$("#resultData").val($("#resultTable").html());
|
||||
$("#excel_form").submit();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
function download(){
|
||||
var resData = document.getElementById("resultData").value;
|
||||
var resDataBlob = new Blob([resData],{type:'text/plain'});
|
||||
var fileName = "SQL Result.txt";
|
||||
var downLink = document.createElement("a");
|
||||
downLink.download = fileName;
|
||||
downLink.innerHTML = "Download File";
|
||||
downLink.href = window.webkitURL.createObjectURL(resDataBlob);
|
||||
downLink.click();
|
||||
}
|
||||
|
||||
</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">
|
||||
<div class="search_wrap">
|
||||
<button type="button" class="cssbtn" id="btn_submit" level="W"><i class="material-icons">expand_circle_down</i> <%= localeMessage.getString("button.operate") %></button>
|
||||
<button type="button" class="cssbtn" id="btn_download" level="W"><i class="material-icons">file_download</i> <%= localeMessage.getString("button.download") %></button>
|
||||
<%-- <img id="btn_submit" src="<c:url value="/img/btn_operate.png"/>" level="W" style="cursor:hand;"/> --%>
|
||||
<%-- <img id="btn_download" src="<c:url value="/img/btn_download.png"/>" level="w" style="cursor:hand;"/> --%>
|
||||
</div>
|
||||
<div class="title">Data Explorer</div>
|
||||
<table class="table_row" align="center">
|
||||
<form method="post" name="runSql">
|
||||
<tr>
|
||||
<th align="right" width="80px">
|
||||
Database :
|
||||
</th>
|
||||
<td align="left" width="200px">
|
||||
<div class="select-style">
|
||||
<select name="serviceType">
|
||||
<%
|
||||
List dsNames = DataSourceTypeManager.getDataSourceTypeNames();
|
||||
String dsName = "";
|
||||
for(int i=0; i< dsNames.size(); i++) {
|
||||
dsName = (String)dsNames.get(i);
|
||||
%>
|
||||
<option value="<%= dsName %>"><%= dsName %></option>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th align="right" width="80px">
|
||||
DIsplay :
|
||||
</th>
|
||||
<td align="left">
|
||||
<div class="select-style">
|
||||
<select name="displayType">
|
||||
<option value="FLAT" <%= "FLAT".equals(displayType)?"selected":"" %>>FLAT</option>
|
||||
<option value="GRID" <%= "GRID".equals(displayType)?"selected":"" %>>GRID</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" colspan=4>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="search_td_title" width="150px"><%= localeMessage.getString("runSql.excute") %> : max fetch size <%= MAX_FETCH_SIZE %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea name="statement" style="width:100%;height:200px"><%= statement%></textarea>
|
||||
<INPUT type=hidden name="run" value="<%=run%>">
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
<tr>
|
||||
<td class="search_td_title" width="150px"><%= localeMessage.getString("runSql.result") %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="search_td_title" width="150px"><font color=red><%= errorMessage %><font></td>
|
||||
</tr>
|
||||
<%
|
||||
if("FLAT".equals(displayType)) {
|
||||
%>
|
||||
<tr>
|
||||
<td >
|
||||
<%-- <form name="excel_form" id = "excel_form" action="excelDown.jsp" method="post" target="_blank" style="height : 450px !important">
|
||||
<input type="text" name="displayType" id="displayType" value="<%=displayType%>">
|
||||
<textarea id = "resultData" name="resultData" style="width:100%;height:100%"><%= runResult.get("result")%></textarea>
|
||||
</form> --%>
|
||||
<textarea id = "resultData" name="resultData" style="width:100%;height:400px"><%= runResult.get("result")%></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
}
|
||||
else {
|
||||
HashMap recordsMap = (HashMap)runResult.get("records");
|
||||
if(recordsMap != null) {
|
||||
%>
|
||||
<tr>
|
||||
<td valign="top"><%
|
||||
for(int sel=0; sel <= 10;sel++) {
|
||||
ArrayList resultList = (ArrayList)recordsMap.get("SEL"+sel);
|
||||
// System.out.println("SEL"+sel+" = "+resultList);
|
||||
if(resultList == null) {
|
||||
break;
|
||||
}
|
||||
%><form name="excel_form" id = "excel_form" action="excelDown.jsp" method="post" target="_blank">
|
||||
<input type="hidden" name="resultData" id="resultData">
|
||||
<input type="hidden" name="displayType" id="displayType" value="<%=displayType%>">
|
||||
<table width="100%" id="resultTable">
|
||||
<%
|
||||
int[] colSize = (int[])resultList.get(0);
|
||||
int cellWidth = 40;
|
||||
for(int index = 1; index<resultList.size(); index++ ) {
|
||||
String[] rows = (String[])resultList.get(index);
|
||||
%>
|
||||
<tr>
|
||||
<%
|
||||
for(int p = 0; p<rows.length; p++ ) {
|
||||
if(index==1) {
|
||||
cellWidth = rows[p].length();
|
||||
if(colSize[p] > cellWidth) cellWidth = colSize[p];
|
||||
cellWidth = cellWidth * 10;
|
||||
out.println(String.format("<th style=\"height : 20px; width:%dpx\">%s</th>", cellWidth, rows[p] ));
|
||||
}
|
||||
else {
|
||||
out.println(String.format("<td style=\"height : 20px\">%s</td>", rows[p]));
|
||||
}
|
||||
|
||||
}
|
||||
%>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</form>
|
||||
<% }
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</div><!-- end content_middle -->
|
||||
</div><!-- end right_box -->
|
||||
<!-- button -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -709,6 +709,8 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
sheet.setColumnWidth(ci++, 200 * 30);
|
||||
sheet.setColumnWidth(ci++, 300 * 30);
|
||||
sheet.setColumnWidth(ci++, 200 * 30);
|
||||
sheet.setColumnWidth(ci++, 200 * 30);
|
||||
sheet.setColumnWidth(ci++, 300 * 30);
|
||||
sheet.setColumnWidth(ci, 300 * 30);
|
||||
|
||||
int rowNum = 0;
|
||||
@@ -730,6 +732,8 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getEaiSvcDesc());
|
||||
createCell(row, cellIndex++, headerStyle, "변환여부(Y/N)");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getTransformYn());
|
||||
createCell(row, cellIndex++, headerStyle, "Sync/Async 타입");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getSyncAsyncType());
|
||||
|
||||
rowNum = addTitle(sheet, ++rowNum, titleStyle, "어댑터 설정");
|
||||
row = sheet.createRow(rowNum++);
|
||||
@@ -738,8 +742,23 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
createCell(row, cellIndex++, headerStyle, "인바운드 어댑터");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getFromAdapter());
|
||||
createCell(row, cellIndex++, headerStyle, "아웃바운드 어댑터");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getToAdapter());
|
||||
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getToAdapter());
|
||||
|
||||
//SYNC TYPE 에 따라 추가정보 생성
|
||||
String syncAsyncType = apiInterfaceUI.getSyncAsyncType();
|
||||
|
||||
if (syncAsyncType.equals("asyncSync") || syncAsyncType.equals("syncAsync")) {
|
||||
|
||||
if (apiInterfaceUI.getSyncAsyncType().equals("asyncSync")) {
|
||||
createCell(row, cellIndex++, headerStyle, "INBOUND (ASYNC) 응답 어댑터");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getFromResponseAdapter());
|
||||
} else {
|
||||
createCell(row, cellIndex++, headerStyle, "OUTBOUND (ASYNC) 응답 어댑터");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getToResponseAdapter());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rowNum = addTitle(sheet, ++rowNum, titleStyle, "REST 설정");
|
||||
row = sheet.createRow(rowNum++);
|
||||
row.setHeightInPoints(height); // 행 높이를 20 포인트로 설정
|
||||
@@ -747,14 +766,30 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
createCell(row, cellIndex++, headerStyle, "수신 메소드");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getInboundHttpMethod());
|
||||
createCell(row, cellIndex++, headerStyle, "수신 PATH(URL)");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getInboundRestPath());
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getInboundRestPath());
|
||||
|
||||
if(apiInterfaceUI.getSyncAsyncType().equals("asyncSync")) {
|
||||
createCell(row, cellIndex++, headerStyle, "응답 송신 메소드");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getInboundResponseHttpMethod());
|
||||
createCell(row, cellIndex++, headerStyle, "응답 송신 REST PATH(URL)");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getInboundResponseRestPath());
|
||||
}
|
||||
|
||||
row = sheet.createRow(rowNum++);
|
||||
row.setHeightInPoints(height); // 행 높이를 20 포인트로 설정
|
||||
cellIndex = 0; // 초기 셀 인덱스
|
||||
createCell(row, cellIndex++, headerStyle, "송신 메소드");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getOutboundHttpMethod());
|
||||
createCell(row, cellIndex++, headerStyle, "송신 PATH(URL)");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getOutboundRestPath());
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getOutboundRestPath());
|
||||
|
||||
if(apiInterfaceUI.getSyncAsyncType().equals("syncAsync")) {
|
||||
createCell(row, cellIndex++, headerStyle, "응답 수신 메소드");
|
||||
createCell(row, cellIndex++, textStyle, apiInterfaceUI.getOutboundResponseHttpMethod());
|
||||
createCell(row, cellIndex++, headerStyle, "송신 REST PATH(URL)");
|
||||
createCell(row, cellIndex, textStyle, apiInterfaceUI.getOutboundResponseRestPath());
|
||||
}
|
||||
|
||||
|
||||
if ("Y".equals(apiInterfaceUI.getTransformYn())) {
|
||||
rowNum = addTitle(sheet, ++rowNum, titleStyle, "변환 설정");
|
||||
@@ -808,9 +843,27 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
|
||||
String interfaceDesc = PoiUtils.getCellValue(sheet, 2, 1);
|
||||
String transformYn = PoiUtils.getCellValue(sheet, 2, 3);
|
||||
String syncAsyncType = PoiUtils.getCellValue(sheet, 2, 5);
|
||||
|
||||
String inboundAdapterGroupName = PoiUtils.getCellValue(sheet, 5, 1);
|
||||
String outboundAdapterGroupName = PoiUtils.getCellValue(sheet, 5, 3);
|
||||
String inboundResponseHttpMethod = "";
|
||||
String inboundResponseRestPath = "";
|
||||
String fromResponseAdapter = "";
|
||||
|
||||
String outboundResponseHttpMethod = "";
|
||||
String outboundResponseRestPath = "";
|
||||
String toResponseAdapter = "";
|
||||
|
||||
if (syncAsyncType.equals("asyncSync")) {
|
||||
inboundResponseHttpMethod = PoiUtils.getCellValue(sheet, 8, 5);
|
||||
inboundResponseRestPath = PoiUtils.getCellValue(sheet, 8, 7);
|
||||
fromResponseAdapter = PoiUtils.getCellValue(sheet, 5, 5);
|
||||
} else if (syncAsyncType.equals("syncAsync")) {
|
||||
outboundResponseHttpMethod = PoiUtils.getCellValue(sheet, 9, 5);
|
||||
outboundResponseRestPath = PoiUtils.getCellValue(sheet, 9, 7);
|
||||
toResponseAdapter = PoiUtils.getCellValue(sheet, 5, 5);
|
||||
}
|
||||
|
||||
String inboundHttpMethod = PoiUtils.getCellValue(sheet, 8, 1);
|
||||
String inboundRestPath = PoiUtils.getCellValue(sheet, 8, 3);
|
||||
@@ -824,6 +877,7 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
apiInterfaceUI.setEaiSvcName(elinkServiceId);
|
||||
apiInterfaceUI.setEaiSvcDesc(interfaceDesc);
|
||||
apiInterfaceUI.setTransformYn(transformYn);
|
||||
apiInterfaceUI.setSyncAsyncType(syncAsyncType);
|
||||
|
||||
apiInterfaceUI.setFromAdapter(inboundAdapterGroupName);
|
||||
apiInterfaceUI.setToAdapter(outboundAdapterGroupName);
|
||||
@@ -832,6 +886,14 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
apiInterfaceUI.setInboundRestPath(inboundRestPath);
|
||||
apiInterfaceUI.setOutboundHttpMethod(outboundHttpMethod);
|
||||
apiInterfaceUI.setOutboundRestPath(outboundRestPath);
|
||||
|
||||
apiInterfaceUI.setInboundResponseHttpMethod(inboundResponseHttpMethod);
|
||||
apiInterfaceUI.setInboundResponseRestPath(inboundResponseRestPath);
|
||||
apiInterfaceUI.setFromResponseAdapter(fromResponseAdapter);
|
||||
|
||||
apiInterfaceUI.setOutboundResponseHttpMethod(outboundResponseHttpMethod);
|
||||
apiInterfaceUI.setOutboundResponseRestPath(outboundResponseRestPath);
|
||||
apiInterfaceUI.setToResponseAdapter(toResponseAdapter);
|
||||
|
||||
apiInterfaceUI.setIsHeaderRouting(false);
|
||||
|
||||
|
||||
+10
-1
@@ -110,6 +110,10 @@ public interface ApiInterfaceUIMapper {
|
||||
syncAsyncType = "asyncSync";
|
||||
}
|
||||
vo.setSyncAsyncType(syncAsyncType);
|
||||
|
||||
// 가상응답 여부
|
||||
String simYn = "T".equals(eaiMessageEntity.getTrantype()) ? "Y" : "N";
|
||||
vo.setSimYn(simYn);
|
||||
|
||||
vo.setToAdapter(requestEntity.getPsvsysadptrbzwkgroupname());
|
||||
vo.setToutVal(requestEntity.getToutval());
|
||||
@@ -186,6 +190,11 @@ public interface ApiInterfaceUIMapper {
|
||||
if(vo == null || vo.getSyncAsyncType() == null){
|
||||
return;
|
||||
}
|
||||
|
||||
// 가상응답 여부
|
||||
String tranType = "Y".equals(vo.getSimYn()) ? "T" : "R";
|
||||
entity.setTrantype(tranType);
|
||||
|
||||
switch(vo.getSyncAsyncType()){
|
||||
case "async":
|
||||
case "asyncSync":
|
||||
@@ -193,4 +202,4 @@ public interface ApiInterfaceUIMapper {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user