commit 26/01/2026
This commit is contained in:
@@ -12,27 +12,22 @@
|
||||
*/
|
||||
window.logdata = [];
|
||||
|
||||
dtLog = null;
|
||||
|
||||
/**
|
||||
* Fill log table body with values
|
||||
* @param {Log[]} vv values to fill
|
||||
*/
|
||||
function fill_logtablebody(vv) {
|
||||
$('#logtablebody').empty();
|
||||
|
||||
dtLog.clear();
|
||||
if (!Array.isArray(vv) || vv.length === 0) {
|
||||
$('#btnExport').prop('disabled', true);
|
||||
return;
|
||||
}
|
||||
vv.forEach(item => {
|
||||
const row = `<tr>
|
||||
<td>${item.index}</td>
|
||||
<td>${item.datenya}</td>
|
||||
<td>${item.timenya}</td>
|
||||
<td>${item.machine}</td>
|
||||
<td>${item.description}</td>
|
||||
</tr>`;
|
||||
$('#logtablebody').append(row);
|
||||
});
|
||||
dtLog.rows.add(vv);
|
||||
dtLog.draw();
|
||||
|
||||
|
||||
$('#tablesize').text("Table Size: " + vv.length);
|
||||
$('#btnExport').prop('disabled', false);
|
||||
}
|
||||
@@ -64,7 +59,20 @@ $(document).ready(function () {
|
||||
let selectedlogdate = "";
|
||||
let logfilter = "";
|
||||
let APIURL = "Log/";
|
||||
$('#logtablebody').empty();
|
||||
|
||||
if (dtLog === null) {
|
||||
dtLog = new DataTable('#logtable', {
|
||||
data: [],
|
||||
pageLength: 25,
|
||||
columns: [
|
||||
{ title: "No", data: "index" },
|
||||
{ title: "Date", data: "datenya" },
|
||||
{ title: "Time", data: "timenya" },
|
||||
{ title: "Machine", data: "machine" },
|
||||
{ title: "Description", data: "description" }
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (!$('#logdate').val()) {
|
||||
|
||||
Reference in New Issue
Block a user