mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 17:22:56 -07:00
Lookup IP address ISP info
This commit is contained in:
parent
469d22a833
commit
aba39d06bf
4 changed files with 68 additions and 3 deletions
|
@ -34,6 +34,15 @@
|
|||
<li>Accuracy Radius: <strong><span id="accuracy"></span></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<h4><strong>Connection Details</strong></h4>
|
||||
</div>
|
||||
<div class="col-sm-6" id="isp_instance">
|
||||
<ul class="list-unstyled">
|
||||
<li>ISP: <strong><span id="isp"></span></strong></li>
|
||||
<li>Address: <strong><span id="isp_address"></span></strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<% from plexpy.helpers import anon_url %>
|
||||
|
@ -67,6 +76,26 @@
|
|||
$('#latitude').html(data.latitude);
|
||||
$('#longitude').html(data.longitude);
|
||||
$('#accuracy').html(data.accuracy + ' km');
|
||||
|
||||
var nets = data.nets;
|
||||
if (!(nets.length)) {
|
||||
$('#isp').html('Not Found')
|
||||
$('#isp_address').html('Not Found')
|
||||
} else {
|
||||
$('#isp_instance').remove();
|
||||
$.each(nets, function (index, net) {
|
||||
$('#modal-text').append('<div class="col-sm-6"> \
|
||||
<ul class="list-unstyled"> \
|
||||
<li>ISP: <strong>' + net.description + '</strong></li> \
|
||||
<li><span style="float: left;">Address: </span> \
|
||||
<span style="float: left;"><strong>' + net.address + '</strong><br /> \
|
||||
<strong>' + net.city + ", " + net.state + " " + net.postal_code + '</strong><br /> \
|
||||
<strong>' + net.country + '</strong></span> \
|
||||
</li> \
|
||||
</ul> \
|
||||
</div>')
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue