Browse Source

저장 버튼 최적화

v2
원형 1 year ago
parent
commit
6ee121975f
  1. 6
      src/main/java/org/mobidgim/mobidigimproject/model/device/subDTO/Lte.java
  2. 22
      src/main/resources/static/index.html

6
src/main/java/org/mobidgim/mobidigimproject/model/device/subDTO/Lte.java

@ -5,10 +5,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class Lte { public class Lte {
@JsonProperty("lte_ip") @JsonProperty("lte_ip")
private String LTEip; private String LTEip;
@JsonProperty("lte_subnet") @JsonProperty("lte_netmask")
private String LTEsubnet; private String LTEnetmask;
@JsonProperty("lte_gateway") @JsonProperty("lte_gateway")
private String LTEgateway; private String LTEgateway;
@JsonProperty("lte_port") @JsonProperty("lte_port")
private int LTEport; private String LTEport;
} }

22
src/main/resources/static/index.html

@ -293,14 +293,16 @@
<h3>Server</h3> <h3>Server</h3>
<div class="grid-3-col"><strong></strong><span style="text-align:center">IP</span><span <div class="grid-3-col"><strong></strong><span style="text-align:center">IP</span><span
style="text-align:center">Port</span></div> style="text-align:center">Port</span></div>
<div class="grid-3-col"><span>TIoT Server</span> <input id="rtcm_server_ip"/><input <div class="grid-3-col"><span>TIoT Server</span> <input id="protocol_server_ip"/><input
id="rtcm_server_port"/></div> id="protocol_server_port"/></div>
<div class="grid-3-col"><span>Update Server</span><input id="update_server_ip"/><input <div class="grid-3-col"><span>Update Server</span><input id="update_server_ip"/><input
id="update_server_port"/></div> id="update_server_port"/></div>
<div class="grid-3-col"><span>DGPS Server</span> <input id="modbus_server_ip"/><input <div class="grid-3-col"><span>DGPS Server</span> <input id="rtcm_server_ip"/><input
id="modbus_server_port"/></div> id="rtcm_server_port"/></div>
<div class="grid-3-col"><span>OPC-UA</span> <input id="opc_ua_server_ip"/><input <div class="grid-3-col"><span>OPC-UA</span> <input id="opc_ua_server_ip"/><input
id="opc_ua_server_port"/></div> id="opc_ua_server_port"/></div>
<div class="grid-3-col"><span>MODBUS</span> <input id="modbus_server_ip"/><input
id="modbus_server_port"/></div>
</div> </div>
<div class="actions"> <div class="actions">
<div class="file-upload-wrapper-device" <div class="file-upload-wrapper-device"
@ -343,11 +345,11 @@
<div class="io-fieldset"> <div class="io-fieldset">
<div class="io-row"><span class="label-inline">IP</span><span class="colon">:</span><input <div class="io-row"><span class="label-inline">IP</span><span class="colon">:</span><input
id="lte_ip"></div> id="lte_ip"></div>
<div class="io-row"><span class="label-inline">SUBNET</span><span <div class="io-row"><span class="label-inline">NETMASK</span><span
class="colon">:</span><input id="lte_subnet"></div> class="colon">:</span><input id="lte_netmask"></div>
<div class="io-row"><span class="label-inline">GATEWAY</span><span <div class="io-row"><span class="label-inline">GATEWAY</span><span
class="colon">:</span><input id="lte_gateway"></div> class="colon">:</span><input id="lte_gateway"></div>
<div class="io-row"><span class="label-inline">Port</span><span class="colon">:</span><input <div class="io-row"><span class="label-inline">PORT</span><span class="colon">:</span><input
id="lte_port"></div> id="lte_port"></div>
</div> </div>
</div> </div>
@ -589,7 +591,6 @@
<button id="saveProtocolBtn">Save to Protocol</button> <button id="saveProtocolBtn">Save to Protocol</button>
<button id="downloadProtocolBtn">Download Device File</button> <button id="downloadProtocolBtn">Download Device File</button>
</div> </div>
</section> </section>
<template id="modbus-row-template"> <template id="modbus-row-template">
@ -854,7 +855,7 @@
/* Ethernet */ /* Ethernet */
eth_ip: '', eth_netmask: '', eth_gateway: '', eth_ip: '', eth_netmask: '', eth_gateway: '',
/* 서버들 */ /* servers */
protocol_server_ip: '', protocol_server_port: null, protocol_server_ip: '', protocol_server_port: null,
update_server_ip: '', update_server_ip: '',
update_server_port: null, update_server_port: null,
@ -875,7 +876,7 @@
imu_remap_x_sign: '', imu_remap_y_sign: '', imu_remap_z_sign: '', imu_remap_x_sign: '', imu_remap_y_sign: '', imu_remap_z_sign: '',
/* LTE 설정 */ /* LTE 설정 */
lte_ip: '', lte_subnet: '', lte_gateway: '', lte_port: null, lte_ip: '', lte_netmask: '', lte_gateway: '', lte_port: null,
/* SSID 목록 */ /* SSID 목록 */
WIFI_SSID: [{wifi_ssid: '', wifi_password: '', wifi_security: 'none'}], WIFI_SSID: [{wifi_ssid: '', wifi_password: '', wifi_security: 'none'}],
}; };
@ -2065,6 +2066,7 @@
toggleProtocolMenus(); toggleProtocolMenus();
} }
document.querySelectorAll('.js-save').forEach(btn=>btn.addEventListener('click', () => {saveToConfig()}))
document.getElementById('loadDeviceBtn_ssid')?.addEventListener('click', () => { document.getElementById('loadDeviceBtn_ssid')?.addEventListener('click', () => {
fetch('http://localhost:8080/setting/get-device') fetch('http://localhost:8080/setting/get-device')
.then(res => { .then(res => {

Loading…
Cancel
Save