(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool)
| 106 | } |
| 107 | |
| 108 | func getWorkerPoolAsTableRow(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool) []string { |
| 109 | workers, _ := getWorkers(opts, workerPool) |
| 110 | workerStats := calculateWorkerStats(workers) |
| 111 | |
| 112 | defaultStatus := "" |
| 113 | if workerPool.GetIsDefault() { |
| 114 | defaultStatus = output.Green("Yes") |
| 115 | } else { |
| 116 | defaultStatus = "No" |
| 117 | } |
| 118 | |
| 119 | return []string{ |
| 120 | output.Bold(workerPool.GetName()), |
| 121 | string(workerPool.GetWorkerPoolType()), |
| 122 | defaultStatus, |
| 123 | fmt.Sprintf("%d", workerStats.Total), |
| 124 | output.Greenf("%d", workerStats.Healthy), |
| 125 | output.Redf("%d", workerStats.Unhealthy+workerStats.Unavailable), |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | func getWorkerPoolAsBasic(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool) string { |
| 130 | var result strings.Builder |
no test coverage detected