added clear cache for testing
This commit is contained in:
+10
-1
@@ -126,6 +126,14 @@
|
|||||||
|
|
||||||
let jobsCache = [], visibleJobs = [], currentJob = null;
|
let jobsCache = [], visibleJobs = [], currentJob = null;
|
||||||
|
|
||||||
|
function clearJobsCache(message='Cache cleared. Reloading…'){
|
||||||
|
jobsCache = [];
|
||||||
|
visibleJobs = [];
|
||||||
|
currentJob = null;
|
||||||
|
resultsEl.innerHTML = `<div class="p-2 text-slate-600 bg-white rounded-lg border border-blue-100">${message}</div>`;
|
||||||
|
}
|
||||||
|
window.clearJobsCache = clearJobsCache;
|
||||||
|
|
||||||
const progressBar = document.getElementById('progressBar');
|
const progressBar = document.getElementById('progressBar');
|
||||||
const searchBox = document.getElementById('searchBox');
|
const searchBox = document.getElementById('searchBox');
|
||||||
const resultsEl = document.getElementById('results');
|
const resultsEl = document.getElementById('results');
|
||||||
@@ -169,7 +177,8 @@
|
|||||||
|
|
||||||
// --- Fetch all jobs ---
|
// --- Fetch all jobs ---
|
||||||
async function fetchAllJobs(){
|
async function fetchAllJobs(){
|
||||||
startProgress(); jobsCache=[]; visibleJobs=[]; resultsEl.innerHTML = '<div class="p-2 text-slate-600 bg-white rounded-lg border border-blue-100">Loading…</div>';
|
startProgress();
|
||||||
|
clearJobsCache('Loading…');
|
||||||
let page=1, totalItems=0; let firstBatchRendered=false;
|
let page=1, totalItems=0; let firstBatchRendered=false;
|
||||||
try{
|
try{
|
||||||
while(true){
|
while(true){
|
||||||
|
|||||||
Reference in New Issue
Block a user