자동 로그아웃 설정 변경
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-08-26 14:59:29 +09:00
parent e69e1a1031
commit 497b72c52a
9 changed files with 53 additions and 13 deletions
+32 -3
View File
@@ -555,7 +555,35 @@
<% session.setAttribute("dualLogin", "N"); %>
}
});
});
// 세션(자동로그아웃) 타임아웃 카운트다운 - main.jsp의 유휴시간 판단과 동일한 sessionStorage 값을 공유한다.
(function () {
var IDLE_MS = ${autoLogoutTimeout} * 60 * 1000;
function getLastActivity() {
var t = sessionStorage.getItem('lastActivity');
return t ? parseInt(t, 10) : Date.now();
}
function formatRemain(ms) {
if (ms < 0) ms = 0;
var totalSec = Math.floor(ms / 1000);
var mm = Math.floor(totalSec / 60);
var ss = totalSec % 60;
return (mm < 10 ? '0' + mm : mm) + ':' + (ss < 10 ? '0' + ss : ss);
}
function updateSessionTimeoutTimer() {
var remain = IDLE_MS - (Date.now() - getLastActivity());
$('#sessionTimeoutTimer').text('세션 만료까지 ' + formatRemain(remain));
}
$(function () {
updateSessionTimeoutTimer();
setInterval(updateSessionTimeoutTimer, 1000);
});
})();
</script>
</head>
@@ -568,11 +596,12 @@
<ul>
<li style="width:240px;">
<a style="width:240px; cursor: default"
href="#"><span><%=SessionManager.getUserName(request) %>(<%=SessionManager.getUserId(request) %>-<%=System.getProperty("inst.Name") %>)</span>
href="#"><span><%=SessionManager.getUserName(request) %>(<%=SessionManager.getUserId(request) %></span>
<span onClick="javascript:openColorPopup();"><%=localeMessage.getString("screen.customer") %></span>
<% if (!"".equals(LastLoginYms.trim())) { %>
<span style="display:block;font-size:10px;"><%=localeMessage.getString("screen.lastLogin") %> : <%=LastLoginYms%> [ <%=LastLoginIp%> ]</span>
<span style="display:block;font-size:10px;"><%=localeMessage.getString("screen.lastLogin") %> : <%=LastLoginYms%></span>
<% } %>
<span id="sessionTimeoutTimer" style="display:block;font-size:10px;"></span>
</a></li>
<li style="width:100px; line-height:80px; text-align:center;">
<select id="selectLocale" name="locale" style="width:60px; padding: 2px; text-align:center;">