add 'ilm show -t' to show a better visualization of a ilm policy (#57)

This commit is contained in:
T. von Dein
2026-06-29 10:11:50 +02:00
parent 81987b75f2
commit b7a87051c0
3 changed files with 77 additions and 0 deletions

View File

@@ -103,6 +103,15 @@ func IlmShow(conf *cfg.Config) *cli.Command {
Usage: "show details about an index lifecycle policy",
UsageText: "show <policy>",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "tree",
Usage: "display policy as a tree",
Destination: &conf.Ilm.Tree,
Aliases: []string{"t"},
},
},
Action: func(ctx context.Context, cmd *cli.Command) error {
policy := cmd.Args().Get(0)
if policy == "" {