flask_inference_api_g / table.html
DmitrMakeev's picture
Create table.html
4c9b9f7 verified
raw
history blame
2.07 kB
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tabulator Table</title>
<link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script>
</head>
<body>
<div id="table"></div>
<script>
// JSON-данные
const tableData = [
{
"date_time": "2025-03-22 10:21:42", "dey": "1", "ec": "1.2", "hDm": "50.0",
"id": 1, "nEC": "1.20", "nLoff": "22:00", "nLon": "10:00", "nPh": "5.55",
"nTa": "28", "onA": "1", "onB": "3", "onC": "2", "ph": "1.55",
"sVen": "100", "tA": "22.0", "tS": "25.0", "v_hid": "10", "v_min": "30", "wek": "1"
},
{
"date_time": "2025-03-22 10:21:45", "dey": "1", "ec": "1.2", "hDm": "50.0",
"id": 2, "nEC": "1.20", "nLoff": "22:00", "nLon": "10:00", "nPh": "5.55",
"nTa": "28", "onA": "1", "onB": "3", "onC": "2", "ph": "1.55",
"sVen": "100", "tA": "22.0", "tS": "25.0", "v_hid": "10", "v_min": "30", "wek": "1"
}
];
// Определение колонок
const table = new Tabulator("#table", {
data: tableData,
layout: "fitColumns",
columns: [
{ title: "ID", field: "id", sorter: "number", width: 60 },
{ title: "Дата и время", field: "date_time", sorter: "string" },
{ title: "День", field: "dey", sorter: "number" },
{ title: "EC", field: "ec", sorter: "number" },
{ title: "Температура воздуха", field: "tA", sorter: "number" },
{ title: "PH", field: "ph", sorter: "number" },
{ title: "Влажность", field: "hDm", sorter: "number" }
]
});
</script>
</body>
</html>