|
23 | 23 | function hostTone(host: HostRuntime): HostTone { |
24 | 24 | if (!host.available) return 'warn'; |
25 | 25 | if (host.queue_active) return 'ok'; |
26 | | - if (host.schedule_open === false) return 'hold'; |
27 | 26 | if (host.active_reason === 'encode queue capability disabled') return 'warn'; |
| 27 | + if (host.schedule_open === false) return 'hold'; |
28 | 28 | return 'neutral'; |
29 | 29 | } |
30 | 30 |
|
31 | 31 | function hostStatusLabel(host: HostRuntime): string { |
32 | 32 | if (!host.available) return 'Needs attention'; |
33 | 33 | if (host.queue_active) return 'Ready'; |
34 | 34 | if (host.schedule_profile_label === 'Never') return 'Disabled'; |
35 | | - if (host.schedule_open === false) return 'Scheduled'; |
36 | 35 | if (host.active_reason === 'parallel encode slots are full') return 'At capacity'; |
37 | 36 | if (host.active_reason === 'encode queue capability disabled') return 'Needs setup'; |
| 37 | + if (host.schedule_open === false) return 'Scheduled'; |
38 | 38 | return 'Mounted'; |
39 | 39 | } |
40 | 40 |
|
|
46 | 46 | if (host.queue_active) return `${host.max_parallel_encodes} ${laneLabel} available`; |
47 | 47 | if (host.schedule_profile_label === 'Never') |
48 | 48 | return `${host.max_parallel_encodes} ${laneLabel} disabled`; |
49 | | - if (host.schedule_open === false) { |
50 | | - return `${host.max_parallel_encodes} ${laneLabel} scheduled for the next window`; |
51 | | - } |
52 | 49 | if (host.active_reason === 'parallel encode slots are full') { |
53 | 50 | return `${host.max_parallel_encodes} ${laneLabel} busy`; |
54 | 51 | } |
| 52 | + if (host.active_reason === 'encode queue capability disabled') { |
| 53 | + return `${host.max_parallel_encodes} ${laneLabel} need queue setup`; |
| 54 | + } |
| 55 | + if (host.schedule_open === false) { |
| 56 | + return `${host.max_parallel_encodes} ${laneLabel} scheduled for the next window`; |
| 57 | + } |
55 | 58 | return `${host.max_parallel_encodes} ${laneLabel} mounted`; |
56 | 59 | } |
57 | 60 |
|
|
0 commit comments