mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 11:34:17 +02:00
streamline table api
This commit is contained in:
@@ -104,7 +104,7 @@ func IndexList(conf *cfg.Config) error {
|
||||
}
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf, 3, size)
|
||||
table := printer.NewTable(conf).WithSize(3, size)
|
||||
table.Addheaders("name", "size", "docscount")
|
||||
|
||||
for idx, index := range list {
|
||||
@@ -140,7 +140,7 @@ func IndexShow(conf *cfg.Config, indexpattern string) error {
|
||||
idx++
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf, 2, 7)
|
||||
table := printer.NewTable(conf).WithSize(2, 7)
|
||||
table.Addheaders("index property", "value")
|
||||
|
||||
ts, err := strconv.ParseInt(index.Settings.Index.CreationDate.(string), 10, 64)
|
||||
@@ -263,7 +263,7 @@ func IndexFields(conf *cfg.Config, index string) error {
|
||||
return fmt.Errorf("failed to retrieve field capabilties: %w", esErrorString(err))
|
||||
}
|
||||
|
||||
table := printer.NewTable(conf, 5, 0)
|
||||
table := printer.NewTable(conf).WithSize(5, 0)
|
||||
table.Addheaders("field", "type", "searchable", "aggretable", "metadata")
|
||||
|
||||
idx := 0
|
||||
@@ -336,7 +336,7 @@ func IndexDiskusage(conf *cfg.Config, index string) error {
|
||||
return errors.New("no disk usage reported for index")
|
||||
}
|
||||
|
||||
table := printer.NewTableEmpty(conf).
|
||||
table := printer.NewTable(conf).
|
||||
WithHeaders("field", "bloom filter", "norms", "points", "term vectors", "knn vectors", "total")
|
||||
|
||||
for name, field := range diskusage.Fields {
|
||||
|
||||
Reference in New Issue
Block a user