(loops)
| 61 | } |
| 62 | |
| 63 | function renderList(loops) { |
| 64 | if (!loops.length) return 'No Citadel loops found.\n'; |
| 65 | const active = loops.filter((loop) => !isTerminalStatus(loop.status)); |
| 66 | const stopped = loops.filter((loop) => isTerminalStatus(loop.status)); |
| 67 | const lines = []; |
| 68 | lines.push(`Citadel loops (${loops.length})`); |
| 69 | lines.push(''); |
| 70 | lines.push(`Active (${active.length})`); |
| 71 | if (active.length) active.forEach((loop) => lines.push(formatLoop(loop))); |
| 72 | else lines.push(' none'); |
| 73 | lines.push(''); |
| 74 | lines.push(`Stopped (${stopped.length})`); |
| 75 | if (stopped.length) stopped.forEach((loop) => lines.push(formatLoop(loop))); |
| 76 | else lines.push(' none'); |
| 77 | return `${lines.join('\n')}\n`; |
| 78 | } |
| 79 | |
| 80 | function renderTemplates() { |
| 81 | const lines = ['Loop templates', '']; |
no test coverage detected