(summary v7action.DetailedApplicationSummary, displayStartCommand bool)
| 27 | } |
| 28 | |
| 29 | func (display AppSummaryDisplayer) AppDisplay(summary v7action.DetailedApplicationSummary, displayStartCommand bool) { |
| 30 | var isoRow []string |
| 31 | var keyValueTable [][]string |
| 32 | if name, exists := summary.GetIsolationSegmentName(); exists { |
| 33 | isoRow = append(isoRow, display.UI.TranslateText("isolation segment:"), name) |
| 34 | } |
| 35 | |
| 36 | keyValueTable = [][]string{ |
| 37 | {display.UI.TranslateText("name:"), summary.Application.Name}, |
| 38 | {display.UI.TranslateText("requested state:"), strings.ToLower(string(summary.State))}, |
| 39 | isoRow, |
| 40 | {display.UI.TranslateText("routes:"), routeSummary(summary.Routes)}, |
| 41 | {display.UI.TranslateText("last uploaded:"), display.getCreatedTime(summary)}, |
| 42 | {display.UI.TranslateText("stack:"), summary.CurrentDroplet.Stack}, |
| 43 | } |
| 44 | |
| 45 | if summary.LifecycleType == constant.AppLifecycleTypeDocker { |
| 46 | keyValueTable = append(keyValueTable, []string{display.UI.TranslateText("docker image:"), summary.CurrentDroplet.Image}, isoRow) |
| 47 | } else { |
| 48 | keyValueTable = append(keyValueTable, []string{display.UI.TranslateText("buildpacks:"), ""}, isoRow) |
| 49 | } |
| 50 | |
| 51 | display.UI.DisplayKeyValueTable("", keyValueTable, ui.DefaultTableSpacePadding) |
| 52 | |
| 53 | if summary.LifecycleType != constant.AppLifecycleTypeDocker { |
| 54 | display.displayBuildpackTable(summary.CurrentDroplet.Buildpacks) |
| 55 | } |
| 56 | |
| 57 | display.displayProcessTable(summary, displayStartCommand) |
| 58 | } |
| 59 | |
| 60 | func routeSummary(rs []resources.Route) string { |
| 61 | formattedRoutes := []string{} |
no test coverage detected