Fix log sort order when multiple series are returned (#1956)
Series are sorted internal by "order by", but the set of all series returned is not. Tried some ways to sort completely on database, found no way .. client side sort works at least Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
Vishal
parent
7d78004b4b
commit
0f1cfeb4a0
@@ -22,6 +22,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -130,6 +131,8 @@ func (influx InfluxDB) GetLogs(filter LogFilter) ([]LogEntry, error) {
|
||||
}
|
||||
}
|
||||
|
||||
sort.Sort(ByTimestamp(logEntries, filter.Reverse))
|
||||
|
||||
return logEntries, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user