()
| 63 | } |
| 64 | |
| 65 | override async printToTerminal() { |
| 66 | const statuses = await this.data; |
| 67 | const serviceNameMinLength = Math.max(...statuses.map((service) => service.name.length)); |
| 68 | Log.info(bold('Service Statuses')); |
| 69 | for (const status of statuses) { |
| 70 | const name = status.name.padEnd(serviceNameMinLength); |
| 71 | if (status.status === 'passing') { |
| 72 | Log.info(`${name} ${green('✔')}`); |
| 73 | } else { |
| 74 | Log.info(`${name} ${red('✘')} (Updated: ${status.lastUpdated.toLocaleString()})`); |
| 75 | Log.info(` Details: ${status.description}`); |
| 76 | Log.info(` Status URL: ${status.statusUrl}`); |
| 77 | } |
| 78 | } |
| 79 | Log.info(); |
| 80 | } |
| 81 | |
| 82 | /** Retrieve the status information for a service which uses a standard API response. */ |
| 83 | async getStatusFromStandardApi(service: ServiceConfig): Promise<StatusCheckResult> { |
nothing calls this directly
no outgoing calls
no test coverage detected