From 02b2d5cbe826889aa627d98764f85a79b27bcfcc Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 3 Jan 2023 21:29:24 +0100 Subject: [PATCH] sort origins by hostname --- app/static/assets/js/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/static/assets/js/helper.js b/app/static/assets/js/helper.js index a8c3079..c4733b9 100644 --- a/app/static/assets/js/helper.js +++ b/app/static/assets/js/helper.js @@ -31,7 +31,7 @@ async function fetchOriginsWithLeases(element) { ` table.appendChild(thead) let tbody = document.createElement('thead'); - x.forEach((o) => { + x.sort((a, b) => a.hostname.localeCompare(b.hostname)).forEach((o) => { let row = document.createElement('tr'); row.innerHTML = ` ${o.origin_ref}