From e7b9fb26c1a8bb0d5895ed7e04d8c7cbd5ac1431 Mon Sep 17 00:00:00 2001 From: Victor Lap Date: Thu, 17 Oct 2019 09:26:21 +0200 Subject: [PATCH] Also sort custom dns list on rtype and value --- management/templates/custom-dns.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/management/templates/custom-dns.html b/management/templates/custom-dns.html index 7e637a6a..a2d5042d 100644 --- a/management/templates/custom-dns.html +++ b/management/templates/custom-dns.html @@ -198,6 +198,12 @@ function show_current_custom_dns() { return el; } var sort = function(a, b) { + if(a.qname === b.qname) { + if(a.rtype === b.rtype) { + return a.value > b.value ? 1 : -1; + } + return a.rtype > b.rtype ? 1 : -1; + } return a.qname > b.qname ? 1 : -1; }