1
0
mirror of https://github.com/peterantypas/maiana.git synced 2025-06-23 18:10:45 -07:00
2022-12-12 18:40:12 -08:00

79 lines
1.9 KiB
HTML

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MAIANA Configuration</title>
<style>
h1 {
font: 50px helvetica;
font-weight: medium;
color: #0072b6;
max-height:28px;
}
h2 {
font: 24px helvetica;
color: #00a5a4;
max-height: 20px;
padding-bottom: 8px;
}
img {
max-width:30%;
object-fit:contain;
}
button {
width: 92%;
height: 60px;
font-size: 24px;
color: #0072b6;
}
.infotable {
width: 100%;
padding-left: 16px;
padding-right: 16px;
font: 20px Helvetica;
color: #0072b6;
}
</style>
<script>
async function loadForm() {
let url = '/api/sys';
try {
let res = await fetch(url);
if ( res.ok ) {
data = await res.json();
//alert(JSON.stringify(data));
document.getElementById("hw").innerHTML = "HW rev: " + data.hw;
document.getElementById("fw").innerHTML = "FW rev: " + data.fw;
}
}
catch(error) {
alert(error);
}
}
</script>
</head>
<body onload="loadForm();">
<center><h1>MAIANA&trade;</h1></center>
<center><img src="images/maiana-logo.jpg"/></center>
<center><h2>The Open Source AIS</h2></center>
<table class="infotable">
<tr>
<td id="hw">&nbsp;</td><td id="fw" align="right">&nbsp;</td>
</tr>
</table>
<br/>
<center><button type="button" onclick="location.href='wifi.html'">Configure WiFi</button></center>
<br/>
<center><button type="button" onclick="location.href='ais.html'">Configure AIS Station</button></center>
<br/>
<center><button type="button" onclick="location.href='nmea.html'">Configure NMEA Gateway</button></center>
</body>
</html>