(opts *shared.ViewOptions, worker *machines.Worker)
| 99 | } |
| 100 | |
| 101 | func getWorkerAsTableRow(opts *shared.ViewOptions, worker *machines.Worker) []string { |
| 102 | workerPoolMap, _ := shared.GetWorkerPoolMap(opts) |
| 103 | workerPoolNames := resolveValues(worker.WorkerPoolIDs, workerPoolMap) |
| 104 | |
| 105 | endpointDetails := getEndpointDetails(worker) |
| 106 | endpointDetailsStr := formatEndpointDetailsForTable(endpointDetails) |
| 107 | |
| 108 | return []string{ |
| 109 | worker.Name, |
| 110 | getWorkerTypeDisplayName(worker.Endpoint.GetCommunicationStyle()), |
| 111 | getHealthStatusFormatted(worker.HealthStatus), |
| 112 | worker.StatusSummary, |
| 113 | strings.Join(workerPoolNames, ", "), |
| 114 | endpointDetailsStr, |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | func getWorkerAsBasic(opts *shared.ViewOptions, worker *machines.Worker) string { |
| 119 | var result strings.Builder |
no test coverage detected