mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-17 03:44:11 +03:00
Update WebUI
This commit is contained in:
@@ -1,16 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>Data Graph</title>
|
||||
<script type="text/javascript" src='plotly-basic-2.18.2.min.js?v=$COMMIT_HASH'></script>
|
||||
|
||||
<script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigcommon.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="readconfigparam.js?v=$COMMIT_HASH"></script>
|
||||
|
||||
<style>
|
||||
h1 {font-size: 2em;}
|
||||
h2 {font-size: 1.5em; margin-block-start: 0.0em; margin-block-end: 0.2em;}
|
||||
h3 {font-size: 1.2em;}
|
||||
p {font-size: 1em;}
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
select {
|
||||
padding: 3px 5px;
|
||||
display: inline-block;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 16px;
|
||||
margin-right: 10px;
|
||||
min-width: 100px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 5px 10px;
|
||||
width: 160px;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
function run() {
|
||||
datefile = document.getElementById("datafiles").value;
|
||||
@@ -23,7 +47,7 @@
|
||||
.then(response => {
|
||||
// handle the response
|
||||
if (response.status == 404) {
|
||||
firework.launch("No log data available for " + dateString, 'warning', 10000);
|
||||
firework.launch("No data available for " + dateString, 'warning', 10000);
|
||||
}
|
||||
response.text()
|
||||
.then( result => {
|
||||
@@ -132,17 +156,17 @@
|
||||
},
|
||||
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
l: 70,
|
||||
r: 70,
|
||||
b: 50,
|
||||
t: 50,
|
||||
t: 40,
|
||||
pad: 4
|
||||
},
|
||||
|
||||
legend: {
|
||||
x: 0.2,
|
||||
y: 0.9,
|
||||
xanchor: 'right'
|
||||
x: 0.02,
|
||||
y: 0.97,
|
||||
xanchor: 'left'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -158,19 +182,19 @@
|
||||
<link href="firework.css?v=$COMMIT_HASH" rel="stylesheet">
|
||||
<script type="text/javascript" src="jquery-3.6.0.min.js?v=$COMMIT_HASH"></script>
|
||||
<script type="text/javascript" src="firework.js?v=$COMMIT_HASH"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Data Graph</h3>
|
||||
<div id='chart'><p>Loading...<br></p></div>
|
||||
<select id="datafiles" onchange="run();"></select>
|
||||
<select id="numbers" onchange="run();"></select>
|
||||
<input type="checkbox" id="showRrelativeValues" onclick = 'run();' unchecked ><label for="showRrelativeValues">Show relative values</label>
|
||||
<button onclick="run();">Refresh</button>
|
||||
|
|
||||
<button onClick="window.location.href = 'data.html?v=$COMMIT_HASH'">Show data</button>
|
||||
<button onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show data files</button>
|
||||
</head>
|
||||
|
||||
</div>
|
||||
<body>
|
||||
<h2>Data Graph</h2>
|
||||
<div id='chart'><p>Loading...<br></p></div>
|
||||
Number sequence:
|
||||
<select id="numbers" onchange="run();"></select>
|
||||
Day:
|
||||
<select id="datafiles" onchange="run();"></select>
|
||||
<input type="checkbox" id="showRrelativeValues" onclick = 'run();' unchecked ><label for="showRrelativeValues">Show relative values</label><br><br>
|
||||
<button class="button" onclick="run();">Refresh</button>
|
||||
<button class="button" onClick="window.location.href = 'data.html?v=$COMMIT_HASH'">Show Data Viewer</button>
|
||||
<button class="button" onClick="window.location.href = getDomainname() + '/fileserver/log/data/'">Show Data Files</button>
|
||||
|
||||
<script>
|
||||
function WriteModelFiles()
|
||||
@@ -214,7 +238,15 @@
|
||||
WriteModelFiles();
|
||||
WriteNumbers();
|
||||
|
||||
function Refresh() {
|
||||
setTimeout (function() {
|
||||
run();
|
||||
Refresh();
|
||||
}, 300000);
|
||||
}
|
||||
|
||||
run();
|
||||
Refresh();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user