token-validator: fix DS generation and management
This commit is contained in:
parent
eab1af36f4
commit
fbaad50fbd
2 changed files with 14 additions and 10 deletions
|
@ -312,9 +312,11 @@ angular.module("AdLinApp")
|
|||
method: 'GET',
|
||||
url: "api/adomains/" + domain,
|
||||
}).then(function(response) {
|
||||
if (response.data) {
|
||||
response.data.forEach(function(rr) {
|
||||
$scope.adomains.push(rr);
|
||||
$scope.adomains.push(rr);
|
||||
});
|
||||
}
|
||||
});
|
||||
}, function(response) {
|
||||
console.log(response.data.errmsg);
|
||||
|
@ -542,8 +544,8 @@ angular.module("AdLinApp")
|
|||
$scope.nsrr = {
|
||||
"domain": domain,
|
||||
"ttl": 900,
|
||||
"rr": "DS",
|
||||
"labels": ["Key Tag", "Flag", "Algorithme", "Clef publique (base64)"],
|
||||
"rr": "DNSKEY",
|
||||
"labels": ["Flags", "Protocole", "Algorithme", "Clef publique (base64)"],
|
||||
"values": ["", "", "", ""],
|
||||
}
|
||||
$('#NSModal').modal('show');
|
||||
|
@ -553,7 +555,7 @@ angular.module("AdLinApp")
|
|||
"domain": domain,
|
||||
"ttl": rr.ttl,
|
||||
"rr": "DS",
|
||||
"labels": ["Key Tag", "Algo clef", "Algo hash", "Hash (hex)"],
|
||||
"labels": ["Key Tag", "Algo clef", "Type de hash", "Hash (hex)"],
|
||||
"valuesfrom": rr.values.join(" "),
|
||||
"values": rr.values,
|
||||
}
|
||||
|
@ -563,6 +565,8 @@ angular.module("AdLinApp")
|
|||
$scope.saveNSRR = function(nsrr) {
|
||||
if (nsrr.ttl)
|
||||
nsrr.ttl = parseInt(nsrr.ttl)
|
||||
if (nsrr.rr == "DNSKEY")
|
||||
nsrr.rr = "DS"
|
||||
$http({
|
||||
method: (nsrr.valuesfrom !== undefined)?'PATCH':'POST',
|
||||
url: "api/ddomains/" + nsrr.domain + "/" + nsrr.rr,
|
||||
|
|
Reference in a new issue