diff --git a/DnsServerCore/www/js/zone.js b/DnsServerCore/www/js/zone.js index 49a8c831..bdf0498a 100644 --- a/DnsServerCore/www/js/zone.js +++ b/DnsServerCore/www/js/zone.js @@ -377,6 +377,19 @@ function refreshZones(checkDisplay, pageNumber) { var isReadOnlyZone = zones[i].internal; + var showResyncMenu; + + switch (zones[i].type) { + case "Secondary": + case "Stub": + showResyncMenu = true; + break; + + default: + showResyncMenu = false; + break; + } + var hideOptionsMenu; switch (zones[i].type) { @@ -410,6 +423,10 @@ function refreshZones(checkDisplay, pageNumber) { tableHtmlRows += "
");
+
+ HTTPRequest({
+ url: "/api/zones/resync?token=" + sessionData.token + "&zone=" + zone,
+ success: function (responseJSON) {
+ btn.prop("disabled", false);
+ btn.html(originalBtnHtml);
+
+ showAlert("success", "Resync Triggered!", "Zone '" + zone + "' resync was triggered successfully. Please check the Logs for confirmation.");
+ },
+ error: function () {
+ btn.prop("disabled", false);
+ btn.html(originalBtnHtml);
+ },
+ invalidToken: function () {
+ showPageLogin();
+ }
+ });
+}
+
function resyncZone(objBtn, zone) {
if ($("#titleEditZoneType").text() == "Secondary") {
if (!confirm("The resync action will perform a full zone transfer (AXFR). You will need to check the logs to confirm if the resync action was successful.\r\n\r\nAre you sure you want to resync the '" + zone + "' zone?"))