From 934e4a7af3ec52dc7e8778c64a75f6fd1ec5f5e5 Mon Sep 17 00:00:00 2001 From: corubba Date: Fri, 3 Mar 2023 13:35:14 +0100 Subject: [PATCH] Sort records label-wise reverse Account for the hierarchical nature of DNS by sorting records by their name label-wise from right to left. Also justify the record names to the right, so they visually line up on label borders. --- powerdnsadmin/templates/domain.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/powerdnsadmin/templates/domain.html b/powerdnsadmin/templates/domain.html index 026a89b..373bbbd 100755 --- a/powerdnsadmin/templates/domain.html +++ b/powerdnsadmin/templates/domain.html @@ -202,6 +202,17 @@ {% else %} targets: [5] {% endif %} + }, + { + targets: [0], + className: "text-right", + data: { + '_': "0", + 'sort': function (row, _type, _set, _meta) { + const data = row[0] || ''; + return data.split('.').reverse().join('.'); + }, + }, } ], {% if domain.type != 'Slave' %}