Add IP address to output

This commit is contained in:
Marian Steinbach 2018-04-05 20:24:31 +02:00
parent 0a3c8e8185
commit cedb2e8cba
5 changed files with 17 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -28,6 +28,7 @@
<thead>
<tr>
<th scope="col">URL</th>
<th scope="col">IP-Adresse</th>
<th scope="col"><abbr title="Site ist sowohl mit www. als auch ohne www. in URL erreichbar">www. optional</abbr></th>
<th scope="col"><abbr title="URL-Varianten leiten auf eine einzige Startseiten-URL weiter">Kanonische URL</abbr></th>
<th scope="col"><abbr title="Site nutzt HTTP-Verschlüsselung">HTTPS</abbr></th>

File diff suppressed because one or more lines are too long

View File

@ -28,6 +28,7 @@
<thead>
<tr>
<th scope="col">URL</th>
<th scope="col">IP-Adresse</th>
<th scope="col"><abbr title="Site ist sowohl mit www. als auch ohne www. in URL erreichbar">www. optional</abbr></th>
<th scope="col"><abbr title="URL-Varianten leiten auf eine einzige Startseiten-URL weiter">Kanonische URL</abbr></th>
<th scope="col"><abbr title="Site nutzt HTTP-Verschlüsselung">HTTPS</abbr></th>

View File

@ -12,8 +12,15 @@ $(function(){
var tbody = $('tbody');
$.each(data, function(index, item) {
var row = $(document.createElement('tr'));
// input URL
row.append('<td><a href="' + item.input_url + '">' + punycode.toUnicode(item.input_url) + '</a></td>');
// IPs
var ips = _.uniq(_.flatten(_.map(item.hostnames, 'ip_addresses')));
console.log(ips);
row.append('<td>' + _.join(ips, ', ') + '</a></td>');
// hostnames
var twoHostnames = false;
if (_.filter(item.hostnames, {'resolvable': true}).length === 2) {