mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vlogscli: return back sorting result fields by name
This simplifies locating the needed field when the number of fields per each returned result is big
This commit is contained in:
parent
18dd4105be
commit
daad96b3a5
2 changed files with 5 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"sort"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
@ -120,6 +121,10 @@ func writeJSONObject(w io.Writer, kvs []kv) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
sort.Slice(kvs, func(i, j int) bool {
|
||||
return kvs[i].key < kvs[j].key
|
||||
})
|
||||
|
||||
fmt.Fprintf(w, "{\n")
|
||||
if err := writeJSONObjectKeyValue(w, kvs[0]); err != nil {
|
||||
return err
|
||||
|
|
|
@ -18,8 +18,6 @@ according to [these docs](https://docs.victoriametrics.com/victorialogs/quicksta
|
|||
* FEATURE: [vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/): preserve `less` output after the exit from scrolling mode. This should help re-using previous query results in subsequent queries.
|
||||
* FEATURE: add [`len` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#len-pipe) for calculating the length for the given [log field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) value in bytes.
|
||||
|
||||
* BUGFIX: [vlogscli](https://docs.victoriametrics.com/victorialogs/querying/vlogscli/): preserve the original order of fields in the displayed query responses. Previously fields were sorted by name.
|
||||
|
||||
## [v0.33.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.33.0-victorialogs)
|
||||
|
||||
Released at 2024-10-01
|
||||
|
|
Loading…
Reference in a new issue