mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 18:14:18 +02:00
further table streamlining: work with new table api everywhere
This commit is contained in:
@@ -85,8 +85,8 @@ func IlmList(conf *cfg.Config, pattern string) error {
|
||||
repr.Println(res)
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf).WithSize(5, 0)
|
||||
table.Addheaders("ilm policy", "hot", "warm", "frozen", "delete")
|
||||
table := printer.NewTable(conf).WithSize(5, 0).
|
||||
WithHeaders("ilm policy", "hot", "warm", "frozen", "delete")
|
||||
|
||||
for name, ilm := range res {
|
||||
table.AddRow(name,
|
||||
@@ -123,8 +123,8 @@ func IlmShow(conf *cfg.Config, policy string) error {
|
||||
return IlmShowTree(conf, ilm.Policy)
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf).WithSize(2, 5)
|
||||
table.Addheaders("ilm policy setting", "value")
|
||||
table := printer.NewTable(conf).WithSize(2, 5).
|
||||
WithHeaders("ilm policy setting", "value")
|
||||
|
||||
table.Entries = [][]any{
|
||||
{"policy", policy},
|
||||
@@ -142,9 +142,6 @@ func IlmShow(conf *cfg.Config, policy string) error {
|
||||
func IlmShowTree(conf *cfg.Config, ilm types.IlmPolicy) error {
|
||||
indent := ""
|
||||
|
||||
table := printer.NewTable(conf).WithSize(4, 0)
|
||||
table.Addheaders("phase", "min age", "min size", "snapshot repo")
|
||||
|
||||
for _, phase := range IlmPhaseOrder {
|
||||
if phase == "hot" {
|
||||
fmt.Printf("%s%s phase:\n%s rollover after %s\n",
|
||||
@@ -280,8 +277,8 @@ func IlmExplain(conf *cfg.Config, index string) error {
|
||||
|
||||
ilm := explain.(*types.LifecycleExplainManaged)
|
||||
|
||||
table := printer.NewTable(conf).WithSize(2, 0)
|
||||
table.Addheaders("ilm status field", "value")
|
||||
table := printer.NewTable(conf).WithSize(2, 0).
|
||||
WithHeaders("ilm status field", "value")
|
||||
|
||||
info := ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user