MCPcopy Index your code
hub / github.com/cloudfoundry/cli / DisplayInstancesTableForApp

Method DisplayInstancesTableForApp

util/ui/ui_for_app.go:9–19  ·  view source on GitHub ↗
(table [][]string)

Source from the content-addressed store, hash-verified

7)
8
9func (ui *UI) DisplayInstancesTableForApp(table [][]string) {
10 redColor := color.New(color.FgRed, color.Bold)
11 trDown, trCrashed := ui.TranslateText("down"), ui.TranslateText("crashed")
12
13 for i, row := range table {
14 if row[1] == trDown || row[1] == trCrashed {
15 table[i][1] = ui.modifyColor(row[1], redColor)
16 }
17 }
18 ui.DisplayTableWithHeader("", table, DefaultTableSpacePadding)
19}
20
21func (ui *UI) DisplayKeyValueTableForApp(table [][]string) {
22 runningInstances := strings.Split(table[2][1], "/")[0]

Callers

nothing calls this directly

Calls 3

TranslateTextMethod · 0.95
modifyColorMethod · 0.95

Tested by

no test coverage detected