146 lines
4.1 KiB
HTML
146 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='UTF-8'>
|
|
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
|
<title>CanGrow - CanGrow v0.2-dev</title>
|
|
<link rel='stylesheet' href='cangrow.css'>
|
|
<style>
|
|
.outputSel {
|
|
display: none;
|
|
}
|
|
</style>
|
|
<script>
|
|
function toggleDisplay(id) {
|
|
let el = document.getElementById(id);
|
|
let el_cs = getComputedStyle(el);
|
|
|
|
if (el_cs.getPropertyValue('display') === 'none') {
|
|
el.style.display = 'inline';
|
|
} else {
|
|
el.style.display = 'none';
|
|
}
|
|
}
|
|
|
|
function hideAllClass(classname) {
|
|
|
|
const el = document.getElementsByClassName(classname);
|
|
|
|
for(let i = 0; i < el.length ; i++) {
|
|
el[i].style.display = '';
|
|
}
|
|
}
|
|
|
|
function showSelect(selectId, prefix, hideClass = '') {
|
|
if(hideClass != '') {
|
|
hideAllClass(hideClass);
|
|
}
|
|
let selVal = document.getElementById(selectId).value;
|
|
toggleDisplay(prefix + selVal);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<ul class='nav'><li><a href='/'>🌱 CanGrow</a></li>
|
|
<li><a class='' href='/grow/' >🔆 Grow settings</a></li>
|
|
<li><a class='activeNav' href='/system/' >⚙ System settings</a></li>
|
|
<li><a class='' href='/wifi/' >📡 WiFi settings</a></li>
|
|
<li><a class='' href='/help' >❓ Help</a></li>
|
|
<li><span class='navTime'>04:20:23</span></li>
|
|
<li><a href='https://git.la10cy.net/DeltaLima/CanGrow' target='_blank'>CanGrow v0.2-dev</a></li>
|
|
</ul>
|
|
<div class='center'>
|
|
|
|
<ul class='subnav'>
|
|
<li><a class='activeNav' href='/system/output/'>⚡ Output configuration</a></li>
|
|
<li><a class='' href='/system/update'>🔄 Firmware update</a></li>
|
|
<li><a class='' href='/system/restart' >🔁 CanGrow restart</a></li>
|
|
<li><a class='' href='/system/wipe' >💣 Factory reset</a></li>
|
|
</ul>
|
|
<h3>➕ Add output</h3>
|
|
|
|
|
|
|
|
<p>Add a new output to CanGrow.</p>
|
|
<form method='post' action='/system/output/add'>
|
|
|
|
<u>Type</u>:<br>
|
|
<select id='type_sel' name='config.system.httpLogSerial' onchange="showSelect('type_sel', 'type_', 'outputSel');" required>
|
|
<option disabled value='' selected hidden>---</option>
|
|
<option value='1'>GPIO</option>
|
|
<option value='2'>I2C</option>
|
|
<option value='3'>URL</option>
|
|
</select><br>
|
|
|
|
<u>Device</u>:<br>
|
|
<select name='config.system.httpLogSerial' required>
|
|
<option disabled value='' selected hidden>---</option>
|
|
<option value='1'>Light</option>
|
|
<option value='2'>Fan</option>
|
|
<option value='3'>Pump</option>
|
|
<option value='3'>Humidifier</option>
|
|
<option value='3'>Dehumidifier</option>
|
|
<option value='3'>Heating</option>
|
|
</select><br>
|
|
|
|
<u>Name</u>:<br>
|
|
<input type='text' name='esp32camIp' maxlength='16' value='' ><br>
|
|
|
|
<u>Enable</u>:<br>
|
|
<select name='config.system.httpLogSerial' required>
|
|
<option disabled value='' selected hidden>---</option>
|
|
<option value='1'>Yes</option>
|
|
<option value='0'>No</option>
|
|
</select><br>
|
|
|
|
|
|
<div class='outputSel' id='type_1'>
|
|
<u>GPIO</u>:<br>
|
|
<select name='config.system.httpLogSerial' required>
|
|
<option disabled value='' selected hidden>---</option>
|
|
<option value='0'>GPIO 0 !BFL!</option>
|
|
<option value='1'>GPIO 12</option>
|
|
<option value='2'>GPIO 13</option>
|
|
<option value='2'>GPIO 14</option>
|
|
<option value='2'>GPIO 15 !BFH!</option>
|
|
<option value='2'>GPIO 16 !NOPWM!</option>
|
|
</select><br>
|
|
|
|
<u>GPIO PWM</u>:<br>
|
|
<select name='config.system.httpLogSerial' required>
|
|
<option disabled value='' selected hidden>---</option>
|
|
<option value='1'>Enable</option>
|
|
<option value='2'>Disable</option>
|
|
</select><br>
|
|
</div>
|
|
|
|
|
|
<div class='outputSel' id='type_2'>
|
|
<u>I2C</u>:<br>
|
|
<input type='text' name='esp32camIp' maxlength='16' value='' ><br>
|
|
</div>
|
|
|
|
<div class='outputSel' id='type_3'>
|
|
<u>Host</u>:<br>
|
|
<input type='text' name='esp32camIp' maxlength='16' value='' ><br>
|
|
|
|
<u>URI on</u>:<br>
|
|
<input type='text' name='esp32camIp' maxlength='16' value='' ><br>
|
|
|
|
<u>URI off</u>:<br>
|
|
<input type='text' name='esp32camIp' maxlength='16' value='' ><br>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<input type='submit' value='💾 Save settings'>
|
|
</form>
|
|
|
|
<script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class='footer'><span>Build: d679d89-esp8266-20241024231631</span></div>
|
|
</div></body></html>
|