mirror of
https://github.com/Luzifer/mondash.git
synced 2024-12-23 04:21:18 +00:00
Fix: Sorting was unstable
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
f4b32fb17c
commit
73a9c0a2be
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ type dashboardMetrics []*dashboardMetric
|
|||
func (a dashboardMetrics) Len() int { return len(a) }
|
||||
func (a dashboardMetrics) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
func (a dashboardMetrics) Less(i, j int) bool {
|
||||
return a[i].HistoricalData[0].Time.Before(a[j].HistoricalData[0].Time)
|
||||
return a[i].Meta.LastUpdate.Before(a[j].Meta.LastUpdate)
|
||||
}
|
||||
|
||||
type dashboardMetric struct {
|
||||
|
|
Loading…
Reference in a new issue