(app models.ApplicationFields)
| 11 | ) |
| 12 | |
| 13 | func ColoredAppState(app models.ApplicationFields) string { |
| 14 | appState := strings.ToLower(app.State) |
| 15 | |
| 16 | if app.RunningInstances == 0 { |
| 17 | if appState == models.ApplicationStateStopped { |
| 18 | return appState |
| 19 | } |
| 20 | return terminal.CrashedColor(appState) |
| 21 | } |
| 22 | |
| 23 | if app.RunningInstances < app.InstanceCount { |
| 24 | return terminal.WarningColor(appState) |
| 25 | } |
| 26 | |
| 27 | return appState |
| 28 | } |
| 29 | |
| 30 | func ColoredAppInstances(app models.ApplicationFields) string { |
| 31 | healthString := fmt.Sprintf("%d/%d", app.RunningInstances, app.InstanceCount) |
no test coverage detected