new: Display IDNA decoded on tree.

pull/829/head
Raphaël Vinot 2023-11-07 21:12:35 +01:00
parent f416851f16
commit 5b42cb7f4a
3 changed files with 12 additions and 4 deletions

View File

@ -36,7 +36,7 @@
"stats.css": "/kY943FwWBTne4IIyf7iBROSfbGd82TeBicEXqKkRwawMVRIvM/Pk5MRa7okUyGIxaDjFQGmV/U1vy+PhN6Jbw==",
"stats_graph.js": "0OEouA6NAxLG2wMd7D2vtGoMrXKna7My98Euc6ecyfdO4/6mIJS87vzISOS4zSZ8u4ehpa+p7E0nWhsXXE7H/Q==",
"tree.css": "R/pWQnE8kMacDrzGy/NpA1tJoHAZpOjFiX6dqtBe+PqAnhYMn1CIQzODh8Ifvh6hBTPLRWX3bsabfEvfaI7Z6A==",
"tree.js": "6KzVwAvILhlTbU1IHy/km1JGa5jmUbzD9ZpnKCY3kTw040sMcztTn/i67I7r4z8VaQdFor8II3PaWeHxU4IqQw==",
"tree.js": "yutMvl9vXhN0htkl40tRHF3r5LCDsH+MJplB6ihMENIsMryEyVoTr4Zq1UadgMG5tP+W2/jqm2zfXh414Kk8AA==",
"up.jpg": "d1ljZJ9f5JekyM6RLFFH2Ua44j6neiQBdUIXOenRTjGppQr3JaeglpQIH6BjPCJL177+TH52U3UIRNS5YAyKIg==",
"up_right.jpg": "OMmz+n+MxR34P8/fn5t4DkqKqdJRzQbXQ7fAi2lhkZIJGhVs2vIyY1f2hpYoBxDAX1OcYsSE2lqIR2vXNDGZsA==",
"video.png": "gJtmkfr8I1Kw43pYEKjg6CAjgmhl1vIBKBQ3ZkxCu3wvxQm+6kf93iLrrFiY2WuiXzxEn2Leu52GJzmVN5id0g==",

View File

@ -405,7 +405,10 @@ function text_entry(relative_x_pos, relative_y_pos, d) {
.on('mouseout', (event, d) => d3.select('#tooltip').style('opacity', 0))
.text(d => {
let to_print;
if (d.data.name.length > 50) {
if (d.data.idna) {
to_print = d.data.idna;
}
else if (d.data.name.length > 50) {
to_print = `[...] ${d.data.name.substring(d.data.name.length - 50, d.data.name.length)}`;
} else {
to_print = d.data.name

View File

@ -101,8 +101,13 @@
{% block content %}
{# Headers #}
<center>
<h3>{{ hostnode.name }}</h3>
{% if hostnode.idna %}<h4>({{hostnode.idna}})</h4>{% endif %}
{% if hostnode.idna %}
<h3>{{hostnode.idna}}
</br><small class="text-body-secondary">{{hostnode.name}}</small>
</h3>
{% else %}
<h3>{{hostnode.name}}</h3>
{% endif %}
</br>
<button type="button" class="btn btn-primary" onclick="whereAmI('{{ hostnode_uuid }}')">Locate in tree</button>
{% if uwhois_available %}