Small progress tweaks. (#1218)
This commit is contained in:
parent
2a9cf66ed0
commit
0bd3036115
2 changed files with 16 additions and 9 deletions
|
@ -474,7 +474,7 @@ func (display *ProgressDisplay) processNormalEvent(event engine.Event) {
|
|||
|
||||
if len(display.rows) == 0 {
|
||||
// about to make our first status message. make sure we present the header line first.
|
||||
display.rows = append(display.rows, &headerRowData{})
|
||||
display.rows = append(display.rows, &headerRowData{display: display})
|
||||
}
|
||||
|
||||
// At this point, all events should relate to resources.
|
||||
|
@ -627,19 +627,19 @@ func (display *ProgressDisplay) getStepDoneDescription(step engine.StepEventMeta
|
|||
func getPreviewText(op deploy.StepOp) string {
|
||||
switch op {
|
||||
case deploy.OpSame:
|
||||
return "[no change]"
|
||||
return "no change"
|
||||
case deploy.OpCreate:
|
||||
return "[create]"
|
||||
return "create"
|
||||
case deploy.OpUpdate:
|
||||
return "[update]"
|
||||
return "update"
|
||||
case deploy.OpDelete:
|
||||
return "[delete]"
|
||||
return "delete"
|
||||
case deploy.OpReplace:
|
||||
return "[replace]"
|
||||
return "replace"
|
||||
case deploy.OpCreateReplacement:
|
||||
return "[create for replacement]"
|
||||
return "create for replacement"
|
||||
case deploy.OpDeleteReplaced:
|
||||
return "[delete for replacement]"
|
||||
return "delete for replacement"
|
||||
}
|
||||
|
||||
contract.Failf("Unrecognized resource step op: %v", op)
|
||||
|
|
|
@ -42,6 +42,7 @@ type ResourceRow interface {
|
|||
|
||||
// Implementation of a Row, used for the header of the grid.
|
||||
type headerRowData struct {
|
||||
display *ProgressDisplay
|
||||
columns []string
|
||||
uncolorizedColumns []string
|
||||
}
|
||||
|
@ -56,7 +57,13 @@ func (data *headerRowData) ColorizedColumns() []string {
|
|||
return blue(msg)
|
||||
}
|
||||
|
||||
data.columns = []string{"#", header("Resource Type"), header("Name"), header("Status"), header("Extra Info")}
|
||||
var statusColumn string
|
||||
if data.display.isPreview {
|
||||
statusColumn = header("Plan")
|
||||
} else {
|
||||
statusColumn = header("Status")
|
||||
}
|
||||
data.columns = []string{"#", header("Resource Type"), header("Name"), statusColumn, header("Extra Info")}
|
||||
}
|
||||
|
||||
return data.columns
|
||||
|
|
Loading…
Reference in a new issue