From aaef3b21123b0e72d68b4fe68669a9a8f6940419 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Thu, 23 May 2024 10:31:08 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8:=20=EB=8C=80=EC=83=81=20=EC=88=98=EC=A0=95,=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/adds/AppLogFilter.java | 15 +- .../java/cokr/xit/base/LoggingController.java | 7 + .../sql/mapper/base/actiongroup-mapper.xml | 5 +- .../sql/mapper/base/syslog-mapper.xml | 40 +++++ .../WEB-INF/jsp/base/syslog/syslog-main.jsp | 155 ++++++++++++++++++ .../webapp/resources/js/base/actionGroup.js | 5 + 6 files changed, 221 insertions(+), 6 deletions(-) create mode 100644 src/main/java/cokr/xit/base/LoggingController.java create mode 100644 src/main/webapp/WEB-INF/jsp/base/syslog/syslog-main.jsp diff --git a/src/main/java/cokr/xit/adds/AppLogFilter.java b/src/main/java/cokr/xit/adds/AppLogFilter.java index 3ff8907..7ad758b 100644 --- a/src/main/java/cokr/xit/adds/AppLogFilter.java +++ b/src/main/java/cokr/xit/adds/AppLogFilter.java @@ -10,16 +10,23 @@ import cokr.xit.base.syslog.service.bean.LogFilter; */ @Component("logFilter") public class AppLogFilter extends LogFilter { + private String[] ignore = { + "login.do", "logout.do", + "/user/", "/authority/", "/code/", "/menu/", "/syslog/", "/error/" + }; @Override protected boolean customFilter(ServiceLog log) { switch (log.getType()) { case ServiceLog.LOG_INOUT: case ServiceLog.DOWNLOAD: return true; case ServiceLog.WEB: - String url = log.getUrl(); - return !url.contains("login.do") - && !url.contains("logout.do") - && !url.contains("/error/"); + String url = blankIfEmpty(log.getUrl()); + for (String str: ignore) { + if (url.contains(str)) + return false; + } + + return true; default: return false; } } diff --git a/src/main/java/cokr/xit/base/LoggingController.java b/src/main/java/cokr/xit/base/LoggingController.java new file mode 100644 index 0000000..8af7655 --- /dev/null +++ b/src/main/java/cokr/xit/base/LoggingController.java @@ -0,0 +1,7 @@ +package cokr.xit.base; + +import org.springframework.stereotype.Component; + +@Component +public class LoggingController extends cokr.xit.base.syslog.web.LoggingController { +} \ No newline at end of file diff --git a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml index f42bb2e..14ea855 100644 --- a/src/main/resources/sql/mapper/base/actiongroup-mapper.xml +++ b/src/main/resources/sql/mapper/base/actiongroup-mapper.xml @@ -48,11 +48,12 @@ DELETE FROM TB_ACTION_GRP WHERE GRP_ID IN (#{groupID}) + + /* 그룹별 기능 추가(actionGroupMapper.addActions) */ INSERT INTO TB_GRP_ACTION (GRP_ID, ACTION, REG_DT, RGTR) diff --git a/src/main/resources/sql/mapper/base/syslog-mapper.xml b/src/main/resources/sql/mapper/base/syslog-mapper.xml index fea2b2f..9a2fb53 100644 --- a/src/main/resources/sql/mapper/base/syslog-mapper.xml +++ b/src/main/resources/sql/mapper/base/syslog-mapper.xml @@ -16,6 +16,46 @@ + + /* 시스템 로그 등록(loggingMapper.insertLog) */ SELECT CONCAT(TODAY, LPAD(NVL(SUBSTR(MAX(LOG_ID), 9) + 1, 1), 16, '0')) NEW_ID diff --git a/src/main/webapp/WEB-INF/jsp/base/syslog/syslog-main.jsp b/src/main/webapp/WEB-INF/jsp/base/syslog/syslog-main.jsp new file mode 100644 index 0000000..3eedfa1 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/base/syslog/syslog-main.jsp @@ -0,0 +1,155 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> +<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> +시스템 로그 + +
+ +
+ + \ No newline at end of file diff --git a/src/main/webapp/resources/js/base/actionGroup.js b/src/main/webapp/resources/js/base/actionGroup.js index 583ace5..cf83d14 100644 --- a/src/main/webapp/resources/js/base/actionGroup.js +++ b/src/main/webapp/resources/js/base/actionGroup.js @@ -56,6 +56,11 @@ class ActionGroupControl { onCurrentGroupChange(item) {} onGroupSelect(selected) {} + + getActions(groupID, pageNum) { + this.actions.query.groupIDs = groupID; + this.actions.load(pageNum); + } async selectActionGroup() { return new Promise((resolve, reject) => {