Skip to content

Commit

Permalink
[Fix OSSPROJ-42 OSSPROJ-43] Table panels sort data by first selected …
Browse files Browse the repository at this point in the history
…"segment by" label (#77)
  • Loading branch information
crohn authored Mar 15, 2021
1 parent e390d2d commit f2e7d1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9
0.10
5 changes: 2 additions & 3 deletions src/data_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,8 @@ function getRequest(target, requestTime) {
sort.push({ k1: sortDirection });
}
} else {
// for table panels, sort data by first metric.
// users can then re-sort by clicking table headers, but data stays the same (no re-fetch).
sort = [{ v0: sortDirection }];
// sort table by first label, let Grafana to sort the final table then
sort = [{ k0: sortDirection }];
}

return sort;
Expand Down

0 comments on commit f2e7d1f

Please sign in to comment.