MCPcopy Create free account
hub / github.com/error311/FileRise / getJobStateClass

Function getJobStateClass

public/js/transferProgress.js:370–379  ·  view source on GitHub ↗
(job)

Source from the content-addressed store, hash-verified

368}
369
370function getJobStateClass(job) {
371 const state = String(job.state || '').toLowerCase();
372 if (state === 'running' || state === 'finishing') return 'state-running';
373 if (state === 'queued') return 'state-queued';
374 if (state === 'cancel_requested' || state === 'cancelling') return 'state-cancelling';
375 if (state === 'done') return 'state-done';
376 if (state === 'error' || state === 'failed') return 'state-error';
377 if (state === 'cancelled') return 'state-error';
378 return 'state-running';
379}
380
381function getJobStateLabel(job) {
382 const state = String(job.state || '').toLowerCase();

Callers 1

renderJobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected