Skip to content

Commit

Permalink
Merge branch 'master' into fix-update-to-specific-version-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Jan 31, 2024
2 parents 488eb80 + 04ec266 commit 368f913
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/output/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const (
skull = "\U0001F480"
question = "\U00002753"
circle = "●"
VPN = "🛡"
Lock = "🔒"
)

// Print a list of Machines in a table
Expand Down Expand Up @@ -94,6 +96,15 @@ func (m MachineTablePrinter) Print(data []*models.ModelsV1MachineResponse) {
default:
statusEmoji = question
}

if machine.State != nil && machine.State.Value != nil && *machine.State.Value == "LOCK" {
statusEmoji = Lock
}

if machine.Allocation != nil && machine.Allocation.Vpn != nil {
statusEmoji = VPN
}

row := []string{machineID, statusEmoji, lastEvent, when, started, age, hostname, ips, sizeID, image, partitionID}
m.addShortData(row, machine)
m.addWideData(row, machine)
Expand Down

0 comments on commit 368f913

Please sign in to comment.