-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfg_network.html
141 lines (112 loc) · 4.63 KB
/
cfg_network.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1">
<title>Network Settings :: ESPTerm</title>
<link href="/css/app.9aae724-en.css" rel="stylesheet">
<script src="/js/app.9aae724-en.js"></script>
<script>
var _root = location.host;
var _demo = 1;
</script>
</head>
<body class="cfg">
<div id="outer">
<nav id="menu">
<div id="brand" tabindex=0>ESPTerm<sup> DEMO</sup></div>
<a href="term.html" class="icn-back">Back to Terminal</a>
<a href="cfg_term.html" class="icn-terminal ">Terminal Settings</a><a href="cfg_wifi.html" class="icn-wifi ">WiFi Settings</a><a href="cfg_network.html" class="icn-network selected">Network Settings</a><a href="cfg_system.html" class="icn-configure ">System Settings</a><a href="cfg_gpio.html" class="icn-gpio ">GPIO Control</a><a href="help.html" class="icn-help ">Quick Reference</a><a href="about.html" class="icn-about ">About ESPTerm</a></nav>
<div id="content">
<img src="/img/loader.gif" alt="Loading…" id="loader">
<h1>Network Settings</h1>
<div class="Box errors hidden">
<span class="lead">Validation errors for:</span> <span class="list"></span>
</div>
<div class="Box message hidden"></div>
<div class="Box errmessage hidden"></div>
<!-- STA -->
<form class="Box str mobcol" action="network_set.html" method="GET" id="form-netsta">
<h2 tabindex=0>DHCP Client (Station)</h2>
<div class="Row explain">
Switch off Dynamic IP to configure the static IP address. </div>
<div class="Row checkbox x-static-toggle" >
<label>Use dynamic IP</label><!--
--><span class="box" tabindex=0 role=checkbox></span>
<input type="hidden" id="sta_dhcp_enable" name="sta_dhcp_enable" value="1">
</div>
<div class="Row x-static">
<label for="sta_addr_ip">ESPTerm static IP</label>
<input type="text" name="sta_addr_ip" id="sta_addr_ip" value="192.168.0.33" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row x-static">
<label for="sta_addr_mask">Subnet mask</label>
<input type="text" name="sta_addr_mask" id="sta_addr_mask" value="255.255.255.0" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row x-static">
<label for="sta_addr_gw">Gateway IP</label>
<input type="text" name="sta_addr_gw" id="sta_addr_gw" value="192.168.0.1" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row buttons">
<a class="button icn-ok" href="#" onclick="qs('#form-netsta').submit()">Apply!</a>
</div>
</form>
<!-- AP -->
<form class="Box str mobcol" action="network_set.html" method="GET" id="form-netap">
<h2 tabindex=0>DHCP Server (AP)</h2>
<div class="Row explain">
Those settings affect the built-in DHCP server in AP mode. </div>
<div class="Row">
<label for="ap_addr_mask">Subnet mask</label>
<input type="text" name="ap_addr_mask" id="ap_addr_mask" value="255.255.255.0" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row">
<label for="ap_addr_ip">Own IP address</label>
<input type="text" name="ap_addr_ip" id="ap_addr_ip" value="192.168.4.1" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row">
<label for="ap_dhcp_start">Pool start IP</label>
<input type="text" name="ap_dhcp_start" id="ap_dhcp_start" value="192.168.4.100" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row">
<label for="ap_dhcp_end">Pool end IP</label>
<input type="text" name="ap_dhcp_end" id="ap_dhcp_end" value="192.168.4.200" pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}$" required>
</div>
<div class="Row">
<label for="ap_dhcp_time">Lease time<span class="mq-phone"> (min)</span></label>
<input type="number" step=1 min=1 max=2880 name="ap_dhcp_time" id="ap_dhcp_time" value="120" required>
<span class="mq-no-phone"> min</span>
</div>
<div class="Row buttons">
<a class="button icn-ok" href="#" onclick="qs('#form-netap').submit()">Apply!</a>
</div>
</form>
<!-- MACs -->
<div class="Box mobcol">
<h2>MAC addresses</h2>
<div class="Row">
<label>Station MAC</label><input type="text" readonly value="5c:cf:7f:02:74:51">
</div>
<div class="Row">
<label>AP MAC</label><input type="text" readonly value="5e:cf:7f:02:74:51">
</div>
</div>
<script>
function updateStaticDisp() {
var sttc = !parseInt($('#sta_dhcp_enable').val());
$('.x-static').toggleClass('hidden', !sttc);
}
$('.x-static-toggle').on('click', function() {
setTimeout(function() {
updateStaticDisp();
}, 0)
});
updateStaticDisp();
</script>
<div class="botpad"></div>
<div class="NotifyMsg hidden" id="notif"></div>
</div>
</div>
</body>
</html>