AppReports/view.html
2019-07-04 12:21:37 +02:00

40 lines
898 B
HTML

<html>
<head>
<link rel="stylesheet" href="https://cdn.scode.ovh/bootstrapLight.css" />
<style>
table {
border-collapse: collapse;
}
table,
th,
td {
border: 1px solid #085;
padding: 5px;
}
</style>
</head>
<body>
<div id="data"></div>
<br />
<br />
<a
style="font-size:10px"
rel="license"
href="https://www.gnu.org/licenses/gpl-3.0.en.html"
>GNU General Public License v3.0 or later &copy; Timo Hocker</a
>
<script>
fetch('?json')
.then(res => res.json())
.then(json => {
let data = '<table>';
for (let row of json) {
data += `<tr><td>${row.join('</td><td>')}</td></tr>`;
}
data += '</table>';
document.getElementById('data').innerHTML = data;
});
</script>
</body>
</html>