diff --git a/account/assets/js/panelHandlers/domains_subdomains/domain_management.js b/account/assets/js/panelHandlers/domains_subdomains/domain_management.js index 91d5c80..469ad47 100644 --- a/account/assets/js/panelHandlers/domains_subdomains/domain_management.js +++ b/account/assets/js/panelHandlers/domains_subdomains/domain_management.js @@ -4,9 +4,45 @@ jQuery('._js_domain-management').on('click', function(e){ e.preventDefault(); ListDomains(BUNDLE_NAME); + ListServerNameservers(); domainManagementModal.modal('show'); }); +function ListServerNameservers() { + var display = jQuery('._js_server-nameservers'); + + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'api/settings/get_nameservers', true); + xhr.send(); + + xhr.onloadend = function() { + display.html(''); + + if(xhr.status == 200) { + if(xhr.response != undefined && xhr.response.length != 0) { + jsonResponse = JSON.parse(xhr.response) + jQuery.each(jsonResponse, function(k, v) { + display.append('

'+v+'

'); + }); + } + else { + display.html('

An error has occurred, please refresh. If problem persists please contact your administrator.

'); + } + } + else if(xhr.status == 204) { + display.html('

There are no nameservers stored in the server.

'); + } + else { + if(xhr.response != undefined && xhr.response.length != 0) { + alert('Error: ' + xhr.response); + } + else { + alert('An error has occurred, refresh and try again. If problem persists please contact your administrator.'); + } + } + } +} + function ListDomains(bundle_name) { var list = jQuery('._js_registered-domains'); diff --git a/account/gPanel.html b/account/gPanel.html index 3b512a1..7f47857 100644 --- a/account/gPanel.html +++ b/account/gPanel.html @@ -208,9 +208,16 @@

Registered Domains

+ Please allow up to 15 minutes for the server to track your domain.
+ +

Server Nameservers

+ Point your domains to one of these nameservers. +
+ +
+ + +
@@ -418,6 +452,7 @@
+
@@ -472,6 +507,9 @@ + + +