mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
chore: hide STORE column in 'uc images' output if all machines use containerd image store
This commit is contained in:
@@ -260,6 +260,14 @@ func formatImageTable(rows []imageRow) string {
|
|||||||
columns[5].hide = true
|
columns[5].hide = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide the "STORE" column if all machines use the containerd store.
|
||||||
|
hasNonContainerd := slices.ContainsFunc(rows, func(r imageRow) bool {
|
||||||
|
return r.store != "containerd"
|
||||||
|
})
|
||||||
|
if !hasNonContainerd {
|
||||||
|
columns[6].hide = true
|
||||||
|
}
|
||||||
|
|
||||||
t := tui.NewTable()
|
t := tui.NewTable()
|
||||||
|
|
||||||
var headers []string
|
var headers []string
|
||||||
|
|||||||
Reference in New Issue
Block a user