stock aggregate table

This commit is contained in:
Thanakorn S
2026-05-25 13:30:10 +07:00
parent 45a78a3fed
commit 1237888ab9
20 changed files with 725 additions and 62 deletions
+27
View File
@@ -61,6 +61,13 @@
<td class="text-muted small">Next run</td>
<td id="stat_next_run">—</td>
</tr>
<tr><td colspan="2"><hr class="my-2"></td></tr>
<tr>
<td class="text-muted small">Current gaps</td>
<td id="stat_current_gaps">
<span class="spinner-border spinner-border-sm text-secondary"></span>
</td>
</tr>
</tbody>
</table>
</div>
@@ -162,6 +169,7 @@
btn.prop('disabled', false);
});
load_status();
load_current_gaps();
return;
}
@@ -187,7 +195,26 @@
});
});
function load_current_gaps() {
ajax_request({
url: server_url + 'setting/api/engine/gl_maintenance.php',
autoPrepare: true, checkRequired: 0, noLoading: true, queueLock: false, action: 'get_current_gaps',
onSuccess: function(res) {
var n = res.output.current_gaps;
$('#stat_current_gaps').html(
n === 0
? '<span class="badge bg-success-subtle text-success">0 — up to date</span>'
: '<span class="badge bg-warning-subtle text-warning">' + n + ' period(s) need repair</span>'
);
},
onError: function() {
$('#stat_current_gaps').text('—');
}
});
}
load_status();
load_current_gaps();
</script>
</body>