hestia/www/views/index.html

40 lines
2.1 KiB
HTML
Raw Normal View History

2022-12-20 20:17:30 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Pellet Stove Web Portal</title>
<link rel="stylesheet" href="/main.css">
</head>
<body>
2022-12-20 20:53:25 +00:00
<%- include('trial.html') -%>
2022-12-20 20:17:30 +00:00
<div id="title">Pellet Stove Web Portal</div>
<div id="status">Auger: <%= status.auger %> | Igniter: <%= status.igniter %> | Combustion Blower: <%= status.blower %></div>
<div id="safeties">Vacuum: <%= status.vacuum %> | Proof of Fire: <%= status.pof %></div>
<div id="controls-container">
2022-12-21 02:12:22 +00:00
<form action="/" method="post">
2022-12-20 20:17:30 +00:00
<!-- Start | Shutdown | Reload Settings -->
<div id="buttons">
2022-12-21 02:12:22 +00:00
<input type="submit" id="ignite" value="Start" name="start"><input type="submit" id="shutdown" value="Shutdown" name="shutdown"><input type="submit" id="reload" value="Reload" name="reload"><br>
2022-12-20 20:17:30 +00:00
</div>
<!-- Set feed rates -->
<label for="augerOn">Auger On Interval: </label><input type="number" id="augerOn" name="augerOn" min="500" max="1000" value="<%= intervals.augerOn %>">ms<br>
<label for="augerOff">Auger Off Interval: </label><input type="number" id="augerOff" name="augerOff" min="1000" max="2000" value="<%= intervals.augerOff %>">ms<br>
<label for="pauseInt">App Pause Interval: </label><input type="number" id="pauseInt" name="pauseInt" min="1000" max="600000" value="<%= intervals.pause %>">ms<br>
</form>
</div>
<div id="log-container">
2022-12-20 20:53:25 +00:00
<!-- <button id="refresh-log" onclick="refreshLog()">Refresh Log</button><br>
<textarea id="log-area"></textarea> -->
<iframe id="log-area" src="log.txt"></iframe>
2022-12-20 20:17:30 +00:00
</div>
2022-12-20 20:53:25 +00:00
<script>
function refreshLog() {
console.log('Refresh button hit');
// TODO
const fs = require('fs');
fs.readFile('/log.txt', (err, data) => {
document.getElementById('log-area').innerHTML = data;
});
};
</script>
2022-12-20 20:17:30 +00:00
</body>
</html>