This commit is contained in:
Skylar Grant 2023-01-06 21:53:54 -05:00
parent d8a6ea9577
commit eee6d27375
3 changed files with 39 additions and 9 deletions

View File

@ -18,10 +18,6 @@ html, body {
color: inherit;
}
#status {
text-align: center;
}
#safeties {
text-align: center;
}
@ -97,3 +93,13 @@ html, body {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
table {
margin: 0 auto;
}
table, th, td {
border: 1px solid;
border-collapse: collapse;
padding: 3px;
}

View File

@ -36,10 +36,11 @@ function refreshData() {
});
// Get the elements we need to update
const augerStatus = document.getElementById('auger-status');
const augerOn = document.getElementById('auger-on');
const augerOff = document.getElementById('auger-off');
const feedRate = document.getElementById('feed-rate');
const statusTable = document.getElementById('status-table');
const augerStatus = statusTable.rows[0].cells[1];
const augerOn = statusTable.rows[0].cells[3];
const augerOff = statusTable.rows[1].cells[3];
const feedRate = statusTable.rows[1].cells[1];
// Get the config file
const config = readJSON('./config.json');

View File

@ -7,7 +7,30 @@
<body onload="refreshData()">
<%- include('trial.html') -%>
<div id="title"><a href='./'>Hestia Web Portal</a></div>
<div id="status">Auger: <span id="auger-status"></span> | On Time: <span id="auger-on"></span> | Off Time: <span id="auger-off"></span> | Feed Rate: <span id="feed-rate"></span></div>
<div id="status">
<!--
| Auger | rows[0].cells[1] | On Time | rows[0].cells[3] |
| Feed Rate | rows[1].cells[1] | Off Time | rows[1].cells[3] |
-->
<table id="status-table">
<tr>
<td>Auger</td>
<td></td>
<td>On Time</td>
<td></td>
</tr>
<tr>
<td>Feed Rate</td>
<td></td>
<td>Off Time</td>
<td></td>
</tr>
</table>
</div>
<div class="controls-container">
<form action="/" method="post">
<!-- Start | Shutdown | Reload Settings -->