Merge pull request #3 from netzbegruenung/ipaddress

Display IP address
This commit is contained in:
Marian Steinbach 2018-04-05 23:34:39 +02:00 committed by GitHub
commit dee3eb1d59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 10 deletions

View file

@ -16,5 +16,5 @@ webapp/node_modules:
# Build webapp
webapp: webapp/node_modules
cd webapp && npx webpack --config webpack.config.js
rm -rf ./docs
cp -r webapp/dist ./docs
rm -rf ./docs/*
cp -r webapp/dist/* ./docs/

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) {