mirror of
https://github.com/containers/podman.git
synced 2025-06-27 13:38:49 +08:00
Not all fields in machine list were set properly
When using custom output formats like table, some of the booleans introduced for json format were not initialized correctly (wrong). [NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
This commit is contained in:
@ -188,11 +188,13 @@ func toHumanFormat(vms []*machine.ListResponse) ([]*machineReporter, error) {
|
|||||||
response := new(machineReporter)
|
response := new(machineReporter)
|
||||||
if vm.Name == cfg.Engine.ActiveService {
|
if vm.Name == cfg.Engine.ActiveService {
|
||||||
response.Name = vm.Name + "*"
|
response.Name = vm.Name + "*"
|
||||||
|
response.Default = true
|
||||||
} else {
|
} else {
|
||||||
response.Name = vm.Name
|
response.Name = vm.Name
|
||||||
}
|
}
|
||||||
if vm.Running {
|
if vm.Running {
|
||||||
response.LastUp = "Currently running"
|
response.LastUp = "Currently running"
|
||||||
|
response.Running = true
|
||||||
} else {
|
} else {
|
||||||
response.LastUp = units.HumanDuration(time.Since(vm.LastUp)) + " ago"
|
response.LastUp = units.HumanDuration(time.Since(vm.LastUp)) + " ago"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user