Skip to content

Commit

Permalink
[FIX] runbot: properly sort by alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
Williambraecky committed Jan 9, 2025
1 parent e43827a commit 5c59229
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runbot/static/src/stats/stats_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ export class StatsChart extends Component {
return dict;
}, {},
);
keys.sort((k1, k2) => sortValues[k2] - sortValues[k1]);
keys.sort((k1, k2) => {
if (mode === 'alpha') {
return sortValues[k1].localeCompare(sortValues[k2]);
}
return sortValues[k2] - sortValues[k1]
});
let visibleKeys;
if (this.config.nb_dataset !== -1) {
visibleKeys = new Set(keys.slice(0, this.config.nb_dataset));
Expand Down

0 comments on commit 5c59229

Please sign in to comment.