@@ -306,7 +308,30 @@ $(document).ready(function () {
dnssec: {
title: 'DNSSEC',
display: function (zone) {
- console.log(zone);
+ if (zone.record.dnssec == true) {
+ var $img = $('

');
+ $img.click(function () {
+ $("#dnssecinfo").html("");
+ $.each(zone.record.keyinfo, function ( i, val) {
+ if (val.dstxt) {
+ $("#dnssecinfo").append("
"+val.keytype+"
"+val.dstxt+"
");
+ }
+ });
+ $("#dnssecinfo").dialog({
+ modal: true,
+ title: "DS-records for "+zone.record.name,
+ width: 'auto',
+ buttons: {
+ Ok: function() {
+ $( this ).dialog( "close" );
+ }
+ }
+ });
+ });
+ return $img;
+ } else {
+ return '

';
+ }
}
},
if (is_adminuser()) { ?>
diff --git a/zones.php b/zones.php
index 92ee1cd..6607feb 100644
--- a/zones.php
+++ b/zones.php
@@ -133,10 +133,12 @@ function get_zone_keys($zone) {
if (!isset($key['active']))
continue;
- if (isset($key['dses'])) {
- $key['dstxt'] = join("\n", $key['dses']);
+ if (isset($key['ds'])) {
+ foreach ($key['ds'] as $ds) {
+ $key['dstxt'] .= $zone.' IN DS '.$ds."\n";
+ }
}
- unset($key['dses']);
+ unset($key['ds']);
$ret[] = $key;
}
@@ -173,8 +175,8 @@ if ($action == "list" or $action== "listslaves") {
if ($action == "listslaves" and $zone['kind'] == "Slave") {
array_push($return, $zone);
} elseif ($action == "list" and $zone['kind'] != "Slave") {
- if ($zone['dnssec'] === TRUE) {
- $zone['keyinfo'] = get_zone_keys($zone);
+ if ($zone['dnssec'] == true) {
+ $zone['keyinfo'] = get_zone_keys($zone['name']);
}
array_push($return, $zone);
}