16 Commits

Author SHA1 Message Date
eastargh c3c9f7a2da IIM 연동시 마스킹코드 적용
eapim-admin CI / build (push) Waiting to run
2026-07-20 16:19:12 +09:00
eastargh 95e31befbb Djb 커스텀 원복
eapim-admin CI / build (push) Waiting to run
2026-07-20 14:47:59 +09:00
eastargh f1f7576b9d 인터페이스 목록에 상태칼럼 추가
eapim-admin CI / build (push) Waiting to run
2026-07-20 11:46:07 +09:00
eastargh 545e09891b 어뎁터 없을때 상세조회 되도록 변경
eapim-admin CI / build (push) Waiting to run
2026-07-20 10:53:33 +09:00
eastargh 70c2ac8376 서버 등록시 중복체크
eapim-admin CI / build (push) Has been cancelled
2026-07-16 14:52:36 +09:00
eastargh 21c493cb0e 통계 화면 레이아웃 조정
eapim-admin CI / build (push) Has been cancelled
2026-07-16 11:11:01 +09:00
eastargh b9c6a0da06 파이차트 글자 겹쳐보이는 버그 수정 (legend 오른쪽으로 이동)
eapim-admin CI / build (push) Has been cancelled
2026-07-16 10:14:37 +09:00
eastargh a0725b57a6 sms->kakao로 통일
eapim-admin CI / build (push) Has been cancelled
2026-07-16 09:27:37 +09:00
eastargh 50bfcacf27 전문레이아웃 변환 매핑 - api선택 팝업 추가
eapim-admin CI / build (push) Has been cancelled
2026-07-15 16:52:34 +09:00
eastargh f400f0322f 유량제어 이력 검색조건 추가
eapim-admin CI / build (push) Has been cancelled
2026-07-14 15:05:57 +09:00
eastargh d0cd8118f3 유량제어관련 메뉴 - 사용여부 검색조건 추가
eapim-admin CI / build (push) Has been cancelled
2026-07-14 11:30:55 +09:00
Rinjae 07e65c055b - JSP: OpenAPI Spec 버튼 상태 수정 - NEW → DETAIL로 변경
eapim-admin CI / build (push) Has been cancelled
- Service: BIGDECIMAL 매핑 추가 - 반환 유형 'number'
- Monitoring: Properties 초기화 및 null 체크 로직 추가
- JS: 샘플 응답 상태 시 안내 메시지 추가
2026-07-14 11:11:24 +09:00
eastargh af8a9cca51 프라퍼티 정리
eapim-admin CI / build (push) Has been cancelled
2026-07-13 17:47:35 +09:00
eastargh 39a09d0f5d 유량제어 url 특수문자 escape 2026-07-13 17:47:08 +09:00
Rinjae 5b940717c4 Merge remote-tracking branch 'origin/master'
eapim-admin CI / build (push) Has been cancelled
2026-07-13 15:30:13 +09:00
Rinjae 8ccf52fd66 - JSP: OpenAPI Spec 모달 처리 개선 - 동적 크기 조절 및 스타일 추가
- Service: GET/DELETE 요청 바디 항목→쿼리 파라미터 매핑 로직 추가
- JS: 요청 정보 진입 시 탭 자동 전환 로직(firstReqTabWithData) 구현
2026-07-13 15:30:08 +09:00
43 changed files with 897 additions and 659 deletions
+17 -2
View File
@@ -301,7 +301,7 @@
function goStep(n) {
if (n < 1 || n > STEPS.length) return;
state.step = n;
if (n === 2) state.reqInfoTab = 'body'; // 요청/응답 정보: 진입 시 항상 Body 먼저
if (n === 2) state.reqInfoTab = firstReqTabWithData(); // 요청 정보: 값 있는 탭(Header→Parameter→Body 순) 먼저
if (n === 3) state.resInfoTab = 'body';
renderStepper();
renderForm();
@@ -439,6 +439,19 @@
+ '</div>';
}
// 요청 정보 진입 시 먼저 보일 서브탭 = 값이 든 첫 탭(Header→Parameter→Body 순).
// 보통 GET 은 Parameter(query), POST 는 Body 에만 값이 있음. 전부 비면 Body 로.
function firstReqTabWithData() {
var params = (state.data && state.data.parameters) || [];
var hasHeader = params.some(function (p) { return p.in === 'header'; });
var hasParam = params.some(function (p) { return p.in === 'query'; });
var hasBody = !!(state.data && state.data.requestBody && state.data.requestBody.schema && state.data.requestBody.schema.length);
if (hasHeader) return 'header';
if (hasParam) return 'param';
if (hasBody) return 'body';
return 'body';
}
// Step 2 — 요청 정보 (Header / Parameter / Body / API 설명(HTML))
function renderReqInfo(root) {
const tab = state.reqInfoTab || 'body';
@@ -991,7 +1004,9 @@
['sample', 'mock', 'gw'].map(v =>
`<label class="inline-flex items-center gap-1 text-sm mr-3"><input type="radio" name="portal-rt" data-portal-rt="${v}" ${rt === v ? 'checked' : ''}> ${v === 'gw' ? 'GW' : v}</label>`
).join('') +
`<div class="mt-2 text-xs text-slate-500">실제 호출 주소: <code id="resolved-call-url" class="font-mono text-slate-700 break-all">${escapeHtml(resolvedCallUrl())}</code></div>` +
(rt === 'sample'
? `<div class="mt-2 text-xs text-slate-500">응답 샘플을 바로 리턴합니다.</div>`
: `<div class="mt-2 text-xs text-slate-500">실제 호출 주소: <code id="resolved-call-url" class="font-mono text-slate-700 break-all">${escapeHtml(resolvedCallUrl())}</code></div>`) +
(rt === 'gw' ? `<div class="mt-1 text-xs text-slate-400">GW 주소는 포탈 설정(PTL_PROPERTY, 그룹 Portal)의 <code class="font-mono">djb.gateway.base-url</code> 값을 사용합니다.</div>` : '') +
'</div>') +
(rt === 'mock' ? fieldRow('Mock Server URL', input(p.mockUrl || '', 'data-portal="mockUrl"', { placeholder: 'https://mock.example.com' }), { hint: 'Mock 응답을 제공할 서버의 기본 URL. 응답 유형이 Mock 일 때 개발자포탈이 이 주소로 요청을 전달하고, Swagger 스펙의 서버 주소로도 사용됩니다.' }) : '')
+33 -268
View File
@@ -1,298 +1,63 @@
// 계좌이체 API 모의 데이터
// locked: true 인 필드는 게이트웨이가 자동 주입한 값(회색 + 자물쇠)
// locked: false / 미지정 인 필드는 사용자가 자유롭게 편집
// OpenAPI 에디터 초기 상태 골격(빈 껍데기).
// - specToData() 가 deepClone 하여 서버 spec 값으로 덮어쓰는 구조 기준값.
// - 실제 데모/샘플 값은 두지 않는다(팝업은 항상 서버 spec 로드 후 렌더).
// - docOptions 만 기능 기본값으로 유지(문서 미리보기 옵션).
// locked:true = 게이트웨이 자동 주입(회색+자물쇠) / locked:false = 사용자 편집.
window.SAMPLE_DATA = (function () {
function f() { return { value: '', locked: false }; }
return {
info: {
title: { value: '계좌이체 API', locked: false },
version: { value: '1.0.0', locked: false },
summary: { value: '', locked: false },
description: { value: '', locked: false },
termsOfService: { value: '', locked: false },
contact: {
name: { value: 'DJB API Team', locked: false },
email: { value: 'api@djb.co.kr', locked: false },
url: { value: '', locked: false }
},
license: {
name: { value: '', locked: false },
url: { value: '', locked: false }
}
title: f(),
version: f(),
summary: f(),
description: f(),
termsOfService: f(),
contact: { name: f(), email: f(), url: f() },
license: { name: f(), url: f() }
},
tags: [
{ name: 'transfer', description: '계좌이체 관련 API' }
],
tags: [],
externalDocs: {
description: { value: '', locked: false },
url: { value: '', locked: false }
},
externalDocs: { description: f(), url: f() },
servers: [
{
url: { value: 'https://api-dev.djb.co.kr', locked: true },
env: 'development',
description: { value: '개발 환경', locked: false }
},
{
url: { value: 'https://api-stg.djb.co.kr', locked: true },
env: 'staging',
description: { value: '스테이징 환경', locked: false }
},
{
url: { value: 'https://api.djb.co.kr', locked: true },
env: 'production',
description: { value: '운영 환경', locked: false }
}
],
servers: [],
serverVariables: [
{
name: { value: 'basePath', locked: true },
default: { value: '/v1', locked: false },
enumStr: { value: '/v1,/v2', locked: false },
description: { value: 'API 버전 경로', locked: false }
}
],
serverVariables: [],
operation: {
method: { value: 'POST', locked: true },
path: { value: '/v1/accounts/transfer', locked: true },
operationId: { value: 'transferAccount', locked: false },
summary: { value: '', locked: false },
description: { value: '', locked: false },
tags: { value: ['transfer'], locked: false },
deprecated: { value: false, locked: false }
method: f(),
path: f(),
operationId: f(),
summary: f(),
description: f(),
tags: { value: [], locked: false },
deprecated: { value: false, locked: false }
},
// 파라미터 (Path/Query/Header/Cookie)
parameters: [
{
in: 'header',
name: { value: 'X-Request-Id', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: 'uuid', locked: false },
maxLength: { value: '', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '', locked: false }
}
],
parameters: [],
// Request Body 스키마 (중첩 3단)
// Request Body 스키마
requestBody: {
mediaType: 'application/json',
required: { value: true, locked: true },
schema: [
{
name: { value: 'transactionId', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '40', locked: false },
pattern: { value: '^tx-[0-9a-zA-Z-]+$', locked: false },
description: { value: '', locked: false },
example: { value: 'tx-20260522-001', locked: false },
children: null
},
{
name: { value: 'sender', locked: true },
type: { value: 'object', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '', locked: false },
pattern: { value: '', locked: false },
description: { value: '송금인 정보', locked: false },
example: { value: '', locked: false },
children: [
{
name: { value: 'accountNumber', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '20', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '110-1234-567890', locked: false },
children: null
},
{
name: { value: 'bankCode', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '3', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '088', locked: false },
children: null
},
{
name: { value: 'holderName', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '60', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '김철수', locked: false },
children: null
}
]
},
{
name: { value: 'receiver', locked: true },
type: { value: 'object', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '', locked: false },
pattern: { value: '', locked: false },
description: { value: '수취인 정보', locked: false },
example: { value: '', locked: false },
children: [
{
name: { value: 'accountNumber', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '20', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '111-2345-678901', locked: false },
children: null
},
{
name: { value: 'bankCode', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '3', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '020', locked: false },
children: null
},
{
name: { value: 'holderName', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '60', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '이영희', locked: false },
children: null
}
]
},
{
name: { value: 'amount', locked: true },
type: { value: 'object', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '', locked: false },
pattern: { value: '', locked: false },
description: { value: '이체 금액', locked: false },
example: { value: '', locked: false },
children: [
{
name: { value: 'value', locked: true },
type: { value: 'integer', locked: true },
required: { value: true, locked: true },
format: { value: 'int64', locked: false },
maxLength: { value: '', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '50000', locked: false },
children: null
},
{
name: { value: 'currency', locked: true },
type: { value: 'string', locked: true },
required: { value: true, locked: true },
format: { value: '', locked: false },
maxLength: { value: '3', locked: false },
pattern: { value: '^[A-Z]{3}$', locked: false },
description: { value: 'ISO 4217 통화코드', locked: false },
example: { value: 'KRW', locked: false },
children: null
}
]
},
{
name: { value: 'memo', locked: true },
type: { value: 'string', locked: true },
required: { value: false, locked: true },
format: { value: '', locked: false },
maxLength: { value: '100', locked: false },
pattern: { value: '', locked: false },
description: { value: '', locked: false },
example: { value: '5월 회비', locked: false },
children: null
}
]
required: { value: false, locked: false },
schema: []
},
// 응답 스키마 (상태코드 별)
responses: {
'200': {
description: { value: '이체 성공', locked: false },
schema: [
{ name: { value: 'transactionId', locked: true }, type: { value: 'string', locked: true }, required: { value: true, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: 'tx-20260522-001', locked: false }, children: null },
{ name: { value: 'status', locked: true }, type: { value: 'string', locked: true }, required: { value: true, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: 'COMPLETED', locked: false }, children: null },
{ name: { value: 'completedAt', locked: true }, type: { value: 'string', locked: true }, required: { value: true, locked: true }, format: { value: 'date-time', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: '2026-05-22T10:00:00Z', locked: false }, children: null },
{
name: { value: 'balance', locked: true }, type: { value: 'object', locked: true }, required: { value: true, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '잔액 정보', locked: false }, example: { value: '', locked: false },
children: [
{ name: { value: 'before', locked: true }, type: { value: 'integer', locked: true }, required: { value: true, locked: true }, format: { value: 'int64', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: '1000000', locked: false }, children: null },
{ name: { value: 'after', locked: true }, type: { value: 'integer', locked: true }, required: { value: true, locked: true }, format: { value: 'int64', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: '950000', locked: false }, children: null }
]
}
]
},
'400': {
description: { value: '잘못된 요청', locked: false },
schema: [
{
name: { value: 'error', locked: true }, type: { value: 'object', locked: true }, required: { value: true, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: '', locked: false },
children: [
{ name: { value: 'code', locked: true }, type: { value: 'string', locked: true }, required: { value: true, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: 'INVALID_AMOUNT', locked: false }, children: null },
{ name: { value: 'message', locked: true }, type: { value: 'string', locked: true }, required: { value: true, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: '금액이 올바르지 않습니다', locked: false }, children: null },
{ name: { value: 'details', locked: true }, type: { value: 'array', locked: true }, required: { value: false, locked: true }, format: { value: '', locked: false }, maxLength: { value: '', locked: false }, pattern: { value: '', locked: false }, description: { value: '', locked: false }, example: { value: '', locked: false }, itemsType: { value: 'string', locked: false }, children: null }
]
}
]
},
'401': { description: { value: '인증 실패', locked: false }, schema: [] },
'500': { description: { value: '서버 오류', locked: false }, schema: [] }
'200': { description: f(), schema: [] }
},
// 보안 스킴
securitySchemes: [
{
key: 'ApiKeyAuth',
type: 'apiKey',
locked: true,
name: { value: 'X-API-Key', locked: true },
in: { value: 'header', locked: true },
description: { value: '', locked: false }
}
],
globalSecurity: ['ApiKeyAuth'],
securitySchemes: [],
globalSecurity: [],
// 예제
examples: {
request: {
'application/json': {
default: '{\n "transactionId": "tx-20260522-001",\n "sender": {\n "accountNumber": "110-1234-567890",\n "bankCode": "088",\n "holderName": "김철수"\n },\n "receiver": {\n "accountNumber": "111-2345-678901",\n "bankCode": "020",\n "holderName": "이영희"\n },\n "amount": {\n "value": 50000,\n "currency": "KRW"\n },\n "memo": "5월 회비"\n}'
}
},
response: {
'200': { body: '{\n "transactionId": "tx-20260522-001",\n "status": "COMPLETED"\n}', headers: [ { name: 'X-RateLimit-Remaining', type: 'integer', description: '남은 요청 횟수', example: '99' } ] }
}
request: {},
response: {}
},
// 문서 옵션
@@ -25,7 +25,7 @@ $(document).ready(function() {
datatype:"json",
mtype: 'POST',
url: url,
postData : { cmd : 'LIST', searchName: $('input[name=searchName]').val()},
postData : { cmd : 'LIST', searchName: $('input[name=searchName]').val(), searchUseYn: $('select[name=searchUseYn]').val()},
colNames:['<%= localeMessage.getString("infAdpConMan.adaNm") %>',
'<%= localeMessage.getString("infAdpConMan.adaDes") %>',
'<%= localeMessage.getString("infAdpConMan.thrPerSecond") %>',
@@ -62,6 +62,7 @@ $(document).ready(function() {
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&searchName='+$("input[name=searchName]").val();
url2 += '&searchUseYn='+$("select[name=searchUseYn]").val();
//key값
url2 += '&name='+name;
goNav(url2);
@@ -80,7 +81,7 @@ $(document).ready(function() {
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
$("#grid").setGridParam({ postData: { searchName: $('input[name=searchName]').val()}, page:1 }).trigger("reloadGrid");
$("#grid").setGridParam({ postData: { searchName: $('input[name=searchName]').val(), searchUseYn: $('select[name=searchUseYn]').val()}, page:1 }).trigger("reloadGrid");
});
$("#btn_new").click(function(){
var url2 = url_view;
@@ -126,6 +127,16 @@ $(document).ready(function() {
<tr>
<th style="width:180px;"><%= localeMessage.getString("infAdpConMan.adaNm") %></th>
<td><input type="text" name="searchName" value="${param.searchName}"></td>
<th style="width:180px;"><%= localeMessage.getString("infAdpConMan.useYn") %></th>
<td>
<div class="select-style">
<select name="searchUseYn">
<option value="">전체</option>
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
@@ -25,7 +25,7 @@ $(document).ready(function() {
datatype:"json",
mtype: 'POST',
url: url,
postData : { cmd : 'LIST', searchName: $('input[name=searchName]').val()},
postData : { cmd : 'LIST', searchName: $('input[name=searchName]').val(), searchUseYn: $('select[name=searchUseYn]').val()},
colNames:['클라이언트 ID',
'클라이언트명',
'<%= localeMessage.getString("infAdpConMan.thrPerSecond") %>',
@@ -62,6 +62,7 @@ $(document).ready(function() {
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&searchName='+$("input[name=searchName]").val();
url2 += '&searchUseYn='+$("select[name=searchUseYn]").val();
//key값
url2 += '&name='+name;
goNav(url2);
@@ -80,7 +81,7 @@ $(document).ready(function() {
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
$("#grid").setGridParam({ postData: { searchName: $('input[name=searchName]').val()}, page:1 }).trigger("reloadGrid");
$("#grid").setGridParam({ postData: { searchName: $('input[name=searchName]').val(), searchUseYn: $('select[name=searchUseYn]').val()}, page:1 }).trigger("reloadGrid");
});
$("#btn_new").click(function(){
var url2 = url_view;
@@ -90,7 +91,8 @@ $(document).ready(function() {
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&searchName=';
url2 += '&searchUseYn='+$('select[name=searchUseYn]').val();
goNav(url2);
});
@@ -124,6 +126,16 @@ $(document).ready(function() {
<tr>
<th style="width:180px;">클라이언트명</th>
<td><input type="text" name="searchName" value="${param.searchName}"></td>
<th style="width:180px;">사용여부</th>
<td>
<div class="select-style">
<select name="searchUseYn">
<option value="">전체</option>
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
@@ -494,11 +494,6 @@ $(document).ready(function() {
<span class="bucket-summary-value" id="summaryThreshold">0<span class="unit">req</span></span>
<span class="bucket-summary-sub" id="summaryThresholdCalc"></span>
</div>
<div class="bucket-summary-item">
<span class="bucket-summary-label">적용 API</span>
<span class="bucket-summary-value" id="summaryActiveApi">0<span class="unit">개</span></span>
<span class="bucket-summary-sub" id="summaryActiveApiList"></span>
</div>
</div>
</div>
@@ -47,27 +47,40 @@ function groupNameFormat(cellvalue, options, rowObject) {
return strVal;
}
$(document).ready(function() {
$(document).ready(function() {
$("input[name=searchStartYYYYMMDD],input[name=searchEndYYYYMMDD]").inputmask("yyyy-mm-dd",{'autoUnmask':true});
$("input[name=searchStartTime],input[name=searchEndTime]").inputmask("hh:mm:ss",{'autoUnmask':true});
$("input[name=searchStartYYYYMMDD]").each(function(){
if ($(this).val() == undefined || $(this).val() == null || $(this).val() == ""){
$(this).val(getToday());
}
});
$("input[name=searchEndYYYYMMDD]").each(function(){
if ($(this).val() == undefined || $(this).val() == null || $(this).val() == ""){
$(this).val(getToday());
}
});
var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
$("input[name=searchStartTime]").each(function(){
if ($(this).val() == undefined || $(this).val() == null || $(this).val() == ""){
$(this).val("000000");
}
});
$("input[name=searchEndTime]").each(function(){
if ($(this).val() == undefined || $(this).val() == null || $(this).val() == ""){
$(this).val("235959");
}
});
var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
var start = $("input[name=searchStartYYYYMMDD]").val().replace(/-/gi,"");
var end = $("input[name=searchEndYYYYMMDD]").val().replace(/-/gi,"");
gridPostData["searchStartDate"] = start;
gridPostData["searchEndDate"] = end;
@@ -132,18 +145,20 @@ $(document).ready(function() {
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
var start = $("input[name=searchStartYYYYMMDD]").val().replace(/-/gi,"");
var end = $("input[name=searchEndYYYYMMDD]").val().replace(/-/gi,"");
if(start > end){
var startTime = $("input[name=searchStartTime]").val();
var endTime = $("input[name=searchEndTime]").val();
if((start + startTime) > (end + endTime)){
alert("조회기간을 확인해주세요.");
return false;
}
$("input[name=searchStartDate]").val(start);
$("input[name=searchEndDate]").val(end);
postData["searchStartDate"] = start;
postData["searchEndDate"] = end;
@@ -197,14 +212,24 @@ $(document).ready(function() {
<tbody>
<tr>
<th style="width:180px;"><%= localeMessage.getString("infConHstMan.date") %></th>
<td>
<td colspan="5">
<input type="text" name="searchStartYYYYMMDD" id="startDatepicker" readonly="readonly" value="" size="10" style="width:80px; border:1px solid #ebebec;">
~
<input type="text" name="searchStartTime" value="" size="8" style="width:70px; border:1px solid #ebebec;">
~
<input type="text" name="searchEndYYYYMMDD" value="" id="endDatepicker" size="10" readonly="readonly" style="width:80px; border:1px solid #ebebec;">
<input type="text" name="searchEndTime" value="" size="8" style="width:70px; border:1px solid #ebebec;">
<input type="hidden" name="searchStartDate" value="" style="width:0px;">
<input type="hidden" name="searchEndDate" value="" style="width:0px;">
</td>
</tr>
</td>
</tr>
<tr>
<th style="width:180px;"><%= localeMessage.getString("infConHstMan.instNm") %></th>
<td><input type="text" name="searchInstanceName" value="${param.searchInstanceName}"></td>
<th style="width:180px;"><%= localeMessage.getString("infConHstMan.eaiSvcCd") %></th>
<td><input type="text" name="searchApiName" value="${param.searchApiName}"></td>
<th style="width:180px;"><%= localeMessage.getString("infConHstMan.adpGrpNm") %></th>
<td><input type="text" name="searchAdapterGroupName" value="${param.searchAdapterGroupName}"></td>
</tr>
</tbody>
</table>
</form>
@@ -88,7 +88,7 @@ $(document).ready(function() {
datatype:"json",
mtype: 'POST',
url: url,
postData : { cmd : 'LIST', searchGroupName: $('input[name=searchGroupName]').val()},
postData : { cmd : 'LIST', searchGroupName: $('input[name=searchGroupName]').val(), searchUseYn: $('select[name=searchUseYn]').val()},
colNames:['그룹 ID',
'그룹명',
'초당 임계치',
@@ -125,6 +125,7 @@ $(document).ready(function() {
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&searchGroupName='+$("input[name=searchGroupName]").val();
url2 += '&searchUseYn='+$("select[name=searchUseYn]").val();
//key값
url2 += '&groupId='+groupId;
goNav(url2);
@@ -143,7 +144,7 @@ $(document).ready(function() {
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
$("#grid").setGridParam({ postData: { searchGroupName: $('input[name=searchGroupName]').val()}, page:1 }).trigger("reloadGrid");
$("#grid").setGridParam({ postData: { searchGroupName: $('input[name=searchGroupName]').val(), searchUseYn: $('select[name=searchUseYn]').val()}, page:1 }).trigger("reloadGrid");
});
$("#btn_new").click(function(){
var url2 = url_view;
@@ -188,6 +189,16 @@ $(document).ready(function() {
<tr>
<th style="width:180px;">그룹명</th>
<td><input type="text" name="searchGroupName" value="${param.searchGroupName}"></td>
<th style="width:180px;">사용여부</th>
<td>
<div class="select-style">
<select name="searchUseYn">
<option value="">전체</option>
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
@@ -25,7 +25,7 @@ $(document).ready(function() {
datatype:"json",
mtype: 'POST',
url: url,
postData : { cmd : 'LIST', searchName: $('input[name=searchName]').val()},
postData : { cmd : 'LIST', searchName: $('input[name=searchName]').val(), searchUseYn: $('select[name=searchUseYn]').val()},
colNames:['<%= localeMessage.getString("infIfConMan.ifNm") %>',
'<%= localeMessage.getString("infIfConMan.ifDesc") %>',
'<%= localeMessage.getString("infAdpConMan.thrPerSecond") %>',
@@ -62,6 +62,7 @@ $(document).ready(function() {
url2 += '&menuId='+'${param.menuId}';
//검색값
url2 += '&searchName='+$("input[name=searchName]").val();
url2 += '&searchUseYn='+$("select[name=searchUseYn]").val();
//key값
url2 += '&name='+name;
goNav(url2);
@@ -80,7 +81,7 @@ $(document).ready(function() {
resizeJqGridWidth('grid','content_middle','1000');
$("#btn_search").click(function(){
$("#grid").setGridParam({ postData: { searchName: $('input[name=searchName]').val()}, page:1 }).trigger("reloadGrid");
$("#grid").setGridParam({ postData: { searchName: $('input[name=searchName]').val(), searchUseYn: $('select[name=searchUseYn]').val()}, page:1 }).trigger("reloadGrid");
});
$("#btn_new").click(function(){
var url2 = url_view;
@@ -126,6 +127,16 @@ $(document).ready(function() {
<tr>
<th style="width:180px;"><%= localeMessage.getString("infIfConMan.ifNm") %></th>
<td><input type="text" name="searchName" value="${param.searchName}"></td>
<th style="width:180px;"><%= localeMessage.getString("infAdpConMan.useYn") %></th>
<td>
<div class="select-style">
<select name="searchUseYn">
<option value="">전체</option>
<option value="1">사용함</option>
<option value="0">사용안함</option>
</select>
</div>
</td>
</tr>
</tbody>
</table>
@@ -0,0 +1,258 @@
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ 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/transaction/apim/apiInterfaceMan.json"/>';
var url_view = '<c:url value="/onl/transaction/apim/apiInterfaceMan.view"/>';
var selectName = "searchEaiBzwkDstcd"; // selectBox Name
function processSelectedData() {
var grid = $("#grid");
var selectedRowIds = grid.jqGrid('getGridParam', 'selarrrow');
var selectedData = [];
for(var i = 0; i < selectedRowIds.length; i++) {
var rowData = grid.jqGrid('getRowData', selectedRowIds[i]);
selectedData.push({
bizCode: rowData.eaiBzwkDstcd, // CLINET
apiId: rowData.eaiSvcName,
apiDesc: rowData.eaiSvcDesc, // SCOPE-API
APIFULLPATH: rowData.apiFullPath,
BZWKSVCKEYNAME: rowData.bzwksvckeyname
});
}
if(selectedData.length === 0) {
alert("선택된 항목이 없습니다.");
return;
}
alert("선택한 " + selectedData.length + "건의 API를 추가합니다.");
window.returnValue = selectedData.length === 1 ? selectedData[0] : selectedData;
window.close();
}
function updateSelectionInfo(gridId) {
var grid = $(gridId || "#grid");
var selectedRows = grid.jqGrid('getGridParam', 'selarrrow');
$("#selected-count").text("총: " + selectedRows.length + " 건");
}
function init( callback) {
$.ajax({
type : "POST",
url:url,
dataType:"json",
data:{cmd: 'LIST_COMBO'},
success:function(json){
new makeOptions("BIZCODE","BIZNAME").setObj($("select[name=searchEaiBzwkDstcd]")).setNoValueInclude(true).setNoValue("","전체").setData(json.bizList).setFormat(codeName3OptionFormat).rendering();
setSearchable(selectName); // 콤보에 searchable 설정
if (typeof callback === 'function') {
callback();
}
},
error:function(e){
alert(e.responseText);
}
});
}
function detail(){
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
$("#grid").setGridParam({ url:url,postData: postData }).trigger("reloadGrid");
}
function search(){
var postData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
$("#grid").setGridParam({ url:url,postData: postData ,page:1 }).trigger("reloadGrid");
}
function ioFormatter(cellvalue,options,rowObject){
var serviceType = sessionStorage["serviceType"];
if(cellvalue == "I"){
return "타발";
}else if(cellvalue =="O"){
return "당발";
}
}
function adapterNameShortFormatter(cellvalue,options,rowObject){
if(cellvalue == null || cellvalue == '')
return ''
return cellvalue.substring(1, 4);
}
function list(){
detail()
var gridPostData = getSearchForJqgrid("cmd","LIST"); //jqgrid에서는 object 로
// gridPostData.searchApiEnableYn = 'Y';
var urlParams = new URLSearchParams(window.location.search);
var selectedApiIds = urlParams.get("selectedApiIds");
$('#grid').jqGrid({
datatype : "json",
mtype : 'POST',
url : url,
postData : gridPostData,
colNames : [ '업무구분',
'<%= localeMessage.getString("eaiMessage.eaiSvcName")%>',
'<%= localeMessage.getString("eaiMessage.eaiSvcDesc")%>',
'API FULL PATH',
'업무서비스명',
'요청',
'응답',
'작성자',
'가상응답여부',
'SyncAsyncType',
],
colModel : [ { name : 'eaiBzwkDstcd' , align : 'center' , width:'40', sortable:false},
{ name : 'eaiSvcName' , align : 'left' , width:'100'},
{ name : 'eaiSvcDesc' , align : 'left' },
{ name : 'apiFullPath' , align : 'left' , width:'100'},
{ name : 'bzwksvckeyname' , align : 'left' , width:'100', hidden: true},
{ name : 'fromAdapter' , align : 'center' , width:'40', formatter:adapterNameShortFormatter },
{ name : 'toAdapter' , align : 'center' , width:'40', formatter:adapterNameShortFormatter },
{ name : 'author' , align : 'center' , width:'60' },
{ name : 'simYn' , align : 'center' , width:'40' },
{ name : 'syncAsyncType' , align : 'center' , width:'40', hidden: true},
],
jsonReader : {
repeatitems : false
},
pager : $('#pager'),
page : '${param.page}',
rowNum : '${rmsDefaultRowNum}',
autoheight : true,
height : $("#container").height(),
autowidth : true,
viewrecords : true,
multiselect: false,
multiboxonly: false,
rowList : eval('[${rmsDefaultRowList}]'),
loadComplete:function (d){
var $grid = $(this);
if(selectedApiIds) {
const selectedIds = selectedApiIds.split(',');
$.each($grid.getDataIDs(), function(_, id) {
var rowData = $grid.getRowData(id);
if(selectedIds.includes(rowData.eaiSvcName)) {
$grid.jqGrid('setSelection', id, true);
}
});
}
var colModel = $(this).getGridParam("colModel");
for(var i = 0 ; i< colModel.length; i++){
$(this).setColProp(colModel[i].name, {sortable : false});
}
updateSelectionInfo("#grid");
},
onSelectRow: function(rowid, status, e) {
updateSelectionInfo("#grid");
},
onSelectAll: function(rowids, status) {
updateSelectionInfo("#grid");
},
ondblClickRow : function(rowId) {
const rowData = $(this).getRowData(rowId);
const returnValue = {
bizCode: rowData.eaiBzwkDstcd,
apiId: rowData.eaiSvcName,
apiDesc: rowData.eaiSvcDesc
};
//alert("선택한 API를 추가합니다.\nAPI ID: " + rowData.eaiSvcName);
window.returnValue = returnValue;
window.close();
}
});
}
$(document).ready(function() {
init(list);
resizeJqGridWidth('grid','content_middle','1000');
// 업무구분명 선택 시 자동 검색
$("select[name=searchEaiBzwkDstcd]").change(function() {
search();
});
$("#btn_search").click(function(){
search();
});
$("input[name^=search]").keydown(function(key){
if (key.keyCode == 13){
$("#btn_search").click();
}
});
buttonControl();
$("#btn_select").click(function(){
processSelectedData();
});
$("#btn_close").click(function () {
window.close();
});
});
</script>
</head>
<body>
<div>
<div class="content_middle" id="content_middle" style="margin-top: 0px">
<div class="search_wrap">
<button type="button" class="cssbtn" id="btn_search" level="R" ><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %></button>
<button type="button" class="cssbtn" id="btn_select" level="R" ><i class="material-icons">check</i> <%= localeMessage.getString("button.check") %></button>
<button type="button" class="cssbtn" id="btn_close" level="R" status="DETAIL"><i class="material-icons">close</i> <%= localeMessage.getString("button.close") %></button>
</div>
<div class="title" id="title" >${rmsMenuName}</div>
<!-- 선택 정보 표시 영역 추가 -->
<div style="margin-bottom: 5px;">
<span id="selected-count" style="color: #666; font-size: 12px;"></span>
</div>
<table class="search_condition" cellspacing=0;>
<tbody>
<tr>
<th style="width:180px;">업무구분명</th>
<td>
<select name="searchEaiBzwkDstcd" value="${param.searchEaiBzwkDstcd}">
</select>
</td>
<th style="width:180px;"><%= localeMessage.getString("eaiMessage.eaiSvcName")%></th>
<td>
<input type="text" name="searchEaiSvcName" value="${param.searchEaiSvcName}">
</td>
</tr>
<tr>
<th style="width:180px;"><%= localeMessage.getString("eaiMessage.eaiSvcDesc")%></th>
<td>
<input type="text" name="searchEaiSvcDesc" value="${param.searchEaiSvcDesc}">
</td>
<th style="width:180px;">API FULL PATH</th>
<td>
<input type="text" name="searchApiFullPath" value="${param.searchApiFullPath}">
</td>
</tr>
</tbody>
</table>
<table id="grid" ></table>
<div id="pager"></div>
</div><!-- end content_middle -->
</div><!-- end right_box -->
</body>
</html>
@@ -1947,8 +1947,8 @@
var key = "";
var args = new Object();
args['eaiSvcName'] = $('input[name=eaiSvcName]').val();
var url='<c:url value="/onl/transaction/extnl/interfaceMan.view"/>';
url = url + "?cmd=POPUP";
var url=url_view; //'<c:url value="/onl/transaction/extnl/interfaceMan.view"/>';
url = url + "?cmd=API_POPUP";
var ret = showModal(url,args,1020,630, function(arg){
var args = null;
if(arg == null || arg == undefined ) {//chrome
@@ -1962,11 +1962,11 @@
var ret = args.returnValue;
console.log("ret",ret);
key = ret['key'];
key = ret['apiId'];
$("input[name=eaiSvcName]").val(key);
$("input[name=eaiSvcDesc]").val(ret['eaiSvcDesc']);
bzwkDstCd = ret['eaiBzwkDstCd'];
$("input[name=eaiSvcDesc]").val(ret['apiDesc']);
bzwkDstCd = ret['bizCode'];
$("input[name=eaiSvcName]").change();
});
@@ -19,7 +19,8 @@
<jsp:include page="/jsp/common/include/css.jsp"/>
<jsp:include page="/jsp/common/include/script.jsp"/>
<script language="javascript" >
<script language="javascript" >
var url_view = '<c:url value="/onl/admin/rule/transform2/transform2Man.view" />';
var $ = jQuery.noConflict();
var bzwkDstCd = "";
@@ -81,8 +82,9 @@ $(document).ready(function() {
var key = "";
var args = new Object();
args['eaiSvcName'] = $('input[name=eaiSvcName]').val();
var url='<c:url value="/onl/transaction/extnl/interfaceMan.view"/>';
url = url + "?cmd=POPUP";
var url=url_view; //'<c:url value="/onl/transaction/extnl/interfaceMan.view"/>';
url = url + "?cmd=API_POPUP";
console.log('[new]', url);
var ret = showModal(url,args,1020,630, function(arg){
var args = null;
if(arg == null || arg == undefined ) {//chrome
@@ -96,11 +98,11 @@ $(document).ready(function() {
var ret = args.returnValue;
console.log("ret",ret);
key = ret['key'];
key = ret['apiId'];
$("input[name=eaiSvcName]").val(key);
$("input[name=eaiSvcDesc]").val(ret['eaiSvcDesc']);
bzwkDstCd = ret['eaiBzwkDstCd'];
$("input[name=eaiSvcDesc]").val(ret['apiDesc']);
bzwkDstCd = ret['bizCode'];
$("input[name=eaiSvcName]").change();
//$("select[name=eaiSevrDstcd]").val(ret['eaiSevrDstcd']);
@@ -172,6 +172,9 @@ $(document).ready(function() {
<form id="ajaxForm">
<input type="hidden" name="id">
<table class="table_row" cellspacing="0">
<colgroup>
<col width="200px">
</colgroup>
<tr>
<th><%= localeMessage.getString("messageTemplate.messageCode") %> <font color="red"> *</font></th>
<td><input type="text" name="messageCode" data-required data-warning="메세지 코드는 필수입니다"/></td>
@@ -66,22 +66,27 @@
},
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
},
legend: {
orient: 'horizontal',
bottom: 10,
orient: 'vertical',
right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류']
},
series: [{
name: '총건수',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
radius: ['38%', '65%'],
center: ['44%', '55%'],
avoidLabelOverlap: true,
label: {
show: true,
formatter: '{b}: {c}'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
},
emphasis: {
label: {
@@ -98,18 +103,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}]
};
@@ -119,7 +112,7 @@
// 호출량 차트
var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } },
title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: {
trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -191,13 +184,9 @@
{ value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' }
]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}]
});
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
// 호출량 차트 업데이트
@@ -455,6 +444,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -501,6 +493,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -587,10 +582,18 @@
</button>
</div>
<div class="title" id="title">API 일별 통계</div>
<table class="search_condition" cellspacing="0">
<table class="search_condition" cellspacing="0" style="table-layout:fixed;">
<colgroup>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
</colgroup>
<tbody>
<tr>
<th style="width:100px;">조회기간</th>
<th>조회기간</th>
<td colspan="5">
<input type="text" name="searchStartDateTime" value="${param.searchStartDateTime}" style="width:100px;">
~
@@ -599,29 +602,29 @@
</td>
</tr>
<tr>
<th style="width:100px;">API명</th>
<th>API명</th>
<td>
<input type="text" name="searchApiName" value="${param.searchApiName}">
</td>
<th style="width:100px;">업무구분</th>
<th>업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th style="width:100px;">인스턴스</th>
<th>인스턴스</th>
<td>
<input type="text" name="searchGwInstanceId" value="${param.searchGwInstanceId}">
</td>
</tr>
<tr>
<th style="width:100px;">클라이언트ID</th>
<th>클라이언트ID</th>
<td>
<input type="text" name="searchClientId" value="${param.searchClientId}">
</td>
<th style="width:100px;">Inbound Adapter</th>
<th>Inbound Adapter</th>
<td>
<input type="text" name="searchInboundAdapter" value="${param.searchInboundAdapter}">
</td>
<th style="width:100px;">Outbound Adapter</th>
<th>Outbound Adapter</th>
<td>
<input type="text" name="searchOutboundAdapter" value="${param.searchOutboundAdapter}">
</td>
@@ -630,7 +633,10 @@
</table>
<!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container">
<div id="totalDonutChart" class="chart"></div>
<div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div>
</div>
@@ -67,22 +67,27 @@
},
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
},
legend: {
orient: 'horizontal',
bottom: 10,
orient: 'vertical',
right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류']
},
series: [{
name: '총건수',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
radius: ['38%', '65%'],
center: ['44%', '55%'],
avoidLabelOverlap: true,
label: {
show: true,
formatter: '{b}: {c}'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
},
emphasis: {
label: {
@@ -99,18 +104,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}]
};
@@ -120,7 +113,7 @@
// 호출량 차트
var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } },
title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: {
trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -227,13 +220,9 @@
{ value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' }
]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}]
});
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
// 호출량 차트 업데이트
@@ -457,6 +446,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -503,6 +495,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -567,41 +562,47 @@
</button>
</div>
<div class="title" id="title">API 시간별 통계</div>
<table class="search_condition" cellspacing="0">
<table class="search_condition" cellspacing="0" style="table-layout:fixed;">
<colgroup>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
</colgroup>
<tbody>
<tr>
<th style="width:100px;">조회일자</th>
<td colspan="3">
<th>조회일자</th>
<td colspan="5">
<input type="text" name="searchDate" value="${param.searchDate}" style="width:100px;">
<span style="color:#888; font-size:12px; margin-left:10px;">(선택일 00시 ~ 23시 조회)</span>
</td>
</tr>
<tr>
<th style="width:100px;">API명</th>
<th>API명</th>
<td>
<input type="text" name="searchApiName" value="${param.searchApiName}">
</td>
<th style="width:100px;">인스턴스</th>
<th>업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th>인스턴스</th>
<td>
<input type="text" name="searchGwInstanceId" value="${param.searchGwInstanceId}">
</td>
</tr>
<tr>
<th style="width:100px;">업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th style="width:100px;">클라이언트ID</th>
<th>클라이언트ID</th>
<td>
<input type="text" name="searchClientId" value="${param.searchClientId}">
</td>
</tr>
<tr>
<th style="width:100px;">Inbound Adapter</th>
<th>Inbound Adapter</th>
<td>
<input type="text" name="searchInboundAdapter" value="${param.searchInboundAdapter}">
</td>
<th style="width:100px;">Outbound Adapter</th>
<th>Outbound Adapter</th>
<td>
<input type="text" name="searchOutboundAdapter" value="${param.searchOutboundAdapter}">
</td>
@@ -610,7 +611,10 @@
</table>
<!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container">
<div id="totalDonutChart" class="chart"></div>
<div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div>
</div>
@@ -59,22 +59,27 @@
},
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
},
legend: {
orient: 'horizontal',
bottom: 10,
orient: 'vertical',
right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류']
},
series: [{
name: '총건수',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
radius: ['38%', '65%'],
center: ['44%', '55%'],
avoidLabelOverlap: true,
label: {
show: true,
formatter: '{b}: {c}'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
},
emphasis: {
label: {
@@ -91,18 +96,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}]
};
@@ -111,8 +104,8 @@
// 호출량 차트
var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } },
var callOption = {
title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: {
trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -189,13 +182,9 @@
{ value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' }
]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}]
});
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
// 호출량 차트 업데이트
@@ -470,6 +459,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -516,6 +508,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -619,7 +614,10 @@
</table>
<!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container">
<div id="totalDonutChart" class="chart"></div>
<div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div>
</div>
@@ -66,22 +66,27 @@
},
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
},
legend: {
orient: 'horizontal',
bottom: 10,
orient: 'vertical',
right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류']
},
series: [{
name: '총건수',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
radius: ['38%', '65%'],
center: ['44%', '55%'],
avoidLabelOverlap: true,
label: {
show: true,
formatter: '{b}: {c}'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
},
emphasis: {
label: {
@@ -98,18 +103,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}]
};
@@ -119,7 +112,7 @@
// 호출량 차트
var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } },
title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: {
trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -189,13 +182,9 @@
{ value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' }
]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}]
});
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
@@ -460,6 +449,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -506,6 +498,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -578,11 +573,19 @@
</button>
</div>
<div class="title" id="title">API 월별 통계</div>
<table class="search_condition" cellspacing="0">
<table class="search_condition" cellspacing="0" style="table-layout:fixed;">
<colgroup>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
</colgroup>
<tbody>
<tr>
<th style="width:100px;">조회기간</th>
<td colspan="3">
<th>조회기간</th>
<td colspan="5">
<input type="text" name="searchStartDateTime" value="${param.searchStartDateTime}" style="width:100px;" placeholder="YYYY-MM">
~
<input type="text" name="searchEndDateTime" value="${param.searchEndDateTime}" style="width:100px;" placeholder="YYYY-MM">
@@ -590,31 +593,29 @@
</td>
</tr>
<tr>
<th style="width:100px;">API명</th>
<th>API명</th>
<td>
<input type="text" name="searchApiName" value="${param.searchApiName}">
</td>
<th style="width:100px;">인스턴스</th>
<th>업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th>인스턴스</th>
<td>
<input type="text" name="searchGwInstanceId" value="${param.searchGwInstanceId}">
</td>
</tr>
<tr>
<th style="width:100px;">업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th style="width:100px;">클라이언트ID</th>
<th>클라이언트ID</th>
<td>
<input type="text" name="searchClientId" value="${param.searchClientId}">
</td>
</tr>
<tr>
<th style="width:100px;">Inbound Adapter</th>
<th>Inbound Adapter</th>
<td>
<input type="text" name="searchInboundAdapter" value="${param.searchInboundAdapter}">
</td>
<th style="width:100px;">Outbound Adapter</th>
<th>Outbound Adapter</th>
<td>
<input type="text" name="searchOutboundAdapter" value="${param.searchOutboundAdapter}">
</td>
@@ -623,7 +624,10 @@
</table>
<!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container">
<div id="totalDonutChart" class="chart"></div>
<div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div>
</div>
@@ -66,22 +66,27 @@
},
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString() + ' (' + params.percent + '%)';
}
},
legend: {
orient: 'horizontal',
bottom: 10,
orient: 'vertical',
right: 30,
top: 'middle',
data: ['성공', 'Timeout', '시스템오류']
},
series: [{
name: '총건수',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '50%'],
radius: ['38%', '65%'],
center: ['44%', '55%'],
avoidLabelOverlap: true,
label: {
show: true,
formatter: '{b}: {c}'
formatter: function (params) {
return params.name + ': ' + params.value.toLocaleString();
}
},
emphasis: {
label: {
@@ -98,18 +103,6 @@
{ value: 0, name: 'Timeout', itemStyle: { color: '#FAC858' } },
{ value: 0, name: '시스템오류', itemStyle: { color: '#EE6666' } }
]
}],
graphic: [{
type: 'text',
left: 'center',
top: 'center',
style: {
text: '0',
textAlign: 'center',
fill: '#333',
fontSize: 24,
fontWeight: 'bold'
}
}]
};
@@ -119,7 +112,7 @@
// 호출량 차트
var callOption = {
title: { text: '호출량 추이', left: 'center', textStyle: { fontSize: 14 } },
title: { text: '호출량 추이', left: 'center', top: 10, textStyle: { fontSize: 14 } },
tooltip: {
trigger: 'axis',
axisPointer: { type: 'cross', label: { backgroundColor: '#6a7985' } }
@@ -191,13 +184,9 @@
{ value: totalTimeout, name: 'Timeout' },
{ value: totalSystemErr, name: '시스템오류' }
]
}],
graphic: [{
style: {
text: grandTotal.toLocaleString()
}
}]
});
$("#totalDonutCenterText").text(grandTotal.toLocaleString());
@@ -436,6 +425,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -482,6 +474,9 @@
for (var i = 0; i < colModel.length; i++) {
$(this).setColProp(colModel[i].name, { sortable: false });
}
// 조회(reloadGrid) 시 컬럼 폭이 고정폭(shrinkToFit:false)으로 남아
// 실제 컨테이너 폭과 어긋나 가로 스크롤이 생기는 것을 방지
$(this).jqGrid('setGridWidth', $('#content_middle').width(), true);
}
});
}
@@ -549,42 +544,48 @@
</button>
</div>
<div class="title" id="title">API 연간 통계</div>
<table class="search_condition" cellspacing="0">
<table class="search_condition" cellspacing="0" style="table-layout:fixed;">
<colgroup>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
<col style="width:150px;">
<col>
</colgroup>
<tbody>
<tr>
<th style="width:100px;">조회기간</th>
<td colspan="3">
<th>조회기간</th>
<td colspan="5">
<input type="text" name="searchStartDateTime" value="${param.searchStartDateTime}" style="width:100px;" placeholder="YYYY">
~
<input type="text" name="searchEndDateTime" value="${param.searchEndDateTime}" style="width:100px;" placeholder="YYYY">
</td>
</tr>
<tr>
<th style="width:100px;">API명</th>
<th>API명</th>
<td>
<input type="text" name="searchApiName" value="${param.searchApiName}">
</td>
<th style="width:100px;">인스턴스</th>
<th>업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th>인스턴스</th>
<td>
<input type="text" name="searchGwInstanceId" value="${param.searchGwInstanceId}">
</td>
</tr>
<tr>
<th style="width:100px;">업무구분</th>
<td>
<input type="text" name="searchBizDivCode" value="${param.searchBizDivCode}">
</td>
<th style="width:100px;">클라이언트ID</th>
<th>클라이언트ID</th>
<td>
<input type="text" name="searchClientId" value="${param.searchClientId}">
</td>
</tr>
<tr>
<th style="width:100px;">Inbound Adapter</th>
<th>Inbound Adapter</th>
<td>
<input type="text" name="searchInboundAdapter" value="${param.searchInboundAdapter}">
</td>
<th style="width:100px;">Outbound Adapter</th>
<th>Outbound Adapter</th>
<td>
<input type="text" name="searchOutboundAdapter" value="${param.searchOutboundAdapter}">
</td>
@@ -593,7 +594,10 @@
</table>
<!-- 도넛 차트 (상단 50%씩) -->
<div class="chart-container">
<div id="totalDonutChart" class="chart"></div>
<div class="chart" style="position:relative; padding:0;">
<div id="totalDonutChart" style="width:100%; height:100%;"></div>
<div id="totalDonutCenterText" style="position:absolute; left:44.5%; top:55%; transform:translate(-50%,-50%); font-size:24px; font-weight:bold; color:#333; pointer-events:none; z-index:10;">0</div>
</div>
<div id="callChart" class="chart"></div>
</div>
@@ -76,6 +76,15 @@
return cellvalue.substring(1, 4);
}
function apiStatusFormatter(cellvalue, options, rowObject) {
switch (cellvalue) {
case 'E': return '장애';
case 'D': return '지연';
case 'C': return '점검';
default: return '정상';
}
}
function list() {
detail()
var gridPostData = getSearchForJqgrid("cmd", "LIST"); //jqgrid에서는 object 로
@@ -90,6 +99,7 @@
'API FULL PATH',
'요청',
'응답',
'상태',
'작성자',
'가상응답여부',
'변경일시(*)',
@@ -99,11 +109,12 @@
{name: 'eaiSvcName', align: 'left', width: '100', sortable: true},
{name: 'eaiSvcDesc', align: 'left', sortable: false},
{name: 'apiFullPath', align: 'left', sortable: false},
{name: 'fromAdapter', align: 'center', width: '40', formatter: adapterNameShortFormatter, sortable: false},
{name: 'toAdapter', align: 'center', width: '40', formatter: adapterNameShortFormatter, sortable: false},
{name: 'author', align: 'center', width: '60', sortable: false},
{name: 'fromAdapter', align: 'center', width: '30', formatter: adapterNameShortFormatter, sortable: false},
{name: 'toAdapter', align: 'center', width: '30', formatter: adapterNameShortFormatter, sortable: false},
{name: 'statusCode', align: 'center', width: '30', formatter: apiStatusFormatter, sortable: false},
{name: 'author', align: 'center', width: '40', sortable: false},
{name : 'simYn', align : 'center' , width:'40', hidden: true },
{name : 'lastModifiedDate', align : 'center' , width:'40', sortable: true},
{name : 'lastModifiedDate', align : 'center' , width:'60', sortable: true},
{name: 'syncAsyncType', align: 'center', width: '40', hidden: true},
],
jsonReader: {
@@ -77,7 +77,10 @@
display: inline-block;
vertical-align: middle;
}
/* iframe 모달(showModal) 콘텐츠 패딩 제거 — iframe 이 다이얼로그 폭을 최대한 사용해 내부 가로스크롤 방지 */
.ui-dialog .ui-dialog-content { padding: 0 !important; }
</style>
<script language="javascript" >
var isDetail = false;
@@ -1012,7 +1015,12 @@
window.open(urlAddServiceType(baseUrl + '&menuId=' + encodeURIComponent(getMenuId())), '_blank');
} else {
// 기본: 모달 + iframe. showModal 이 serviceType/menuId/pop 을 자동 부착.
showModal(baseUrl, { title: 'OpenAPI Spec' }, 1600, 880);
// 콘텐츠 고정폭 1600 + 다이얼로그 chrome(패딩/보더 ~40px) 때문에 iframe 내부폭이 1600 미만이면 가로스크롤 발생.
// 뷰포트 내에서 최대한 크게 열어(캡 1720) iframe 내부폭이 1600 이상 확보되게 한다.
var vw = $(window).width(), vh = $(window).height();
var modalW = Math.min(vw - 12, 1720);
var modalH = Math.min(vh - 20, 900);
showModal(baseUrl, { title: 'OpenAPI Spec' }, modalW, modalH);
}
}
@@ -1537,9 +1545,9 @@
<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>
<!-- v1: 기존 API 스펙 (모달) — 기능 비교용 복원 -->
<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_api_spec" level="R" status="DETAIL"><i class="material-icons">description</i> API 스펙(삭제예정)</button>
<!-- v2: 신규 OpenAPI Spec (새 탭) -->
<button type="button" class="cssbtn" id="btn_openapi_spec" level="R" status="DETAIL,NEW"><i class="material-icons">api</i> OpenAPI Spec</button>
<button type="button" class="cssbtn" id="btn_openapi_spec" level="R" status="DETAIL"><i class="material-icons">api</i> OpenAPI Spec</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" style="font-size:1.4em">${rmsMenuName}</div>
+5 -10
View File
@@ -4,7 +4,6 @@ plugins {
id 'eclipse-wtp'
id 'idea'
id 'war'
id 'com.diffplug.eclipse.apt' version '3.41.1'
}
group 'com.eactive'
@@ -49,10 +48,6 @@ compileJava {
options.encoding = 'UTF-8'
options.compilerArgs = ['-parameters']
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
aptOptions {
processorArgs = [ 'querydsl.generatedAnnotationClass' : 'com.querydsl.core.annotations.Generated' ]
}
}
war {
@@ -257,11 +252,11 @@ eclipse {
}
synchronizationTasks settingEclipseEncoding, initDirs
jdt {
apt {
// generated 된 패스 경로를 .setting/org.eclipse.jdt.apt.core.prefs 의 org.eclipse.jdt.apt.genSrcDir에 적용한다.
// project > properties > Java Compiler > Annoation Processing 화면에서 확인 가능하다.
genSrcDir = file(generatedJavaDir)
}
// apt {
// // generated 된 패스 경로를 .setting/org.eclipse.jdt.apt.core.prefs 의 org.eclipse.jdt.apt.genSrcDir에 적용한다.
// // project > properties > Java Compiler > Annoation Processing 화면에서 확인 가능하다.
// genSrcDir = file(generatedJavaDir)
// }
}
project {
if (!natures.contains('org.eclipse.buildship.core.gradleprojectnature')) {
@@ -36,7 +36,7 @@ class MonitoringContextImpl implements MonitoringContext {
@Autowired
private MonitoringContextDAO monitoringContextDAO;
private Properties properties = null;
private Properties properties = new Properties();
private String instancePropertyGroupName;
@@ -73,7 +73,10 @@ class MonitoringContextImpl implements MonitoringContext {
String hostIp = InetAddress.getLocalHost().getHostAddress();
this.instancePropertyGroupName = String
.format(MonitoringPropertyGroupService.MONITORING_PROPERTY_KEY_FORMAT, hostIp);
this.properties = monitoringContextDAO.getProperties(instancePropertyGroupName);
Properties loaded = monitoringContextDAO.getProperties(instancePropertyGroupName);
if (loaded != null) {
this.properties = loaded;
}
String eaiAgentId = System.getProperty(EAI_AGENTID);
if (StringUtils.isBlank(eaiAgentId)) {
@@ -22,6 +22,7 @@ import com.eactive.eai.data.entity.onl.message.QServiceMessageEntity;
import com.eactive.eai.data.entity.onl.routing.QRouting;
import com.eactive.eai.data.entity.onl.stdmessage.QStandardMessageInfo;
import com.eactive.eai.data.jpa.AbstractDataService;
import com.eactive.eai.rms.data.entity.onl.djb.apistatus.QApiStatus;
import com.eactive.eai.rms.data.entity.onl.authserver.QScopeInfo;
import com.eactive.eai.rms.data.entity.onl.bzwkdstcd.UserBusinessService;
import com.querydsl.core.BooleanBuilder;
@@ -45,26 +46,28 @@ public class EAIMessageService extends AbstractDataService<EAIMessageEntity, Str
QServiceMessageEntity qServiceMessageEntity = QServiceMessageEntity.serviceMessageEntity;
QRouting qRouting = QRouting.routing;
QStandardMessageInfo qStdInfo = QStandardMessageInfo.standardMessageInfo;
QApiStatus qApiStatus = QApiStatus.apiStatus;
JPAQuery<Tuple> jpaQuery = createBaseQuery(eaiMessageUISearch);
long totalCount = jpaQuery.select(QEAIMessageEntity.eAIMessageEntity.count()).fetchOne();
// 정렬 조건 설정
OrderSpecifier<?> orderSpecifier = getOrderSpecifier(qeaiMessageEntity, sortname, sortorder);
List<Tuple> eaiMessages = jpaQuery
.select(qeaiMessageEntity
, qServiceMessageEntity.psvintfacdsticname
, qServiceMessageEntity.psvsysadptrbzwkgroupname
, qRouting.nonmotivrouturiname
, qStdInfo.apifullpath
, qStdInfo.bzwksvckeyname
, qStdInfo.bzwksvckeyname
, qApiStatus.statusCode
)
.limit(pageable.getPageSize())
.offset(pageable.getOffset())
.orderBy(orderSpecifier)
.offset(pageable.getOffset())
.orderBy(orderSpecifier)
.fetch();
return new PageImpl<>(eaiMessages, pageable, totalCount);
@@ -105,6 +108,7 @@ public class EAIMessageService extends AbstractDataService<EAIMessageEntity, Str
QServiceMessageEntity qServiceMessageEntity = QServiceMessageEntity.serviceMessageEntity;
QRouting qRouting = QRouting.routing;
QStandardMessageInfo qStdInfo = QStandardMessageInfo.standardMessageInfo;
QApiStatus qApiStatus = QApiStatus.apiStatus;
BooleanBuilder predicate = createSelectListPredicate(eaiMessageUISearch);
@@ -114,6 +118,7 @@ public class EAIMessageService extends AbstractDataService<EAIMessageEntity, Str
, qRouting.nonmotivrouturiname
, qStdInfo.apifullpath
, qStdInfo.bzwksvckeyname
, qApiStatus.statusCode
)
.from(qeaiMessageEntity)
.join(qRouting)
@@ -122,6 +127,8 @@ public class EAIMessageService extends AbstractDataService<EAIMessageEntity, Str
.on(qServiceMessageEntity.id.svcprcssno.eq(1))
.leftJoin(qStdInfo)
.on(qeaiMessageEntity.eaisvcname.eq(qStdInfo.eaisvcname))
.leftJoin(qApiStatus)
.on(qeaiMessageEntity.eaisvcname.eq(qApiStatus.eaisvcname))
.where(predicate);
}
@@ -1,5 +1,6 @@
package com.eactive.eai.rms.data.entity.onl.inflow;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -63,11 +64,19 @@ public class InflowControlLogService
public Iterable<InflowControlLog> findAll(InflowControlHistoryManUISearch uiSearch) {
QInflowControlLog qInflowConfrolLog = QInflowControlLog.inflowControlLog;
String startTime = StringUtils.defaultIfEmpty(uiSearch.getSearchStartTime(), "000000");
String endTime = StringUtils.defaultIfEmpty(uiSearch.getSearchEndTime(), "235959");
BooleanBuilder booleanBuilder = new BooleanBuilder();
booleanBuilder
.and(qInflowConfrolLog.id.msgdpstyms
.between(uiSearch.getSearchStartDate() + "000000000",
uiSearch.getSearchEndDate() + "235959999"));
.between(uiSearch.getSearchStartDate() + startTime + "000",
uiSearch.getSearchEndDate() + endTime + "999"));
if (!StringUtils.isEmpty(uiSearch.getSearchInstanceName()))
booleanBuilder.and(qInflowConfrolLog.eaisevrinstncname.contains(uiSearch.getSearchInstanceName()));
if (!StringUtils.isEmpty(uiSearch.getSearchApiName()))
booleanBuilder.and(qInflowConfrolLog.eaisvcname.contains(uiSearch.getSearchApiName()));
if (!StringUtils.isEmpty(uiSearch.getSearchAdapterGroupName()))
booleanBuilder.and(qInflowConfrolLog.adptrbzwkgroupname.contains(uiSearch.getSearchAdapterGroupName()));
return super.repository.findAll(booleanBuilder);
}
}
@@ -27,6 +27,8 @@ import com.eactive.eai.rms.onl.manage.inflow.history.InflowControlHistoryManUISe
import com.eactive.eai.rms.onl.manage.inflow.inflow.InflowControlManMapper;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.Tuple;
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.core.types.dsl.StringPath;
import com.querydsl.jpa.impl.JPAQuery;
import com.querydsl.jpa.impl.JPAQueryFactory;
@@ -46,7 +48,12 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
@Autowired
InflowControlManMapper mapper;
public Page<InflowControlServiceDto> findAllForAdapter(Pageable pageable, String searchName) {
// 유량제어 미설정(useyn null)은 "사용안함" 검색 시 함께 조회되도록 처리
private static BooleanExpression useYnCondition(StringPath useYnPath, String searchUseYn) {
return "0".equals(searchUseYn) ? useYnPath.eq(searchUseYn).or(useYnPath.isNull()) : useYnPath.eq(searchUseYn);
}
public Page<InflowControlServiceDto> findAllForAdapter(Pageable pageable, String searchName, String searchUseYn) {
JPAQueryFactory jpaQueryFactory = new JPAQueryFactory(entityManager);
QAdapterGroup qAdapterGroup = QAdapterGroup.adapterGroup;
QInflowControl qInflowControl = QInflowControl.inflowControl;
@@ -54,6 +61,8 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
BooleanBuilder boolBuilder = new BooleanBuilder();
if (!StringUtils.isEmpty(searchName))
boolBuilder.and(qAdapterGroup.adptrbzwkgroupname.contains(searchName));
if (!StringUtils.isEmpty(searchUseYn))
boolBuilder.and(useYnCondition(qInflowControl.useyn, searchUseYn));
BooleanBuilder adapterWherePredicate = new BooleanBuilder(qAdapterGroup.adptriodstcd
.eq("I")
@@ -84,6 +93,10 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
long totalCount = jpaQueryFactory
.select(qAdapterGroup.adptrbzwkgroupname.count())
.from(qAdapterGroup)
.leftJoin(qInflowControl)
.on(qAdapterGroup.adptrbzwkgroupname
.eq(qInflowControl.id.name)
.and(qInflowControl.id.type.eq(ADAPTER_TYPE_INFLOW)))
.where(boolBuilder)
.fetchOne();
@@ -121,17 +134,22 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
return toDto(qAdapterGroup, qInflowControl, tuple);
}
public Page<InflowControlServiceDto> findAllForInterface(Pageable pageable, String searchName) {
public Page<InflowControlServiceDto> findAllForInterface(Pageable pageable, String searchName, String searchUseYn) {
JPAQueryFactory jpaQueryFactory = new JPAQueryFactory(entityManager);
QInflowControl qInflowControl = QInflowControl.inflowControl;
QEAIMessageEntity qEAIMessageEntity = QEAIMessageEntity.eAIMessageEntity;
BooleanBuilder boolBuilder = new BooleanBuilder();
boolBuilder.and(qEAIMessageEntity.eaisvcname.contains(searchName));
if (!StringUtils.isEmpty(searchUseYn))
boolBuilder.and(useYnCondition(qInflowControl.useyn, searchUseYn));
List<Tuple> tupleList = jpaQueryFactory
.select(qInflowControl, qEAIMessageEntity.eaisvcname, qEAIMessageEntity.eaisvcdesc)
.from(qEAIMessageEntity)
.leftJoin(qInflowControl)
.on(qInflowControl.id.type.eq(INTERFACE_TYPE_INFLOW).and(qInflowControl.id.name.eq(qEAIMessageEntity.eaisvcname)))
.where(qEAIMessageEntity.eaisvcname.contains(searchName))
.where(boolBuilder)
.orderBy(qEAIMessageEntity.eaisvcname.asc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
@@ -145,7 +163,9 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
long totalCount = jpaQueryFactory
.select(qEAIMessageEntity.eaisvcname.count())
.from(qEAIMessageEntity)
.where(qEAIMessageEntity.eaisvcname.contains(searchName))
.leftJoin(qInflowControl)
.on(qInflowControl.id.type.eq(INTERFACE_TYPE_INFLOW).and(qInflowControl.id.name.eq(qEAIMessageEntity.eaisvcname)))
.where(boolBuilder)
.fetchOne();
return new PageImpl<>(dtoList, pageable, totalCount);
}
@@ -199,19 +219,24 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
return toDto(qClientEntity, qInflowControl, tuple);
}
public Page<InflowControlServiceDto> findAllForClient(Pageable pageable, String searchName) {
public Page<InflowControlServiceDto> findAllForClient(Pageable pageable, String searchName, String searchUseYn) {
JPAQueryFactory jpaQueryFactory = new JPAQueryFactory(entityManager);
QInflowControl qInflowControl = QInflowControl.inflowControl;
QClientEntity qClientEntity = QClientEntity.clientEntity;
BooleanBuilder boolBuilder = new BooleanBuilder();
boolBuilder.and(qClientEntity.clientname.contains(searchName));
if (!StringUtils.isEmpty(searchUseYn))
boolBuilder.and(useYnCondition(qInflowControl.useyn, searchUseYn));
List<Tuple> tupleList = jpaQueryFactory
.select(qInflowControl, qClientEntity.clientid, qClientEntity.clientname)
.from(qClientEntity)
.leftJoin(qInflowControl)
.on(qInflowControl.id.type.eq(CLIENT_TYPE_INFLOW)
.and(qInflowControl.id.name.eq(qClientEntity.clientid)))
.where(qClientEntity.clientname.contains(searchName))
.where(boolBuilder)
.orderBy(qClientEntity.clientname.asc())
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
@@ -225,7 +250,10 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
long totalCount = jpaQueryFactory
.select(qClientEntity.clientname.count())
.from(qClientEntity)
.where(qClientEntity.clientname.contains(searchName))
.leftJoin(qInflowControl)
.on(qInflowControl.id.type.eq(CLIENT_TYPE_INFLOW)
.and(qInflowControl.id.name.eq(qClientEntity.clientid)))
.where(boolBuilder)
.fetchOne();
return new PageImpl<>(dtoList, pageable, totalCount);
}
@@ -266,12 +294,21 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
QInflowControlLog qInflowConfrolLog = QInflowControlLog.inflowControlLog;
QInflowControlGroup qinflowControlGroup = QInflowControlGroup.inflowControlGroup;
String startTime = StringUtils.defaultIfEmpty(uiSearch.getSearchStartTime(), "000000");
String endTime = StringUtils.defaultIfEmpty(uiSearch.getSearchEndTime(), "235959");
BooleanBuilder predicate = new BooleanBuilder();
predicate
.and(qInflowConfrolLog.id.msgdpstyms
.between(uiSearch.getSearchStartDate() + "000000000",
uiSearch.getSearchEndDate() + "235959999"));
.between(uiSearch.getSearchStartDate() + startTime + "000",
uiSearch.getSearchEndDate() + endTime + "999"));
if (!StringUtils.isEmpty(uiSearch.getSearchInstanceName()))
predicate.and(qInflowConfrolLog.eaisevrinstncname.contains(uiSearch.getSearchInstanceName()));
if (!StringUtils.isEmpty(uiSearch.getSearchApiName()))
predicate.and(qInflowConfrolLog.eaisvcname.contains(uiSearch.getSearchApiName()));
if (!StringUtils.isEmpty(uiSearch.getSearchAdapterGroupName()))
predicate.and(qInflowConfrolLog.adptrbzwkgroupname.contains(uiSearch.getSearchAdapterGroupName()));
return getJPAQueryFactory()
.select(
qInflowConfrolLog,
@@ -29,7 +29,8 @@ public interface ApiStatusRepository extends BaseRepository<ApiStatus, String> {
+ " FROM ("
+ " SELECT EAISVCNAME"
+ " , STATUS_CODE AS PREV_STATUS_CODE "
+ " , CASE WHEN STATUS_CODE != 'C' AND CTRL_YN = 'Y' THEN 'CONTROL_START'"
+ " , CASE WHEN COUNT = 0 THEN 'STAY' "
+ " WHEN STATUS_CODE != 'C' AND CTRL_YN = 'Y' THEN 'CONTROL_START'"
+ " WHEN STATUS_CODE = 'C' AND CTRL_YN = 'N' THEN 'CONTROL_END'"
+ " WHEN STATUS_CODE IN ('N','D') AND ERR_YN = 'Y' THEN 'ERROR_START'"
+ " WHEN STATUS_CODE = 'E' AND ERR_YN = 'N' THEN 'ERROR_END'"
@@ -39,6 +40,10 @@ public interface ApiStatusRepository extends BaseRepository<ApiStatus, String> {
+ " FROM ("
+ " SELECT A.EAISVCNAME"
+ " , NVL(B.STATUS_CODE, 'N') AS STATUS_CODE"
+ " , (SELECT COUNT(API_NAME) FROM API_STATS_MINUTE WHERE A.EAISVCNAME = API_NAME"
+ " AND TO_CHAR(STAT_TIME,'YYYYMMDDHH24MI')"
+ " BETWEEN TO_CHAR(SYSDATE - NUMTODSINTERVAL(30,'MINUTE'),'YYYYMMDDHH24MI')"
+ " AND TO_CHAR(SYSDATE,'YYYYMMDDHH24MI')) AS COUNT "
+ " , NVL(( SELECT MAX('Y') FROM EMSAPP.DJB_APISTATUS_INCIDENT_API X"
+ " WHERE EXISTS (SELECT 1 FROM EMSAPP.DJB_APISTATUS_INCIDENT Y WHERE X.INCIDENT_ID = Y.INCIDENT_ID "
+ " AND SYSTIMESTAMP BETWEEN STARTED_AT AND END_AT) "
@@ -46,7 +51,7 @@ public interface ApiStatusRepository extends BaseRepository<ApiStatus, String> {
+ " , (SELECT CASE WHEN TOTAL = 0 THEN 'X'"
+ " WHEN (TOTAL - SUCCESS) * 100 / TOTAL > :errorRate THEN 'Y'"
+ " ELSE 'N' END"
+ " FROM (SELECT SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT) AS TOTAL"
+ " FROM (SELECT NVL(SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT),0) AS TOTAL"
+ " , SUM(SUCCESS_CNT) AS SUCCESS"
+ " FROM API_STATS_MINUTE"
+ " WHERE A.EAISVCNAME = API_NAME"
@@ -56,7 +61,7 @@ public interface ApiStatusRepository extends BaseRepository<ApiStatus, String> {
+ " , (SELECT CASE WHEN TOTAL = 0 THEN 'X'"
+ " WHEN RESP_SUM / TOTAL > :delayAvgRespTime THEN 'Y'"
+ " ELSE 'N' END"
+ " FROM (SELECT SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT) AS TOTAL"
+ " FROM (SELECT NVL(SUM(SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT),0) AS TOTAL"
+ " , SUM(SUCCESS_CNT) AS SUCCESS"
+ " , SUM((SUCCESS_CNT + TIMEOUT_CNT + SYSTEM_ERR_CNT + BIZ_ERR_CNT) * AVG_RESP_TIME) AS RESP_SUM"
+ " FROM API_STATS_MINUTE"
@@ -43,12 +43,6 @@ public class DjbProperty {
)
private String apiAllowIpList = "10.15.106.*, 10.14.8.*, 10.15.8.*, 192.168.240.*, 127.0.0.1, 192.168.132.*, 192.168.131.*";
@DjbPropertyValue(
key = "djb.api_gw_metric.page_size",
description = "API GW Metric 조회시 페이지 크기 설정 (Integer, 0 = 무한, 기본값 10000)",
defaultValue = "10000"
)
private Integer apiGwMetricPageSize = 10000;
@@ -219,7 +219,12 @@ public class UmsService {
} else if ("KAKAO".equals(messageRequest.getMessageType())) {
dataVO.setLtrs_snd_tycd("2"); // 1:SMS 2:LMS/MMS
dataVO.setMsg_snd_tycd("1008"); // 알림톡 메세지 종류 0000:SMS, 1000:LMS, 1008:알림톡, ....
dataVO.setAlmtk_snd_prfl_key(propertyService.getPropertyValue("Monitoring", "djb.ums.sms.almtk_snd_prtl_key", "")); // 플러스친구아이디
//ADMIN으로 시작하면 제주은행 임직원, 나머지는 제주은행 고객용
if (messageRequest.getMessageCode().name().startsWith("ADMIN")) {
dataVO.setAlmtk_snd_prfl_key(propertyService.getPropertyValue("Monitoring", "djb.ums.sms.almtk_snd_prtl_key.intra", "")); // 제주은행 임직원 플러스친구아이디
} else {
dataVO.setAlmtk_snd_prfl_key(propertyService.getPropertyValue("Monitoring", "djb.ums.sms.almtk_snd_prtl_key.public", "")); // 제주은행 플러스친구아이디
}
dataVO.setAlmtk_tmplt_cd(BZWK_DVCD + TEAM_DVCD + SUB_BZWK_CD + "001"); // 템플릿코드
dataVO.setAlmtk_err_ltrs_snd_yn("Y"); // 오류자문자발송여부
dataVO.setAlmtk_btn_trnm_tycd("2"); // 카카오버튼전송방식 1-format string 2-JSON 3-XML
@@ -1,23 +1,5 @@
package com.eactive.eai.rms.onl.apim.obp;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.eactive.apim.portal.apprequest.entity.AppRequest;
import com.eactive.apim.portal.apprequest.repository.AppRequestRepository;
import com.eactive.apim.portal.obp.entity.ObpGwMetric;
@@ -28,7 +10,18 @@ import com.eactive.eai.rms.common.util.CommonUtil;
import com.eactive.eai.rms.data.entity.onl.apim.obp.ObpGwMetricJpaDAO;
import com.eactive.eai.rms.data.entity.onl.apim.obp.ObpGwMetricService;
import com.eactive.eai.rms.data.entity.onl.apim.obp.ObpGwMetricVO;
import com.eactive.eai.rms.ext.djb.common.DjbPropertyHolder;
//import com.eactive.ext.kjb.common.KjbPropertyHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
/**
* ObpGwMetric Man Service - 비즈니스 로직
@@ -335,7 +328,7 @@ public class ObpGwMetricManService extends BaseService {
DataSourceTypeManager.getDataSourceType(DataSourceTypeManager.MONITORING));
// KjbProperty에서 pageSize 읽기
Integer pageSize = DjbPropertyHolder.get().getApiGwMetricPageSize();
Integer pageSize = null; //KjbPropertyHolder.get().getApiGwMetricPageSize();
if (pageSize == null) {
pageSize = 10000; // 기본값 (null 안전 처리)
}
@@ -37,10 +37,12 @@ public class InboundErrorInfoManService extends BaseService {
InboundErrorInfoUI ui = inboundErrorInfoUIMapper.toVo(inboundErrorInfoService.getById(eaiSvcSerno));
adapterGroupService.findById(ui.getAdptrBzwkGroupName()).ifPresent(a -> {
ui.setAdptrMsgDstcd(a.getAdptrmsgdstcd());
ui.setAdptrMsgPtrncd(a.getAdptrmsgptrncd());
});
if (ui.getAdptrBzwkGroupName() != null) {
adapterGroupService.findById(ui.getAdptrBzwkGroupName()).ifPresent(a -> {
ui.setAdptrMsgDstcd(a.getAdptrmsgdstcd());
ui.setAdptrMsgPtrncd(a.getAdptrmsgptrncd());
});
}
return ui;
}
@@ -17,6 +17,7 @@ import com.eactive.eai.data.entity.onl.server.EAIServer;
import com.eactive.eai.rms.common.base.OnlBaseService;
import com.eactive.eai.rms.data.entity.onl.adapter.AdapterGroupService;
import com.eactive.eai.rms.data.entity.onl.server.EAIServerService;
import com.eactive.eai.rms.onl.common.exception.BizException;
@Service
@Transactional
@@ -78,6 +79,11 @@ public class ServerManService extends OnlBaseService {
}
public void insert(EAIServerUI eaiServerUI) {
String eaiSevrInstncName = eaiServerUI.getEaiSevrInstncName();
if (eaiServerService.existsById(eaiSevrInstncName)) {
throw new BizException("서버 인스턴스명[" + eaiSevrInstncName + "]은 이미 등록되어 있습니다.");
}
EAIServer eaiServer = eaiServerUIMapper.toEntity(eaiServerUI);
eaiServerService.save(eaiServer);
}
@@ -59,8 +59,8 @@ public class InflowGroupControlManController extends OnlBaseAnnotationController
*/
@RequestMapping(value = "/onl/admin/inflow/inflowGroupControlMan.json", params = "cmd=LIST")
public ResponseEntity<GridResponse<InflowGroupControlManUI>> selectList(HttpServletRequest request,
Pageable pageVo, String searchGroupName) {
Page<InflowGroupControlManUI> uiPage = service.selectGroupList(pageVo, searchGroupName);
Pageable pageVo, String searchGroupName, String searchUseYn) {
Page<InflowGroupControlManUI> uiPage = service.selectGroupList(pageVo, searchGroupName, searchUseYn);
return ResponseEntity.ok(new GridResponse<>(uiPage));
}
@@ -61,7 +61,7 @@ public class InflowGroupControlManService extends BaseService {
/**
* 그룹 목록 조회
*/
public Page<InflowGroupControlManUI> selectGroupList(Pageable pageable, String searchGroupName) {
public Page<InflowGroupControlManUI> selectGroupList(Pageable pageable, String searchGroupName, String searchUseYn) {
JPAQueryFactory jpaQueryFactory = new JPAQueryFactory(entityManager);
QInflowControlGroup qGroup = QInflowControlGroup.inflowControlGroup;
@@ -69,6 +69,10 @@ public class InflowGroupControlManService extends BaseService {
if (!StringUtils.isEmpty(searchGroupName)) {
boolBuilder.and(qGroup.groupName.contains(searchGroupName));
}
if (!StringUtils.isEmpty(searchUseYn)) {
// 유량제어 미설정(useYn null)은 "사용안함" 검색 시 함께 조회되도록 처리
boolBuilder.and("0".equals(searchUseYn) ? qGroup.useYn.eq(searchUseYn).or(qGroup.useYn.isNull()) : qGroup.useYn.eq(searchUseYn));
}
List<InflowControlGroup> groupList = jpaQueryFactory
.selectFrom(qGroup)
@@ -24,4 +24,29 @@ public class InflowControlHistoryManUISearch {
* 유량제어일 끝(20231221)
*/
private String searchEndDate;
/**
* 유량제어일 시작 시간(000000)
*/
private String searchStartTime;
/**
* 유량제어일 끝 시간(235959)
*/
private String searchEndTime;
/**
* 인스턴스명
*/
private String searchInstanceName;
/**
* API 명
*/
private String searchApiName;
/**
* 어댑터그룹명
*/
private String searchAdapterGroupName;
}
@@ -42,8 +42,8 @@ public class InflowAdapterControlManController extends OnlBaseAnnotationControll
@RequestMapping(value = "/onl/admin/inflow/inflowAdapterControlMan.json", params = "cmd=LIST")
public ResponseEntity<GridResponse<InflowControlManUI>> selectList(HttpServletRequest request, Pageable pageVo,
String searchName) {
Page<InflowControlManUI> uiPage = service.selectAdapterList(pageVo, searchName);
String searchName, String searchUseYn) {
Page<InflowControlManUI> uiPage = service.selectAdapterList(pageVo, searchName, searchUseYn);
return ResponseEntity.ok(new GridResponse<>(uiPage));
}
@@ -44,8 +44,8 @@ public class InflowClientControlManController extends OnlBaseAnnotationControlle
@RequestMapping(value = "/onl/admin/inflow/inflowClientControlMan.json", params = "cmd=LIST")
public ResponseEntity<GridResponse<InflowControlManUI>> selectList(HttpServletRequest request, Pageable pageVo,
String searchName) {
Page<InflowControlManUI> uiPage = service.selectClientList(pageVo, searchName);
String searchName, String searchUseYn) {
Page<InflowControlManUI> uiPage = service.selectClientList(pageVo, searchName, searchUseYn);
return ResponseEntity.ok(new GridResponse<>(uiPage));
}
@@ -1,5 +1,6 @@
package com.eactive.eai.rms.onl.manage.inflow.inflow;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -16,6 +17,7 @@ import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import com.eactive.eai.data.entity.onl.inflow.InflowControl;
import com.eactive.eai.data.entity.onl.inflow.InflowControlId;
@@ -50,8 +52,8 @@ public class InflowControlManService extends BaseService {
private RestTemplate restTemplate = new RestTemplate();
// 어댑터 유량제어
public Page<InflowControlManUI> selectAdapterList(Pageable pageable, String searchName) {
Page<InflowControlServiceDto> dtoList = service.findAllForAdapter(pageable, searchName);
public Page<InflowControlManUI> selectAdapterList(Pageable pageable, String searchName, String searchUseYn) {
Page<InflowControlServiceDto> dtoList = service.findAllForAdapter(pageable, searchName, searchUseYn);
return dtoList.map(mapper::toVo);
}
@@ -84,8 +86,8 @@ public class InflowControlManService extends BaseService {
}
// 인터페이스 유량제어
public Page<InflowControlManUI> selectInterfaceList(Pageable pageable, String searchName) {
Page<InflowControlServiceDto> dtoList = service.findAllForInterface(pageable, searchName);
public Page<InflowControlManUI> selectInterfaceList(Pageable pageable, String searchName, String searchUseYn) {
Page<InflowControlServiceDto> dtoList = service.findAllForInterface(pageable, searchName, searchUseYn);
return dtoList.map(mapper::toVo);
}
@@ -118,8 +120,8 @@ public class InflowControlManService extends BaseService {
// 클라이언트 유량제어
public Page<InflowControlManUI> selectClientList(Pageable pageable, String searchName) {
Page<InflowControlServiceDto> dtoList = service.findAllForClient(pageable, searchName);
public Page<InflowControlManUI> selectClientList(Pageable pageable, String searchName, String searchUseYn) {
Page<InflowControlServiceDto> dtoList = service.findAllForClient(pageable, searchName, searchUseYn);
return dtoList.map(mapper::toVo);
}
@@ -181,9 +183,12 @@ public class InflowControlManService extends BaseService {
serverStatus.put("serverPort", serverPort);
try {
String url = String.format("http://%s:%s/manage/inflow/%s/%s/bucket-status",
serverIp, serverPort, target, targetId);
ResponseEntity<Map> response = restTemplate.getForEntity(url, Map.class);
URI uri = UriComponentsBuilder.fromHttpUrl(String.format("http://%s:%s/manage/inflow", serverIp, serverPort))
.pathSegment(target, targetId, "bucket-status")
.build()
.encode()
.toUri();
ResponseEntity<Map> response = restTemplate.getForEntity(uri, Map.class);
if (response.getBody() != null && Boolean.TRUE.equals(response.getBody().get("success"))) {
serverStatus.put("status", "online");
@@ -42,8 +42,8 @@ public class InflowInterfaceControlManController extends OnlBaseAnnotationContro
@RequestMapping(value = "/onl/admin/inflow/inflowInterfaceControlMan.json", params = "cmd=LIST")
public ResponseEntity<GridResponse<InflowControlManUI>> selectList(HttpServletRequest request, Pageable pageVo,
String searchName) {
Page<InflowControlManUI> uiPage = service.selectInterfaceList(pageVo, searchName);
String searchName, String searchUseYn) {
Page<InflowControlManUI> uiPage = service.selectInterfaceList(pageVo, searchName, searchUseYn);
return ResponseEntity.ok(new GridResponse<>(uiPage));
}
@@ -127,6 +127,7 @@ public class LayoutDao extends SqlMapClientTemplateDao {
entity.setLoutitemminoccurnoitm((Integer) param.get("loutItemMinOccurNoitm"));
entity.setLoutitembascval((String) param.get("loutItemBascVal"));
entity.setLoutitemmskyn((String) param.get("loutItemMskYn"));
entity.setLoutitemmaskoffset((Integer) param.get("loutItemMaskOffset"));
entity.setLoutitemmasklength((Integer) param.get("loutItemMaskLength"));
entity.setLoutdptcnt((Integer) param.get("lyoutDptCnt"));
entity.setDecptlencnt((Integer) param.get("decptLenCnt"));
@@ -39,8 +39,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.View;
import org.xml.sax.InputSource;
import com.eactive.apim.portal.monitoringcode.entity.MonitoringCode;
import com.eactive.apim.portal.monitoringcode.entity.MonitoringCodeId;
import com.eactive.eai.agent.command.CommonCommand;
import com.eactive.eai.common.util.UUIDGenerator;
import com.eactive.eai.rms.data.entity.man.monitoringCode.service.MonitoringCodeService;
import com.eactive.eai.rms.common.base.OnlBaseAnnotationController;
import com.eactive.eai.rms.common.context.MonitoringContext;
import com.eactive.eai.rms.common.datasource.DataSourceContextHolder;
@@ -66,16 +69,19 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
@Autowired
@Qualifier("layoutSyncService")
private LayoutSyncService service;
@Autowired
@Qualifier("monitoringContext")
private MonitoringContext monitoringContext;
@Autowired
private KJBTransformService transformService;
@Autowired
private KJBInterfaceService interfaceService;
@Autowired
private MonitoringCodeService monitoringCodeService;
/**
@@ -350,14 +356,28 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
if( _i.get("mask") != null && _i.get("mask").equals("Y"))
{
item.put("loutItemMskYn", "Y");
item.put("loutItemMskCode", _i.get("mask2"));
// DJB : mask2에 마스킹 코드가 있으면 offset에 mask2 입력 length=0으로, 기존 마스킹은 length만 입력
// 엔진에서는 length가 0이면 masking code로, 0보다 크면 기존 마스킹으로 적용
String mask2 = (String) _i.get("mask2");
if (mask2 == null || mask2.equals("")) {
item.put("loutitemMaskOffset", 0);
item.put("loutItemMaskLength",Integer.parseInt((String) _i.get("maskLength")));
} else {
String maskingCode = monitoringCodeService.findById(new MonitoringCodeId("MASKING_CODE", mask2))
.map(MonitoringCode::getCodeName)
.orElse("99");
item.put("loutItemMskCode", maskingCode);
item.put("loutItemMaskOffset", Integer.parseInt(maskingCode));
item.put("loutItemMaskLength",0);
}
}
else
{
item.put("loutItemMskYn",_i.get("mask")); // [Y/N/ ]
}
if( "Y".equals(item.get("loutItemMskYn")) ) item.put("loutItemMaskLength",Integer.parseInt((String) _i.get("maskLength")));
item.put("lyoutDptCnt",Integer.parseInt((String) _i.get("depth")) + 1 ); // 통합인터페이스 전달되는 Depth + 1을 해야 함
item.put("decptLenCnt","".equals(_i.get("scale")) ? 0 : Integer.parseInt((String) _i.get("scale"))); // 소수점길이 META에서 "" 이면 "" 으로 표현함
item.put("loutItemMskTarget", _i.get("maskTarget"));
@@ -683,9 +703,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
param.put("recvData", "");
}
//syncLayout(param, recvTime, json);
syncLayoutDjb(param, recvTime, json);
syncLayout(param, recvTime, json);
// results.getChild("Result").setText("S".equals(param.get("prcssRslt"))?"True":"False");
// results.getChild("ResultMessage").setText("S".equals(param.get("prcssRslt"))?"성공":param.get("prcssRsltCmnt"));
@@ -902,11 +920,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
private void syncLayout(HashMap<String, String> param, JSONObject body, String command, JSONObject layout)
throws Exception, BizException, ParseException {
String id = (String) layout.get("id");
String layoutName = (String) layout.get("layoutName");
if (StringUtils.isEmpty(layoutName)) {
layoutName = id;
}
String layoutName = (String) layout.get("id");
String useSystem = (String) layout.get("usesystem");
param.put("logPrcssSeqno", UUIDGenerator.getUUID());
@@ -941,7 +955,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
break;
}
if(!id.matches(fattern)) {
if(!layoutName.matches(fattern)) {
throw new BizException("잘못된 전문레이아웃명 입니다.\n명명규칙을 확인하세요.\n"+fattern);
}
@@ -961,8 +975,7 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
// Layout Format (TR07)
vo.put("loutName",layoutName);
vo.put("loutPtrnName",msgType); // ASCII, EBCDIC, XML
vo.put("loutDesc",layout.get("desc"));
vo.put("useYn", "1");
vo.put("loutDesc",layout.get("desc"));
String date = (String) layout.get("date");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -1190,63 +1203,5 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
}
return null ;
}
private void syncLayoutDjb(HashMap<String, String> param, String recvTime, JSONObject json)
throws Exception, BizException, ParseException {
JSONObject header = (JSONObject) ((JSONObject) json.get("Message")).get("Header");
JSONObject body = (JSONObject) ((JSONObject) json.get("Message")).get("Body");
String serviceName = (String) header.get("ServiceName");
String command = (String) header.get("Command");
param.put("serviceName", serviceName);
param.put("command", command);
param.put("recvAmndHMS", recvTime);
Object layoutObject = body.get("Layout");
JSONArray layoutArray = null;
if (layoutObject instanceof JSONArray) {
String interfaceId = (String) body.get("interfaceCode");
if (interfaceId.startsWith("ES")) {
interfaceId = interfaceId.replaceFirst("ES", "AS");
}
layoutArray = (JSONArray) layoutObject;
for (int i = 0; i < layoutArray.size(); i++) {
JSONObject layout = (JSONObject)layoutArray.get(i);
String usesystem = (String)layout.get("usesystem");
if ("EAI".equals(usesystem)) {
String id = (String)layout.get("id");
String inOutType = "OPA".equals(id.substring(5,8)) ? "S1" : "S2";
String group = (String)layout.get("group");
String ioType = (String)layout.get("ioType");
if ("I".equals(ioType)) {
layout.put("layoutName", group + "_" + interfaceId + inOutType + "_SRCS");
syncLayout(param, body, command, layout);
layout.put("layoutName", group + "_" + interfaceId + inOutType + "_TGTS");
syncLayout(param, body, command, layout);
} else {
layout.put("layoutName", group + "_" + interfaceId + inOutType + "_SRCR");
syncLayout(param, body, command, layout);
layout.put("layoutName", group + "_" + interfaceId + inOutType + "_TGTR");
syncLayout(param, body, command, layout);
}
}
}
} else {
throw new BizException("단독 레이아웃 연동은 지원하지 않습니다.");
}
}
}
@@ -101,6 +101,11 @@ public class Transform2Controller extends BaseController {
public String popupCalendarView() {
return "/onl/admin/rule/transform2/transform2ManPopupCalendar";
}
@GetMapping(value = "/onl/admin/rule/transform2/transform2Man.view", params = "cmd=API_POPUP")
public String apiPopupView() {
return "/onl/admin/rule/transform2/transform2ManApiPopup";
}
@PostMapping(value = "/onl/admin/rule/transform2/transform2Man.json", params = "cmd=LIST_INIT_COMBO")
public ResponseEntity<Map<String, Object>> initCombo(HttpServletRequest request, String eaiSvcName, String cnvsnName) {
@@ -8,6 +8,7 @@ import com.eactive.eai.data.entity.onl.message.ServiceMessageEntityId;
import com.eactive.eai.data.entity.onl.messagekey.MessageKey;
import com.eactive.eai.data.entity.onl.stdmessage.QStandardMessageInfo;
import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
import com.eactive.eai.rms.data.entity.onl.djb.apistatus.QApiStatus;
import com.eactive.eai.rms.common.base.OnlBaseService;
import com.eactive.eai.rms.common.combo.ComboService;
import com.eactive.eai.rms.common.combo.ComboVo;
@@ -140,6 +141,7 @@ public class ApiInterfaceService extends OnlBaseService {
String apiFullPath = tuple.get(QStandardMessageInfo.standardMessageInfo.apifullpath);
String bzwksvckeyname = tuple.get(QStandardMessageInfo.standardMessageInfo.bzwksvckeyname);
String statusCode = tuple.get(QApiStatus.apiStatus.statusCode);
ApiInterfaceUI apiInterfaceUI;
if (eaiMessageEntity.getServiceMessages() != null && eaiMessageEntity.getServiceMessages().size() > 0) {
@@ -147,10 +149,11 @@ public class ApiInterfaceService extends OnlBaseService {
} else {
apiInterfaceUI = apiInterfaceUIMapper.toVo(eaiMessageEntity);
}
apiInterfaceUI.setApiFullPath(apiFullPath);
apiInterfaceUI.setBzwksvckeyname(bzwksvckeyname);
apiInterfaceUI.setStatusCode(statusCode);
return apiInterfaceUI;
});
}
@@ -448,14 +448,24 @@ public class ApiSpecManService {
// 헤더/바디 분리
RequestComponents components = separateHeaderAndBody(requestLayout.getLayoutItems());
// 헤더 파라미터 처리
if (!components.headerItems.isEmpty()) {
boolean bodyRequired = isRequestBodyRequired(httpMethod);
// 헤더 파라미터 + (POST/PUT 아니면) 요청 바디 항목을 쿼리스트링 파라미터로 함께 담는다.
boolean hasHeader = !components.headerItems.isEmpty();
boolean queryFromBody = !bodyRequired && !components.bodyItems.isEmpty();
if (hasHeader || queryFromBody) {
ArrayNode parameters = operation.putArray("parameters");
generateHeaderParameters(parameters, components.headerItems);
if (hasHeader) {
generateHeaderParameters(parameters, components.headerItems);
}
// GET/DELETE 바디 미사용 메소드: 요청 레이아웃 바디 항목 쿼리 파라미터(in=query)
if (queryFromBody) {
generateQueryParameters(parameters, components.bodyItems);
}
}
// Body 처리 (POST, PUT 메소드인 경우)
if (isRequestBodyRequired(httpMethod)) {
if (bodyRequired) {
ObjectNode requestBody = operation.putObject("requestBody");
requestBody.put("required", true);
ObjectNode content = requestBody.putObject("content");
@@ -561,6 +571,35 @@ public class ApiSpecManService {
}
}
/**
* GET/DELETE 바디 미사용 메소드: 요청 레이아웃 바디 항목을 쿼리스트링 파라미터(in=query) 매핑.
* 스칼라 FIELD 대상(GROUP/GRID 중첩 객체·배열은 쿼리스트링에 부적합하여 제외), root(serno 0) 스킵.
*/
private void generateQueryParameters(ArrayNode parameters, List<LayoutItemUI> bodyItems) {
for (LayoutItemUI item : bodyItems) {
if (item.getLoutItemSerno() != null && item.getLoutItemSerno() == 0) {
continue;
}
if (!"FIELD".equalsIgnoreCase(item.getLoutItemType())) {
continue;
}
ObjectNode parameter = parameters.addObject();
parameter.put("name", item.getLoutItemName());
parameter.put("in", "query");
if (StringUtils.isNotEmpty(item.getLoutItemDesc())) {
parameter.put("description", item.getLoutItemDesc());
}
parameter.put("required", false); // 기본값 false, 필요시 사용자가 변경
ObjectNode schema = parameter.putObject("schema");
schema.put("type", mapSwaggerType(item.getLoutItemDataType()));
int length = item.getLoutItemLength();
if (length > 0) {
schema.put("maxLength", length);
}
}
}
private void generateResponseHeaders(ObjectNode headers, List<LayoutItemUI> headerItems) {
for (LayoutItemUI item : headerItems) {
if ("FIELD".equalsIgnoreCase(item.getLoutItemType())) {
@@ -637,6 +676,7 @@ public class ApiSpecManService {
return "integer";
case "DECIMAL":
case "DOUBLE":
case "BIGDECIMAL":
return "number";
case "BOOLEAN":
return "boolean";
@@ -53,6 +53,7 @@ public class ApiInterfaceUI {
private String apiFullPath;
private String bzwksvckeyname;
private String statusCode;
//ASYNC-SYNC
private String inboundResponseHttpMethod;