Skip to content

Commit

Permalink
Sort client list alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Apr 18, 2024
1 parent 2e82537 commit bb3c0ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src_assets/common/assets/web/troubleshooting.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ <h2 id="logs">{{ $t('troubleshooting.logs') }}</h2>
.then((response) => {
const clientList = document.querySelector("#client-list");
if (response.status === 'true' && response.named_certs && response.named_certs.length) {
this.clients = response.named_certs;
this.clients = response.named_certs.sort((a, b) => {
return (a.name.toLowerCase() > b.name.toLowerCase() || a.name == "" ? 1 : -1)
});
} else {
this.clients = [];
}
Expand Down

0 comments on commit bb3c0ba

Please sign in to comment.