(route resources.Route, appMap map[string]resources.Application)
| 110 | } |
| 111 | |
| 112 | func (cmd RouteCommand) displayDestinations(route resources.Route, appMap map[string]resources.Application) { |
| 113 | destinations := route.Destinations |
| 114 | if len(destinations) > 0 { |
| 115 | var keyValueTable = [][]string{ |
| 116 | { |
| 117 | cmd.UI.TranslateText("app"), |
| 118 | cmd.UI.TranslateText("process"), |
| 119 | cmd.UI.TranslateText("port"), |
| 120 | cmd.UI.TranslateText("app-protocol"), |
| 121 | }, |
| 122 | } |
| 123 | |
| 124 | for _, destination := range destinations { |
| 125 | port := "" |
| 126 | if destination.Port != 0 { |
| 127 | port = strconv.Itoa(destination.Port) |
| 128 | } |
| 129 | keyValueTable = append(keyValueTable, []string{ |
| 130 | appMap[destination.App.GUID].Name, |
| 131 | destination.App.Process.Type, |
| 132 | port, |
| 133 | destination.Protocol, |
| 134 | }) |
| 135 | } |
| 136 | |
| 137 | cmd.UI.DisplayKeyValueTable("\t", keyValueTable, 3) |
| 138 | } |
| 139 | } |
no test coverage detected