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:
Mara Sophie Grosch
2021-05-20 07:55:36 +05:30
committed by GitHub
co-authored by Vishal
parent d7ac0ee17a
commit 3bac1d2d9d
2 changed files with 22 additions and 0 deletions
+3
View File
@@ -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
}