Jelajahi Sumber

maintenace 1th

shjung 2 tahun lalu
induk
melakukan
5edb993cef

+ 1 - 0
src/main/java/com/its/pis/entity/TbPisInfr.java

@@ -41,6 +41,7 @@ public class TbPisInfr {
 	private int PIS_CYCLE;
 	private String PIS_CLCT_YN;
 	private String DEL_YN;
+	private long lastRecvTime;
 
 	private Map<String, TbPrkPlce>  rltnPrkPlce;
 	private int 			 		netState;

+ 8 - 0
src/main/java/com/its/pis/scheduler/SchedulerTask.java

@@ -36,6 +36,14 @@ public class SchedulerTask {
         log.info("          UnitSystSchedule: ..end. {} ms. {}", elapsed.milliSeconds(), Thread.currentThread().getName());
     }
 
+    @Scheduled(cron = "0/5 * * * * *")  // 5초 주기 작업 실행
+    public void C2FSessionManageSchedule() {
+        if (!this.processConfig.isStartSchedule()) {
+            return;
+        }
+        this.pisInfrService.monitoringC2FSession();
+    }
+
     @PreDestroy
     public void onShutDown() {
         this.unitSystService.updateUnitSystStts(false);

+ 23 - 1
src/main/java/com/its/pis/service/PisInfrService.java

@@ -61,7 +61,7 @@ public class PisInfrService {
         List<TbPisInfr> objList = this.pisInfrMapper.selectAll();
         for (TbPisInfr obj : objList) {
             obj.setPIS_IP(obj.getPIS_IP().trim());
-            obj.setPIS_CYCLE(Math.max(5, obj.getPIS_CYCLE()));
+            obj.setPIS_CYCLE(Math.max(10, obj.getPIS_CYCLE()));
             obj.getStts().setPIS_NMBR(obj.getPIS_NMBR());
             obj.getStts().initStts(false);
 
@@ -277,4 +277,26 @@ public class PisInfrService {
         }
     }
 
+    /**
+     * 세션 연결후 주차정보 업로드 주기동안 데이터가 올라오지 않으면 실시간 정보를 요청한다.
+     * 마지막 수신시각에서 60초 이상 지나면 세션연결을 종료한다.
+     */
+    public void monitoringC2FSession() {
+        long currMilliSeconds = System.currentTimeMillis();
+        for (Map.Entry<String, TbPisInfr> e : AppRepository.getInstance().getPisInfrMap().entrySet()) {
+            TbPisInfr pis = e.getValue();
+            if (pis.getNetState() >= NET.LOGIN_REQ && pis.getSession() != null) {
+                // 주차정보시스템 통신정상
+                long recvTimout = currMilliSeconds - pis.getLastRecvTime();
+                if (recvTimout > 60000) {
+                    pis.channelClosed();
+                    continue;
+                }
+
+                if (recvTimout > (pis.getPIS_CYCLE() * 1000L)) {
+                    pis.requestRlTimeInfo();
+                }
+            }
+        }
+    }
 }

+ 2 - 10
src/main/java/com/its/pis/ui/MainUI.java

@@ -176,8 +176,8 @@ public class MainUI {
             public void mouseClicked(MouseEvent me) {
                 // double click
                 if (me.getClickCount() == 2) {
-//                    if (!updateControllerInfo()) {
-//                    }
+                    if (!updateControllerInfo()) {
+                    }
                 }
             }
         });
@@ -219,14 +219,6 @@ public class MainUI {
                 message = "주차장 실시간 정보를 요청 하시겠습니까?";
                 title = "주차장 실시간 정보 요청";
                 break;
-            case 3:
-                message = "제어기를 초기화 하시겠습니까?";
-                title = "제어기 초기화";
-                break;
-            case 4:
-                message = "제어기의 정지영상 정보를 요청하시겠습니까?";
-                title = "제어기 정지영상 요청";
-                break;
             default:
                 return;
         }

+ 2 - 0
src/main/java/com/its/pis/websocket/PisWebSocketHandler.java

@@ -98,6 +98,8 @@ public class PisWebSocketHandler extends TextWebSocketHandler {
             return;
         }
 
+        pis.setLastRecvTime(System.currentTimeMillis());
+
         if (pis.getSession() != null) {
             WebSocketSession pisSession = pis.getSession().getSession();
             if (pisSession != null && pisSession.isOpen()) {

+ 39 - 43
src/main/java/com/its/pis/websocket/PisWebSocketHandlerC2F.java

@@ -2,7 +2,6 @@ package com.its.pis.websocket;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
-import com.its.app.utils.ItsUtils;
 import com.its.pis.entity.TbPisInfr;
 import com.its.pis.process.DbmsData;
 import com.its.pis.websocket.common.SubscribeIdentifier;
@@ -10,15 +9,11 @@ import com.its.pis.websocket.common.SubscribeRequest;
 import com.its.pis.websocket.common.SubscribeResponseAccept;
 import com.its.pis.websocket.message.c2f.*;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.io.FileUtils;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.socket.TextMessage;
 import org.springframework.web.socket.WebSocketSession;
 
-import java.io.File;
-import java.util.Base64;
-
 @Slf4j
 @Controller
 @RequestMapping(PisWebSocketConfig.WS_C2F_ENDPOINT)
@@ -38,7 +33,7 @@ public class PisWebSocketHandlerC2F extends PisWebSocketHandler {
             log.error("C2F: Payload data is empty");
             return;
         }
-        log.info("C2F: Payload, RX] {}", payloadMessage);
+        //log.info("C2F: Payload, RX] {}", payloadMessage);
 
         PisWebSocketSession sessionClient = PisWebSocketSessionManager.getInstance().getSession(session);
         if (sessionClient == null) {
@@ -54,20 +49,20 @@ public class PisWebSocketHandlerC2F extends PisWebSocketHandler {
             return;
         }
 
+        pis.setLastRecvTime(System.currentTimeMillis());
         C2FMessage<C2FMessagePayload> c2fMessage = this.mapper.readValue(payloadMessage, new TypeReference<C2FMessage<C2FMessagePayload>>(){});
         if (c2fMessage.getCommand() == null) {
-            log.error("C2F: C2FMessage NULL, {}", c2fMessage);
-            log.error("C2F: C2FMessage NULL, command data not found, session will be closed {}", session);
+            log.error("{}, C2F: C2FMessage NULL, {}", pis.getPIS_ID(), c2fMessage);
+            log.error("{}, C2F: C2FMessage NULL, command data not found, session will be closed {}", pis.getPIS_ID(), session);
             session.close();
             return;
         }
         if (C2FConstants.subscribe.equals(c2fMessage.getCommand())) {
-            log.info("C2F: RX] subscribe");
-
+            log.info("{}, C2F: RX] subscribe", pis.getPIS_ID());
             try {
                 SubscribeRequest subscribe = this.mapper.readValue(payloadMessage, SubscribeRequest.class);
                 //log.info("C2F: RX] {}", subscribe);
-                log.info("RX] {}", this.mapper.writeValueAsString(subscribe));
+                //log.info("RX] {}", this.mapper.writeValueAsString(subscribe));
                 pis.channelLogin(pis.getSession());
                 updatePisStts(pis, true);
 
@@ -79,9 +74,10 @@ public class PisWebSocketHandlerC2F extends PisWebSocketHandler {
                         .build();
                 String strMessage = this.mapper.writeValueAsString(response);
                 sessionClient.sendMessage(response.getType(), new TextMessage(strMessage));
-                log.info("TX] {}", strMessage);
+                log.info("{}, C2F: TX]", pis.getPIS_ID());
+                //log.info("TX] {}", strMessage);
             } catch (JsonProcessingException e) {
-                log.error("TX] Exception: {}", e.getMessage());
+                log.error("{}, C2F: TX] Exception: JsonProcessingException", pis.getPIS_ID());
                 session.close();
             }
             return;
@@ -91,27 +87,27 @@ public class PisWebSocketHandlerC2F extends PisWebSocketHandler {
             String eventName = c2fMessage.getData().getPayload().getEvent_name();
             if (C2FConstants.prk_plce_sttus_info.equals(eventName)) {
                 C2FMessage<PrkPlceSttusInfo> sttusInfo = this.mapper.readValue(payloadMessage, new TypeReference<C2FMessage<PrkPlceSttusInfo>>(){});
-                C2FMessage<PrkPlceSttusInfo> sttusTemp = sttusInfo;
-                sttusTemp.getData().getPayload().getPrk_place_image().setPrk_plce_image_data("base64 image data string");
-                log.info("C2F: RX] prk_plce_sttus_info");
-                log.info("RX] {}", this.mapper.writeValueAsString(sttusTemp));
-
-                if (sttusInfo.getData().getPayload().getPrk_place_image() != null) {
-                    int imageType = sttusInfo.getData().getPayload().getPrk_place_image().getPrk_plce_image_type();
-                    String imageStringData = sttusInfo.getData().getPayload().getPrk_place_image().getPrk_plce_image_data();
-                    byte[] decodedBytes = Base64.getDecoder().decode(imageStringData);
-                    String saveDir = ItsUtils.createUserDir("/images/");
-                    String outputFileName = saveDir + sttusInfo.getData().getPayload().getPrk_plce_manage_no();
-                    switch(imageType) {
-                        case 0: outputFileName += ".bmp"; break;
-                        case 1: outputFileName += ".gif"; break;
-                        case 2: outputFileName += ".jpg"; break;
-                        case 3: outputFileName += ".png"; break;
-                        default: outputFileName += ""; break;
-                    }
-
-                    FileUtils.writeByteArrayToFile(new File(outputFileName), decodedBytes);
-                }
+//                C2FMessage<PrkPlceSttusInfo> sttusTemp = sttusInfo;
+//                sttusTemp.getData().getPayload().getPrk_place_image().setPrk_plce_image_data("base64 image data string");
+                log.info("{}, C2F: RX] prk_plce_sttus_info", pis.getPIS_ID());
+//                log.info("RX] {}", this.mapper.writeValueAsString(sttusTemp));
+
+//                if (sttusInfo.getData().getPayload().getPrk_place_image() != null) {
+//                    int imageType = sttusInfo.getData().getPayload().getPrk_place_image().getPrk_plce_image_type();
+//                    String imageStringData = sttusInfo.getData().getPayload().getPrk_place_image().getPrk_plce_image_data();
+//                    byte[] decodedBytes = Base64.getDecoder().decode(imageStringData);
+//                    String saveDir = ItsUtils.createUserDir("/images/");
+//                    String outputFileName = saveDir + sttusInfo.getData().getPayload().getPrk_plce_manage_no();
+//                    switch(imageType) {
+//                        case 0: outputFileName += ".bmp"; break;
+//                        case 1: outputFileName += ".gif"; break;
+//                        case 2: outputFileName += ".jpg"; break;
+//                        case 3: outputFileName += ".png"; break;
+//                        default: outputFileName += ""; break;
+//                    }
+//
+//                    FileUtils.writeByteArrayToFile(new File(outputFileName), decodedBytes);
+//                }
 //                byte[] decodedBytes = Base64.getDecoder().decode(encodedString);
 //                FileUtils.writeByteArrayToFile(new File(outputFileName), decodedBytes);
 //                byte[] fileContent = FileUtils.readFileToByteArray(new File(filePath));
@@ -119,28 +115,28 @@ public class PisWebSocketHandlerC2F extends PisWebSocketHandler {
 
             } else if (C2FConstants.prk_plce_opr_info.equals(eventName)) {
                 C2FMessage<PrkPlceOprInfo> oprInfo = this.mapper.readValue(payloadMessage, new TypeReference<C2FMessage<PrkPlceOprInfo>>(){});
-                log.info("C2F: RX] prk_plce_opr_info");
-                log.info("RX] {}", this.mapper.writeValueAsString(oprInfo));
+                log.info("{}, C2F: RX] prk_plce_opr_info", pis.getPIS_ID());
+                //log.info("RX] {}", this.mapper.writeValueAsString(oprInfo));
             } else if (C2FConstants.prk_plce_rl_time_info.equals(eventName) || C2FConstants.prk_plce_rl_time_info_cycle.equals(eventName)) {
                 C2FMessage<PrkPlceRlTimeResponseInfo> rlTimeInfo = this.mapper.readValue(payloadMessage, new TypeReference<C2FMessage<PrkPlceRlTimeResponseInfo>>(){});
                 pis.setRlTimeInfo(rlTimeInfo);
                 dbmsDataProcess.add(new DbmsData(DbmsData.DBMS_DATA_RL_TIME, false, rlTimeInfo, pis));
-                log.info("C2F: RX] prk_plce_rl_time_info");
-                log.info("RX] {}", this.mapper.writeValueAsString(rlTimeInfo));
+                log.info("{}, C2F: RX] prk_plce_rl_time_info", pis.getPIS_ID());
+                //log.info("RX] {}", this.mapper.writeValueAsString(rlTimeInfo));
             } else if (C2FConstants.prk_plce_reservation_response_info.equals(eventName)) {
                 C2FMessage<PrkPlceReservationResponseInfo> reservationInfo = this.mapper.readValue(payloadMessage, new TypeReference<C2FMessage<PrkPlceReservationResponseInfo>>(){});
-                log.info("C2F: RX] prk_plce_reservation_response_info");
-                log.info("RX] {}", this.mapper.writeValueAsString(reservationInfo));
+                log.info("{}, C2F: RX] prk_plce_reservation_response_info", pis.getPIS_ID());
+                //log.info("RX] {}", this.mapper.writeValueAsString(reservationInfo));
             } else if (C2FConstants.prk_plce_vhcl_location_response_info.equals(eventName)) {
                 C2FMessage<PrkPlceVhclLocationResponseInfo> locationInfo = this.mapper.readValue(payloadMessage, new TypeReference<C2FMessage<PrkPlceVhclLocationResponseInfo>>(){});
                 log.info("C2F: RX] prk_plce_vhcl_location_response_info");
-                log.info("RX] {}", this.mapper.writeValueAsString(locationInfo));
+                //log.info("RX] {}", this.mapper.writeValueAsString(locationInfo));
             } else {
-                log.error("C2F: RX] Unknown event name, {}", eventName);
+                log.error("{}, C2F: RX] Unknown event name, {}", pis.getPIS_ID(), eventName);
                 log.error("RX] Payload, {}", payloadMessage);
             }
         } catch(NullPointerException e) {
-            log.error("C2F: RX] NullPointerException, Payload data null, {}", payloadMessage);
+            log.error("{}, C2F: RX] NullPointerException, Payload NullPointerException, {}", pis.getPIS_ID(), payloadMessage);
         }
     }
 

+ 0 - 53
src/main/resources/static/css/jquery.treegrid.css

@@ -1,53 +0,0 @@
-.treegrid-expander {
-	display: inline-block;
-	margin-left: -24px;
-	position: relative;
-	width: 24px;
-}
-.treegrid-expander {
-	vertical-align: middle;
-}
-.treegrid-expander::after {
-	border: 6px solid transparent;
-	content: ' ';
-	display: block;
-	height: 0;
-	left: 50%;
-	margin-left: -6px;
-	margin-top: -6px;
-	position: absolute;
-	top: 50%;
-	width: 0;
-}
-.treegrid-expander-expanded,
-.treegrid-expander-collapsed {
-	cursor: pointer;
-}
-.treegrid-expander-expanded::after {
-	border-top-color: #ccc;
-}
-.treegrid-expander-collapsed::after {
-	border-left-color: #ccc;
-}
-tr.loading>td>.treegrid-container>.treegrid-expander::after {
-	background: url('../images/loader.gif') center center no-repeat;
-	border: 0;
-	height: 16px;
-	margin-left: -8px;
-	margin-top: -8px;
-	width: 16px;
-}
-.treegrid-move-indicator {
-	border: 5px solid transparent;
-	border-left-color: #000;
-	display: none;
-	width: 0;
-	height: 0;
-	position: absolute;
-	margin-top: -5px;
-	margin-left: -6px;
-}
-.treegrid-container.dragging {
-	margin-left: 0 !important;
-	position: absolute;
-}

+ 0 - 38
src/main/resources/static/js/ajax.js

@@ -1,38 +0,0 @@
-function requestService(url, param, callback, async) {
-    /*
-     * 스프링시큐리티 csrf 토큰 에러때문에  ajax 통신시 해더에 포함해줘야한다.
-     */
-    var token = $("meta[name='_csrf']").attr("content");
-    var header = $("meta[name='_csrf_header']").attr("content");
-
-    if (async) {
-
-        async = true;
-    }
-
-    $.ajax({
-        url: "/" + url
-        , data: encodeURI(param)
-        , cache: false
-        , async: async
-        , type: 'POST'
-        , statusCode: {
-            301: function(resp){
-                window.location.reload();
-            },
-            302: function(resp){
-                window.location.reload();
-            }
-        }
-        , beforeSend: function (xhr) {
-            if(header != null) xhr.setRequestHeader(header, token);
-        }
-
-    })
-        .done(callback)
-        .fail(function (request,status,e) {
-        console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-    });
-}
-
-

File diff ditekan karena terlalu besar
+ 0 - 1
src/main/resources/static/js/jquery-2.2.4.min.js


File diff ditekan karena terlalu besar
+ 0 - 0
src/main/resources/static/js/jquery.treegrid.min.js


+ 0 - 27
src/main/resources/static/js/login.js

@@ -1,27 +0,0 @@
-function submitForm(msg){
-    document.loginForm.submit();
-}
-
-$(document).ready(function() {
-    var placeholderTarget = $('.textbox input[type="text"], .textbox input[type="password"]');
-
-    //포커스시
-    placeholderTarget.on('focus', function(){
-        $(this).siblings('label').fadeOut('fast');
-    });
-
-    //포커스아웃시
-    placeholderTarget.on('focusout', function(){
-        if($(this).val() == ''){
-            $(this).siblings('label').fadeIn('fast');
-        }
-    });
-
-    $("#password").keyup(function(e){if(e.keyCode === 13)  submitForm(); });
-
-});
-
-
-
-
-

+ 0 - 235
src/main/resources/static/js/main.js

@@ -1,235 +0,0 @@
-
-/*
- 서버시간 요청 함수
- */
-var _time_id = null;
-/*requestService("getServerDate","",getServerTimeCallback,true);
-function getServerTimeCallback(result, statusText, xhr){
-    _sever_time =result.serverDate;
-
-}*/
-
-if(_time_id == null) {
-    _time_id = setInterval(severTimeInterval,1000);
-}
-
-function severTimeInterval(){
-    $("#serverTime").text(moment(_sever_time).add("1", "s").format("YYYY-MM-DD HH:mm:ss"));
-    _sever_time = moment(_sever_time).add("1", "s").format("YYYY-MM-DD HH:mm:ss");
-}
-
-/*
- *  LOG 함수
- */
-var _fileListTbody = "";
-var _fileViewTimeout = null;
-function fileView(name, path) {
-    if (_fileViewTimeout != null) {
-        clearInterval(_fileViewTimeout);
-        _fileViewTimeout = null;
-    }
-
-    $("#fileTbody").empty();
-    var endPoint = 0;
-
-    function requestLog(){
-        $.ajax({
-            url:"/getFileView",
-            type:"POST",
-            data:"fileName="+name+"&filePath="+path+"&preEndPoint="+endPoint,
-            success:function (data) {
-
-                $("#logFileName").text(name);
-
-                test=data;
-                endPoint = data.endPoint;
-                if(data.log.length < 1) return;
-
-                var tbody="<tr><td>"+data.log+"</td></tr>";
-
-                $("#FilesForm").css("display","none");
-                $("#FileForm").css("display","block");
-
-                //$("#fileTbody").empty();
-                tbodyAppend("fileTbody",tbody);
-                $("#logScroll").scrollTop($('#logScroll')[0].scrollHeight);
-            },
-            error:function (request,status,e) {
-                console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-            }
-        }).done
-
-        if(_fileViewTimeout == null ){
-            _fileViewTimeout = setInterval(requestLog, 1000);
-        }
-    }
-    requestLog();
-}
-
-function fileDownload(name,path) {
-    location.href="/getFileDownload?fileName="+name+"&filePath="+path;
-}
-
-function fileDelete(name,path) {
-    if (!confirm(name+"을 삭제합니다.")) {
-        return;
-    }
-
-    $.ajax({
-        url:"/getFileDelete",
-        type:"POST",
-        data:"fileName="+name+"&filePath="+path,
-        success:function (data) {
-            alert("삭제 했습니다.");
-            $("#logTbody").empty();
-            fileList = data;
-            _fileListTbody="";
-
-            initLogFileList(data);
-            tbodyAppend("logTbody", _fileListTbody);
-            $('.tree-basic').treegrid();
-
-        },
-        error:function (request,status,e) {
-            alert("삭제를 실패했습니다.");
-            console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-        }
-    }).done
-}
-
-function initLogFileList(fileList) {
-
-    fileList.forEach(function (el, index) {
-        console.log(el.type + ', ' + el.fileName + ', ' + el.filePath);
-
-        if (el.type == "dir") {
-            if (el.fileName === "logs"){
-                //_fileListTbody += "<tr class='treegrid-"+el.id+" expanded'>";
-            }
-            else {
-                if (el.parentId  > 1) {
-                    _fileListTbody += "<tr class='treegrid-"+el.id+" expanded treegrid-parent-"+el.parentId+"'>";
-                }
-                else {
-                    _fileListTbody += "<tr class='treegrid-"+el.id+"'>";
-                }
-                _fileListTbody += "<td>"+el.fileName+"</td>";
-                _fileListTbody += "</tr>";
-            }
-        }
-        else {
-            if (el.parentId  > 1) {
-                _fileListTbody += "<tr class='treegrid-"+el.id+" expanded treegrid-parent-"+el.parentId+"'>";
-            }
-            else {
-                _fileListTbody += "<tr class='treegrid-"+el.id+" treegrid-parent-"+el.parentId+"'>";
-            }
-            _fileListTbody +="<td>"+el.fileName+" ("+el.fileSize+" Byte)&nbsp;&nbsp;&nbsp;&nbsp;</td>";
-            _fileListTbody += "<td><a href=javascript:fileView('" + el.fileName+"','" + el.filePath + "');>보기</a>&nbsp;&nbsp;</td>";
-            _fileListTbody += "<td><a href=javascript:fileDownload('" + el.fileName+"','" + el.filePath +"');>다운로드</a>&nbsp;&nbsp;</td>";
-            //_fileListTbody += "<td><a href=javascript:fileDelete('" + el.fileName + "','" + el.filePath + "''\);>delete</a>&nbsp;&nbsp;</td>";
-
-            _fileListTbody += "</tr>";
-        }
-
-        if (el.fileInfos.length > 0) initLogFileList(el.fileInfos);
-    });
-    return _fileListTbody;
-}
-
-/*
- * CONTROLLER 명령 함수
- */
-
-// 제어기 연결해제
-function disconnectController(id) {
-    if (!confirm("연결을 종료 하시겠습니까?")) {
-        return;
-    }
-
-    $.ajax({
-        url:"/disconnectController",
-        type:"POST",
-        data:"id="+id,
-        success:function (data) {
-            alert(data);
-            location.href = "/controller";
-        },
-        error:function (request,status,e) {
-            console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-        }
-    }).done
-}
-
-// 전체 제어기 접속횟수 초기화
-function allDisconnectController() {
-    if (!confirm("전체 제어기의 연결을 종료 하시겠습니까?")) {
-        return;
-    }
-
-    $.ajax({
-        url:"/allDisconnectController",
-        type:"POST",
-        success:function (data) {
-            alert(data);
-            location.href = "/controller";
-        },
-        error:function (request,status,e) {
-            console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-        }
-    }).done
-}
-
-// 제어기 접속횟수 초기화
-function resetConnCount(id) {
-    if (!confirm("접속횟수를 초기화 하시겠습니까?")) {
-        return;
-    }
-
-    $.ajax({
-        url:"/resetConnCount",
-        type:"POST",
-        data:"id="+id,
-        success:function (data) {
-            alert(data);
-            location.href = "/controller";
-        },
-        error:function (request,status,e) {
-            console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-        }
-    }).done
-}
-
-// 전체 제어기 접속횟수 초기화
-function allResetConnCount() {
-    if (!confirm("전체 제어기의 접속횟수를 초기화 하시겠습니까?")) {
-        return;
-    }
-
-    $.ajax({
-        url:"/allResetConnCount",
-        type:"POST",
-        success:function (data) {
-            alert(data);
-            location.href = "/controller";
-        },
-        error:function (request,status,e) {
-            console.log("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+e);
-        }
-    }).done}
-
-
-// 제어기 리셋
-function resetController(id) {
-}
-
-// 전체 제어기 리셋
-function allResetController(id) {
-}
-
-/*
- * Tbody 데이터 넣기
- */
-function tbodyAppend(tagId,tbodyData) {
-    $("#"+tagId).append(tbodyData);
-}

File diff ditekan karena terlalu besar
+ 0 - 0
src/main/resources/static/js/moment.min.js


+ 0 - 74
src/main/webapp/WEB-INF/jsp/controller.jsp

@@ -1,74 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<jsp:include page="head.jsp"/>
-
-<body>
-
-<div class="container" align="center">
-    <jsp:include page="header.jsp"/>
-    <jsp:include page="menu.jsp"/>
-
-    <div class="content">
-        <table border="0" cellpadding="10" cellspacing="0" width="100%" style="font-weight: bold;font-family:tahoma;font-size:14pt;color:#808080;border-color:#6a5acd" >
-            <tr><td>
-                <fieldset><legend> Controller Information </legend>
-                    <table align="center" border="1" cellpadding="1" cellspacing="0" style="border: 1px solid;font-weight: normal;font-family:tahoma;font-size:12pt;">
-                        <thead>
-                        <tr style="background-color: antiquewhite;">
-                            <th>관리번호</th>
-                            <th>제어기 ID</th>
-                            <th>제어기 명칭</th>
-                            <th>IP Address</th>
-                            <th>상태</th>
-                            <th>마지막 연결 시간</th>
-                            <th>마지막 해제 시간</th>
-                            <th>접속횟수</th>
-                            <th>명령</th>
-                        </tr>
-                        </thead>
-                        <c:forEach var="entry" items="${list}" varStatus="status">
-                            <tr>
-                                <td align="center">${entry.value.VDS_CTLR_NMBR}</td>
-                                <td align="center">${entry.value.VDS_CTLR_ID}</td>
-                                <td>${entry.value.VDS_NM}</td>
-                                <td>&nbsp;${entry.value.VDS_CTLR_IP}&nbsp;</td>
-                                <td align="center">
-                                    <c:choose>
-                                        <c:when test="${entry.value.netState eq '0'}">
-                                            -
-                                        </c:when>
-                                        <c:when test="${entry.value.netState eq '1'}">
-                                            연결중
-                                        </c:when>
-                                        <c:otherwise>
-                                            &nbsp;연결&nbsp;
-                                        </c:otherwise>
-                                    </c:choose>
-                                </td>
-                                <td align="center">&nbsp;${entry.value.connectTm}&nbsp;</td>
-                                <td align="center">&nbsp;${entry.value.disConnectTm}&nbsp;</td>
-                                <td align="center">${entry.value.connectCount}</td>
-                                <td align="center">
-                                    &nbsp;<a href=javascript:disconnectController('${entry.value.VDS_CTLR_NMBR}')>연결해제</a>&nbsp;&nbsp;
-                                    <!--<a href=javascript:resetController('${entry.value.VDS_CTLR_NMBR}')>제어기리셋</a>&nbsp;&nbsp;-->
-                                    <a href=javascript:resetConnCount('${entry.value.VDS_CTLR_NMBR}')>접속횟수초기화</a>&nbsp;</td>
-                            </tr>
-                        </c:forEach>
-                    </table>
-                    <table align="center" border="0" cellpadding="1" cellspacing="0" style="font-weight: normal;font-family:tahoma;font-size:12pt;">
-                    <tr>
-                        <td><button type="button" onclick="allDisconnectController()">전체 연결해제</button></td>
-                        <td><button type="button" onclick="allResetConnCount()">전체 접속횟수초기화</button></td>
-                        </tr>
-                    </table>
-
-            </fieldset>
-            </td></tr>
-        </table>
-    </div>
-</div>
-
-</body>
-</html>

+ 0 - 10
src/main/webapp/WEB-INF/jsp/head.jsp

@@ -1,10 +0,0 @@
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>${ServerConfig.name}</title>
-</head>
-
-<script type="text/javascript" src="/js/moment.min.js"></script>
-<script type="text/javascript" src="/js/jquery-2.2.4.min.js"></script>
-<script type="text/javascript" src="/js/ajax.js"></script>
-<script type="text/javascript" src="/js/main.js"></script>
-<script type="text/javascript" src="/js/login.js"></script>

+ 0 - 12
src/main/webapp/WEB-INF/jsp/header.jsp

@@ -1,12 +0,0 @@
-
-<table width="100%" style="font-family:tahoma;font-size:12pt;color:#808080;border-color:#6a5acd;margin-top: 5px;" border="0" cellpadding="10" cellspacing="0">
-    <tr align="center"><td style="font-size: 24px; font-weight: bold; color: black;">${ServerConfig.name}</td></tr>
-</table>
-<hr>
-<table width="100%" style="font-family:tahoma;font-size:12pt;color:#808080;border-color:#6a5acd;margin-top: -10px;" border="0" cellpadding="10" cellspacing="0" >
-    <tr align="right"><td id="serverTime" style="font-size: 16px; font-weight: bold; color: black; padding-right: 30px">${ServerTime}</td></tr>
-</table>
-
-<script type="text/javascript">
-    var _sever_time = '${ServerTime}';
-</script>

+ 0 - 60
src/main/webapp/WEB-INF/jsp/log.jsp

@@ -1,60 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<jsp:include page="head.jsp"/>
-<Link href="/css/jquery.treegrid.css" rel="stylesheet">
-<body>
-
-<div class="container" align="center">
-    <jsp:include page="header.jsp"/>
-    <jsp:include page="menu.jsp"/>
-
-    <div class="content">
-        <table border="0" cellpadding="10" cellspacing="0" width="600" style="font-weight: bold;font-family:tahoma;font-size:14pt;color:#808080;border-color:#6a5acd" >
-            <tr><td>
-                <fieldset><legend> Log Files </legend>
-                    <table class="table table-bordered tree-basic"  id="logFiles" border="0" cellpadding="1" cellspacing="0" style="width: 100%; font-weight: normal;font-family:tahoma;font-size:12pt;">
-                        <tbody id="logTbody">
-                        </tbody>
-                    </table>
-                </fieldset>
-            </td></tr>
-        </table>
-    </div>
-
-    <div class="content">
-        <div class="log" id="log">
-            <fieldset id="FileForm">
-                <legend name="fileName" id="logFileName">Log File View</legend>
-                <div id="logScroll" style="width: 98%;height: 660px;overflow: auto;margin:5px auto;">
-                    <table >
-                        <tbody id="fileTbody">
-
-                        </tbody>
-                    </table>
-                </div>
-            </fieldset>
-        </div>
-    </div>
-</div>
-
-</div>
-
-
-<script src="/js/jquery.treegrid.min.js"></script>
-<script type="text/javascript">
-    function init(){
-        var fileList = ${fileList};
-        var fileListBody = initLogFileList(fileList);
-        tbodyAppend("logTbody", fileListBody);
-        $('.tree-basic').treegrid();
-    }
-
-    $(document).ready(function() {
-        init();
-    });
-</script>
-
-</body>
-</html>

+ 0 - 26
src/main/webapp/WEB-INF/jsp/login.jsp

@@ -1,26 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<jsp:include page="head.jsp"/>
-<body>
-
-<div class="container" align="center">
-    <jsp:include page="header.jsp"/>
-
-    <div class="content">
-        <form id="loginForm" name="loginForm" action="/login" method="post">
-            <table border="0" cellpadding="1" cellspacing="0" style="font-family:tahoma;font-size:10pt;border-color:#kkkkkk;">
-                <tr>
-                    <td width="120" align="right">USER ID :</td>
-                    <td> <input type="text" size="20" maxlength="20" id="username" name="username" style=font-family:tahoma;font-size:10pt;/></td></tr>
-                <tr>
-                    <td width="120" align="right">USER PASSWORD :</td><td> <input type="password" size="20" maxlength="20" id="password" name="password" style=font-family:tahoma;font-size:10pt;/></td></tr>
-                <tr>
-                    <td width="120"></td><td align="left"><input type="submit" value=" LOGIN " style=font-family:tahoma;font-size:10pt;/></td></tr>
-            </table>
-        </form>
-    </div>
-</div>
-
-</body>
-</html>

+ 0 - 18
src/main/webapp/WEB-INF/jsp/menu.jsp

@@ -1,18 +0,0 @@
-<table style="font-family:tahoma;font-size:12pt;color:#808080;border-color:#6a5acd; margin-top: -10px" width="100%" border="0" cellpadding="10" cellspacing="0">
-    <tr><td>
-        <table border=0 cellpadding=0 cellspacing=0 style="font-family:tahoma;font-size:16pt;border-color:#808080;" align="center">
-            <tr>
-                <td><a href="/index">System</a></td>
-                <td width=20></td>
-                <td><a href="/controller">Controller</a></td>
-                <td width=20></td>
-                <td><a href="/log">Log</a></td>
-                <td width=20></td>
-                <form name="loginForm" method="post" action="/logout">
-                <td><a href="javascript:submitForm();">Logout</a></td>
-                </form>
-            </tr>
-        </table>
-
-    </td></tr>
-</table>

+ 0 - 29
src/main/webapp/WEB-INF/jsp/system.jsp

@@ -1,29 +0,0 @@
-<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<jsp:include page="head.jsp"/>
-
-<body>
-
-<div class="container" align="center">
-    <jsp:include page="header.jsp"/>
-    <jsp:include page="menu.jsp"/>
-
-    <div class="content">
-        <table border="0" cellpadding="10" cellspacing="0" width="600" style="font-weight: bold;font-family:tahoma;font-size:14pt;color:#808080;border-color:#6a5acd" >
-            <tr><td>
-                <fieldset><legend> System Information </legend>
-                    <table border="0" cellpadding="1" cellspacing="0" style="font-weight: normal;font-family:tahoma;font-size:12pt;">
-                        <tr><td align="right" width="200">          system id : </td> <td><input type="text" value="${ServerConfig.id}" disabled /></td></tr>
-                        <tr><td align="right" width="200">center binding port : </td> <td><input type="text" value="${ServerConfig.centerBindPort}" disabled /></td></tr>
-                        <tr><td align="right" width="200">       booting time : </td> <td><input type="text" value="${ServerConfig.bootingDateTime}"   disabled /></td></tr>
-                    </table>
-                </fieldset>
-            </td></tr>
-        </table>
-    </div>
-</div>
-
-
-</body>
-</html>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini