웹훅 신청내역 조회화면
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
<%@ 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=utf-8">
|
||||
<jsp:include page="/jsp/common/include/css.jsp"/>
|
||||
<jsp:include page="/jsp/common/include/script.jsp"/>
|
||||
<style>
|
||||
.sub_list { width:100%; border-collapse:collapse; }
|
||||
.sub_list th, .sub_list td { border:1px solid #ebebec; padding:6px 8px; text-align:left; }
|
||||
.sub_list th { background:#f7f7f8; width:60px; }
|
||||
.empty-msg { color:#999; padding:6px 2px; }
|
||||
</style>
|
||||
<script language="javascript">
|
||||
var url = '<c:url value="/onl/apim/webhook/webhookReqMan.json" />';
|
||||
var url_view = '<c:url value="/onl/apim/webhook/webhookReqMan.view" />';
|
||||
var key = '${param.id}';
|
||||
var combo;
|
||||
|
||||
function escapeHtmlJs(s) { return $('<div>').text(s == null ? '' : s).html(); }
|
||||
|
||||
// 이벤트유형 코드 → 모니터링 공통코드(EVENT_TYPE) 코드명
|
||||
function eventTypeName(code) {
|
||||
if (!combo || !combo.eventTypeList) { return code; }
|
||||
for (var i = 0; i < combo.eventTypeList.length; i++) {
|
||||
if (combo.eventTypeList[i].CODE == code) { return combo.eventTypeList[i].NAME; }
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
function renderApiList(apiIds) {
|
||||
var $tbody = $('#apiListBody').empty();
|
||||
if (!apiIds || apiIds.length === 0) {
|
||||
$tbody.append('<tr><td class="empty-msg">등록된 API가 없습니다.</td></tr>');
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < apiIds.length; i++) {
|
||||
$tbody.append('<tr><td>' + escapeHtmlJs(apiIds[i]) + '</td></tr>');
|
||||
}
|
||||
}
|
||||
|
||||
function renderEventTypes(eventTypes) {
|
||||
if (!eventTypes || eventTypes.length === 0) {
|
||||
$('#eventTypes').text('');
|
||||
return;
|
||||
}
|
||||
var names = eventTypes.map(function (code) { return eventTypeName(code); });
|
||||
$('#eventTypes').text(names.join(', '));
|
||||
}
|
||||
|
||||
function detail() {
|
||||
if (!key) return;
|
||||
$.ajax({
|
||||
type: "POST", url: url, dataType: "json",
|
||||
data: {cmd: 'DETAIL', id: key},
|
||||
success: function (data) {
|
||||
$('#id').text(data.id != null ? data.id : '');
|
||||
$('#orgName').text(data.orgName || '');
|
||||
$('#reverseProxyPath').text(data.reverseProxyPath || '');
|
||||
$('#targetUrl').text(data.targetUrl || '');
|
||||
$('#secret').text(data.secret || '');
|
||||
$('#userSecret').text(data.userSecret || '');
|
||||
$('#createdDate').text(data.createdDate || '');
|
||||
|
||||
renderApiList(data.apiIds);
|
||||
renderEventTypes(data.eventTypes);
|
||||
},
|
||||
error: function (e) { alert(e.responseText); }
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var returnUrl = getReturnUrlForReturn();
|
||||
|
||||
buttonControl();
|
||||
|
||||
$.ajax({
|
||||
type: "POST", url: url, dataType: "json",
|
||||
data: {cmd: 'LIST_INIT_COMBO'},
|
||||
success: function (json) {
|
||||
combo = json;
|
||||
detail();
|
||||
},
|
||||
error: function (e) { alert(e.responseText); }
|
||||
});
|
||||
|
||||
$('#btn_previous').click(function () { goNav(returnUrl); });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="right_box">
|
||||
<div class="content_top">
|
||||
<ul class="path"><li><a href="#">${rmsMenuPath}</a></li></ul>
|
||||
</div>
|
||||
<div class="content_middle">
|
||||
<div class="search_wrap">
|
||||
<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">웹훅 신청내역 상세</div>
|
||||
<table class="table_row" cellspacing="0">
|
||||
<colgroup>
|
||||
<col style="width:12%"/><col style="width:38%"/>
|
||||
<col style="width:12%"/><col style="width:38%"/>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<th>신청 ID</th>
|
||||
<td colspan="3"><span id="id"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>기관명</th>
|
||||
<td><span id="orgName"></span></td>
|
||||
<th>신청일시</th>
|
||||
<td><span id="createdDate"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>리버스 프록시 경로</th>
|
||||
<td><span id="reverseProxyPath"></span></td>
|
||||
<th>Target URL</th>
|
||||
<td><span id="targetUrl"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Secret</th>
|
||||
<td colspan="3"><span id="secret"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>User Secret</th>
|
||||
<td colspan="3"><span id="userSecret"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>신청 이벤트</th>
|
||||
<td colspan="3"><span id="eventTypes"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="title" style="margin-top:20px;">API 목록</div>
|
||||
<table class="table_row">
|
||||
<colgroup><col style="width:100%"/></colgroup>
|
||||
<thead><tr><th style="width:100%;">API ID</th></tr></thead>
|
||||
<tbody id="apiListBody"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user