@@ -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>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ public class ApiInterfaceUI {
|
||||
|
||||
private String apiFullPath;
|
||||
private String bzwksvckeyname;
|
||||
private String statusCode;
|
||||
|
||||
//ASYNC-SYNC 용
|
||||
private String inboundResponseHttpMethod;
|
||||
|
||||
Reference in New Issue
Block a user