mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 20:54:18 +02:00
streamline table api
This commit is contained in:
@@ -85,7 +85,7 @@ func IlmList(conf *cfg.Config, pattern string) error {
|
||||
repr.Println(res)
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf, 5, 0)
|
||||
table := printer.NewTable(conf).WithSize(5, 0)
|
||||
table.Addheaders("ilm policy", "hot", "warm", "frozen", "delete")
|
||||
|
||||
for name, ilm := range res {
|
||||
@@ -123,7 +123,7 @@ func IlmShow(conf *cfg.Config, policy string) error {
|
||||
return IlmShowTree(conf, ilm.Policy)
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf, 2, 5)
|
||||
table := printer.NewTable(conf).WithSize(2, 5)
|
||||
table.Addheaders("ilm policy setting", "value")
|
||||
|
||||
table.Entries = [][]any{
|
||||
@@ -142,7 +142,7 @@ func IlmShow(conf *cfg.Config, policy string) error {
|
||||
func IlmShowTree(conf *cfg.Config, ilm types.IlmPolicy) error {
|
||||
indent := ""
|
||||
|
||||
table := printer.NewTable(conf, 4, 0)
|
||||
table := printer.NewTable(conf).WithSize(4, 0)
|
||||
table.Addheaders("phase", "min age", "min size", "snapshot repo")
|
||||
|
||||
for _, phase := range IlmPhaseOrder {
|
||||
@@ -280,7 +280,7 @@ func IlmExplain(conf *cfg.Config, index string) error {
|
||||
|
||||
ilm := explain.(*types.LifecycleExplainManaged)
|
||||
|
||||
table := printer.NewTable(conf, 2, 0)
|
||||
table := printer.NewTable(conf).WithSize(2, 0)
|
||||
table.Addheaders("ilm status field", "value")
|
||||
|
||||
info := ""
|
||||
|
||||
Reference in New Issue
Block a user