mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Import dnssec settings if they exist
This commit is contained in:
parent
9854630f68
commit
64508a7a51
2 changed files with 25 additions and 0 deletions
|
@ -302,6 +302,12 @@ $(document).ready(function () {
|
||||||
name: {
|
name: {
|
||||||
title: 'Domain'
|
title: 'Domain'
|
||||||
},
|
},
|
||||||
|
dnssec: {
|
||||||
|
title: 'DNSSEC',
|
||||||
|
display: function (zone) {
|
||||||
|
console.log(zone);
|
||||||
|
}
|
||||||
|
},
|
||||||
<? if (is_adminuser()) { ?>
|
<? if (is_adminuser()) { ?>
|
||||||
owner: {
|
owner: {
|
||||||
title: 'Owner',
|
title: 'Owner',
|
||||||
|
|
19
zones.php
19
zones.php
|
@ -127,6 +127,22 @@ function get_zone_owner($zone) {
|
||||||
return 'admin';
|
return 'admin';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_zone_keys($zone) {
|
||||||
|
$ret = array();
|
||||||
|
foreach (json_decode(_do_curl("/servers/:serverid:/zones/".$zone."/cryptokeys"), 1) as $key) {
|
||||||
|
if (!isset($key['active']))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (isset($key['dses'])) {
|
||||||
|
$key['dstxt'] = join("\n", $key['dses']);
|
||||||
|
}
|
||||||
|
unset($key['dses']);
|
||||||
|
$ret[] = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
function check_owner($zone) {
|
function check_owner($zone) {
|
||||||
if (is_adminuser() === TRUE) {
|
if (is_adminuser() === TRUE) {
|
||||||
return TRUE ;
|
return TRUE ;
|
||||||
|
@ -157,6 +173,9 @@ if ($action == "list" or $action== "listslaves") {
|
||||||
if ($action == "listslaves" and $zone['kind'] == "Slave") {
|
if ($action == "listslaves" and $zone['kind'] == "Slave") {
|
||||||
array_push($return, $zone);
|
array_push($return, $zone);
|
||||||
} elseif ($action == "list" and $zone['kind'] != "Slave") {
|
} elseif ($action == "list" and $zone['kind'] != "Slave") {
|
||||||
|
if ($zone['dnssec'] === TRUE) {
|
||||||
|
$zone['keyinfo'] = get_zone_keys($zone);
|
||||||
|
}
|
||||||
array_push($return, $zone);
|
array_push($return, $zone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue