function setupCheckpointTable(isHistoryPage = false) { const table = initializeCheckpointTable(isHistoryPage); table.on('draw', function () { const body = $(table.table().body()); body.unhighlight(); body.highlight(table.search()); }); window.checkpointTable = table; window.clearCheckpointTable = function () { table.clear().draw(); }; window.addToCheckpointTable = function (records) { if (!Array.isArray(records)) { records = [records]; } table.rows.add(records).draw(); }; }