configuration page

This commit is contained in:
Siwat Sirichai 2023-11-07 16:46:47 +07:00
parent 1128de9297
commit 7ecd601073
16 changed files with 97 additions and 32 deletions

View file

@ -0,0 +1,2 @@
R"=====(<label class="container">Authentication
<input type="checkbox" name="bms_useauth" id="bms_useauth" checked="checked" value=")====="

View file

@ -0,0 +1,3 @@
R"=====(">
<span class="checkmark"></span>
</label>)====="

View file

@ -0,0 +1,4 @@
R"=====(<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<form enctype="multipart/form-data" id="config_form" onsubmit="send_config()" action="/save_config">
<h1>ESPMega PRO</h1>
<h3>Device Configurations</h3>)====="

View file

@ -1,32 +1,5 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<form enctype="multipart/form-data" id="config_form" onsubmit="send_config()" action="/save_config">
<h1>ESPMega PRO</h1>
<h3>Device Configurations</h3>
<p class="config_title">IP Address</p>
<input type="text" id="dev_ip" name="dev_ip" class="conf_txt" value="0.0.0.0"><br>
<p class="config_title">Network Mask</p>
<input type="text" id="netmask" name="netmask" class="conf_txt" value="0.0.0.0"><br>
<p class="config_title">Gateway</p>
<input type="text" id="gateway" name="gateway" class="conf_txt" value="0.0.0.0"><br>
<p class="config_title">DNS Server</p>
<input type="text" id="dns" name="dns" class="conf_txt" value="0.0.0.0"><br>
<p class="config_title">Hostname</p>
<input type="text" id="hostname" name="hostname" class="conf_txt" value="ESPMegaPRO"><br>
<p class="config_title">BMS Server - IP Address</p>
<input type="text" id="bms_ip" name="bms_ip" class="conf_txt" value="0.0.0.0"><br>
<p class="config_title">BMS Server - Port</p>
<input type="text" id="bms_port" name="bms_port" class="conf_txt" value="1883"><br>
<label class="container">Authentication
<input type="checkbox" name="bms_useauth" id="bms_useauth" checked="checked" value="yes">
<span class="checkmark"></span>
</label>
<p class="config_title">BMS Server - Username</p>
<input type="text" id="bms_username" name="bms_username" class="conf_txt" value="user"><br>
<p class="config_title">BMS Server - Password</p>
<input type="password" id="bms_password" name="bms_password" class="conf_txt" value="password"><br>
<p class="config_title">BMS Server - Endpoint</p>
<input type="text" id="bms_endpoint" name="bms_endpoint" class="conf_txt" value="/espmegapro"><br>
<input type="submit" class="btn" value="Save">
R"=====( <input type="submit" class="btn" value="Save">
<button type="button" class="conf" onclick="window.location.href='/'">Back</button><br /><br />
<b>SIWAT SYSTEM 2023</b>
</form>
<style>
@ -117,6 +90,12 @@
background: #417df3;
color: #fff;
cursor: pointer;
width: 100%;
height: 44px;
border-radius: 4px;
margin: 10px auto;
font-size: 15px;
border: 0;
}
.conf_txt {
background-color: #e2e2e2;
@ -185,4 +164,4 @@
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
</style>
</style>)====="

View file

@ -0,0 +1 @@
R"=====(<p class="config_title">)====="

View file

@ -0,0 +1,2 @@
R"=====(</p>
<input type=")====="

View file

@ -0,0 +1 @@
R"=====(" id=")====="

View file

@ -0,0 +1 @@
R"=====(" name=")====="

View file

@ -0,0 +1 @@
R"=====(" class="conf_txt" value=")====="

View file

@ -0,0 +1 @@
R"=====("><br>)====="

View file

@ -27,9 +27,13 @@
<p class="config_title">BMS Server - Endpoint</p>
<input type="text" id="bms_endpoint" name="bms_endpoint" class="conf_txt" value="/espmegapro"><br>
<input type="submit" class="btn" value="Save">
<button type="button" class="conf" onclick="window.location.href='/'">Back</button><br /><br />
<b>SIWAT SYSTEM 2023</b>
</form>
<style>
p.config_title {
font-size: 12;
font-weight: bold;
@ -117,6 +121,12 @@
background: #417df3;
color: #fff;
cursor: pointer;
width: 100%;
height: 44px;
border-radius: 4px;
margin: 10px auto;
font-size: 15px;
border: 0;
}
.conf_txt {
background-color: #e2e2e2;

View file

@ -1,4 +1,4 @@
R"=====(<button type="button" class="conf" onclick="window.location.href='config.html'">Settings</button><br /><br />
R"=====(<button type="button" class="conf" onclick="window.location.href='config'">Settings</button><br /><br />
<hr>
<h3>Upload Software Package</h3>
<input type="file" name="update" id="file" onchange="sub(this)" style="display: none" />

View file

@ -30,7 +30,7 @@
Centrally Managed
<span style="float: right">Yes</span>
</p>
<button type="button" class="conf" onclick="window.location.href='config.html'">Settings</button><br /><br />
<button type="button" class="conf" onclick="window.location.href='config'">Settings</button><br /><br />
<hr>
<h3>Upload Software Package</h3>
<input type="file" name="update" id="file" onchange="sub(this)" style="display: none" />