Skip to content

Commit

Permalink
show private ips on status output
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkurt committed Dec 3, 2020
1 parent 7163a08 commit 15b49a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/resource_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (c *Client) GetAppStatus(appName string, showCompleted bool) (*AppStatus, e
canary
region
restarts
privateIP
checks {
status
}
Expand Down Expand Up @@ -81,6 +82,7 @@ func (c *Client) GetAllocationStatus(appName string, allocID string, logLimit in
canary
region
restarts
privateIP
checks {
status
output
Expand Down
1 change: 1 addition & 0 deletions api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ type AllocationStatus struct {
WarningCheckCount int
CriticalCheckCount int
Transitioning bool
PrivateIP string
RecentLogs []LogEntry
}

Expand Down
3 changes: 2 additions & 1 deletion cmd/presenters/allocations.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (p *Allocations) APIStruct() interface{} {
}

func (p *Allocations) FieldNames() []string {
return []string{"ID", "Version", "Region", "Desired", "Status", "Health Checks", "Restarts", "Created"}
return []string{"ID", "Version", "Region", "Desired", "Status", "Health Checks", "Restarts", "Private IP", "Created"}
}

func (p *Allocations) Records() []map[string]string {
Expand Down Expand Up @@ -50,6 +50,7 @@ func (p *Allocations) Records() []map[string]string {
"Created": FormatRelativeTime(alloc.CreatedAt),
"Health Checks": FormatHealthChecksSummary(alloc),
"Restarts": strconv.Itoa(alloc.Restarts),
"Private IP": alloc.PrivateIP,
})
}

Expand Down

0 comments on commit 15b49a3

Please sign in to comment.