()
| 531 | } |
| 532 | |
| 533 | func (m modifyModel) getMaxCursor() int { |
| 534 | switch m.step { |
| 535 | case modifyStepGPU: |
| 536 | return len(m.specs.GPUOptions()) - 1 |
| 537 | |
| 538 | case modifyStepCompute: |
| 539 | if m.gpuCountPhase { |
| 540 | return len(m.specs.GPUCounts(m.config.GPUType)) - 1 |
| 541 | } |
| 542 | return len(m.specs.VCPUOptions(m.config.GPUType, m.config.NumGPUs)) - 1 |
| 543 | |
| 544 | case modifyStepConfirmation: |
| 545 | return 1 // Apply Changes, Cancel |
| 546 | } |
| 547 | |
| 548 | return 0 |
| 549 | } |
| 550 | |
| 551 | func (m modifyModel) View() string { |
| 552 | if m.quitting { |
no test coverage detected