(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool)
| 92 | } |
| 93 | |
| 94 | func getWorkerPoolAsJson(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool) WorkerPoolAsJson { |
| 95 | workers, _ := getWorkers(opts, workerPool) |
| 96 | workerStats := calculateWorkerStats(workers) |
| 97 | |
| 98 | return WorkerPoolAsJson{ |
| 99 | Id: workerPool.GetID(), |
| 100 | Name: workerPool.GetName(), |
| 101 | WorkerPoolType: string(workerPool.GetWorkerPoolType()), |
| 102 | IsDefault: workerPool.GetIsDefault(), |
| 103 | Workers: workerStats, |
| 104 | WebUrl: util.GenerateWebURL(opts.Host, workerPool.GetSpaceID(), fmt.Sprintf("infrastructure/workerpools/%s", workerPool.GetID())), |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func getWorkerPoolAsTableRow(opts *shared.ViewOptions, workerPool workerpools.IWorkerPool) []string { |
| 109 | workers, _ := getWorkers(opts, workerPool) |
no test coverage detected