| 368 | } |
| 369 | |
| 370 | function 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 | |
| 381 | function getJobStateLabel(job) { |
| 382 | const state = String(job.state || '').toLowerCase(); |