mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-29 06:25:40 +00:00
Add disable button
This commit is contained in:
parent
c8d9f4bf22
commit
dcfa98ac59
@ -1,3 +1,5 @@
|
|||||||
|
var dnssecKeyList = []
|
||||||
|
|
||||||
function applyChanges(data, url, showResult, refreshPage) {
|
function applyChanges(data, url, showResult, refreshPage) {
|
||||||
var success = false;
|
var success = false;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -131,7 +133,7 @@ function enable_dns_sec(url) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getdnssec(url){
|
function getdnssec(url,domain){
|
||||||
|
|
||||||
$.getJSON(url, function(data) {
|
$.getJSON(url, function(data) {
|
||||||
var modal = $("#modal_dnssec_info");
|
var modal = $("#modal_dnssec_info");
|
||||||
@ -143,10 +145,15 @@ function getdnssec(url){
|
|||||||
dnssec_msg = '';
|
dnssec_msg = '';
|
||||||
var dnssec = data['dnssec'];
|
var dnssec = data['dnssec'];
|
||||||
|
|
||||||
if (dnssec.length == 0 && PDNS_VERSION > 4.1) {
|
if (dnssec.length == 0 && parseFloat(PDNS_VERSION) > 4.1) {
|
||||||
dnssec_msg = '<h3>Enable DNSSEC?';
|
dnssec_msg = '<h3>Enable DNSSEC?';
|
||||||
modal.find('.modal-body p').html(dnssec_msg);
|
modal.find('.modal-body p').html(dnssec_msg);
|
||||||
dnssec_footer = '<button type="button" class="btn btn-flat btn-success button_dnssec_enable pull-left" id="example.com">Enable</button><button type="button" class="btn btn-flat btn-default pull-right" data-dismiss="modal">Cancel</button>';
|
dnssec_footer = '<button type="button" class="btn btn-flat btn-success button_dnssec_enable pull-left" id="'+domain+'">Enable</button><button type="button" class="btn btn-flat btn-default pull-right" data-dismiss="modal">Cancel</button>';
|
||||||
|
modal.find('.modal-footer ').html(dnssec_footer);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (parseFloat(PDNS_VERSION) > 4.1) {
|
||||||
|
dnssec_footer = '<button type="button" class="btn btn-flat btn-danger button_dnssec_disable pull-left" id="'+domain+'">Disable DNSSEC</button><button type="button" class="btn btn-flat btn-default pull-right" data-dismiss="modal">Close</button>';
|
||||||
modal.find('.modal-footer ').html(dnssec_footer);
|
modal.find('.modal-footer ').html(dnssec_footer);
|
||||||
}
|
}
|
||||||
for (var i = 0; i < dnssec.length; i++) {
|
for (var i = 0; i < dnssec.length; i++) {
|
||||||
@ -167,6 +174,7 @@ function getdnssec(url){
|
|||||||
dnssec_msg += '</form>';
|
dnssec_msg += '</form>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
modal.find('.modal-body p').html(dnssec_msg);
|
modal.find('.modal-body p').html(dnssec_msg);
|
||||||
}
|
}
|
||||||
modal.modal('show');
|
modal.modal('show');
|
||||||
|
Loading…
Reference in New Issue
Block a user