diff --git a/web/startScan/static/startScan/js/detail_scan.js b/web/startScan/static/startScan/js/detail_scan.js index aa455424..0ed97d35 100644 --- a/web/startScan/static/startScan/js/detail_scan.js +++ b/web/startScan/static/startScan/js/detail_scan.js @@ -1477,16 +1477,33 @@ function fetch_whois(domain_name){ pos: 'top-right', duration: 1500, }); + $("#whois_not_fetched_alert").hide(); + $("#whois_fetching_alert").show(); fetch(`/api/tools/whois/?format=json&ip_domain=${domain_name}&save_db`, {}).then(res => res.json()) .then(function (response) { + $("#whois_fetching_alert").hide(); + document.getElementById('domain_age').innerHTML = response['domain']['domain_age'] + ' ' + response['domain']['date_created']; + document.getElementById('ip_address').innerHTML = response['domain']['ip_address']; + document.getElementById('ip_geolocation').innerHTML = response['domain']['geolocation']; + + document.getElementById('registrant_name').innerHTML = response['registrant']['name']; + console.log(response['registrant']['organization']) + document.getElementById('registrant_organization').innerHTML = response['registrant']['organization'] ? response['registrant']['organization'] : ' '; + document.getElementById('registrant_address').innerHTML = response['registrant']['address'] + ' ' + response['registrant']['city'] + ' ' + response['registrant']['state'] + ' ' + response['registrant']['country']; + document.getElementById('registrant_phone_numbers').innerHTML = response['registrant']['tel']; + document.getElementById('registrant_fax').innerHTML = response['registrant']['fax']; + Snackbar.show({ - text: 'Whois Fetched...(Click to reload)', + text: 'Whois Fetched...', pos: 'top-right', - duration: 3000, - actionText: 'Reload', - onActionClick: function(element) { - location.reload(); - } + duration: 3000 }); + + $("#whois_fetched_alert").show(); + + $("#whois_fetched_alert").fadeTo(2000, 500).slideUp(1500, function(){ + $("#whois_fetched_alert").slideUp(500); + }); + }); } diff --git a/web/startScan/templates/startScan/detail_scan.html b/web/startScan/templates/startScan/detail_scan.html index 21a81ad2..ca55f1f5 100644 --- a/web/startScan/templates/startScan/detail_scan.html +++ b/web/startScan/templates/startScan/detail_scan.html @@ -343,7 +343,7 @@ Detailed Scan
| Domain age | -{{history.domain.domain_info.domain_age}} {{history.domain.domain_info.date_created}} | +|
| IP Address | -{{history.domain.domain_info.ip_address}} | +{{history.domain.domain_info.ip_address}} |
| IP Geolocation | -{% if history.domain.domain_info.geolocation_iso %} {% endif %} {{history.domain.domain_info.geolocation}} |
+ {% if history.domain.domain_info.geolocation_iso %} {% endif %} {{history.domain.domain_info.geolocation}} |
{% endif %} {{history.domain.domain_info.whois.registrant.address}} {{history.domain.domain_info.whois.registrant.City}} {{history.domain.domain_info.whois.registrant.state}} {{history.domain.domain_info.whois.registrant.country}}
{% endif %} {{history.domain.domain_info.whois.registrant.address}} {{history.domain.domain_info.whois.registrant.City}} {{history.domain.domain_info.whois.registrant.state}} {{history.domain.domain_info.whois.registrant.country}}