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 May 24, 2024
1 parent f756507 commit 37a9c8b
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 37a9c8b

Please sign in to comment.