end
     1351             print("</td></tr>\n")
     1352         end
     1353 
     1354         print("<tr><th>" .. i18n("download") .. "&nbsp;<i class=\"fas fa-download fa-lg\"></i></th><td")
     1355         local show_live_capture = ntop.isPcapDownloadAllowed()
     1356         if (not show_live_capture) then
     1357             print(" colspan=2")
     1358         end
     1359         print("><A HREF='" .. ntop.getHttpPrefix() .. "/lua/rest/v2/get/host/data.lua?ifid=" .. ifId .. "&" ..
     1360                   hostinfo2url(host_info) .. "' download='host-" .. host_ip .. ".json'>JSON</A></td>")
     1361         print [[<td>]]
     1362         if (show_live_capture and ifstats.isView == false and not interface.isSubInterface() and
     1363             interface.isPacketInterface()) then
     1364             local live_traffic_utils = require("live_traffic_utils")
     1365             live_traffic_utils.printLiveTrafficForm(ifId, host_info)
     1366         end
     1367 
     1368         print [[</td>]]
     1369         print("</tr>\n")
     1370 
     1371         if (host["ssdp"] ~= nil) then
     1372             print(
     1373                 "<tr><th><A class='ntopng-external-link' href='https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol'>SSDP (UPnP)<i class=\"fas fa-external-link-alt fa-lg\"></i></A></th><td colspan=2> <A HREF='" ..
     1374                     host["ssdp"] .. "'>" .. host["ssdp"] .. "<A></td></tr>\n")
     1375         end
     1376 
     1377         
     1378 
     1379         print("<tr><th colspan=4></th></tr>\n")
     1380 
     1381         print("</table>\n")
     1382         print [[
     1383         </div>
     1384         </div>
     1385       </div>
     1386     </div>]]
     1387 
     1388     elseif ((page == "packets")) then
     1389         template.render("pages/hosts/packets_stats.template", {
     1390             view = "applications",
     1391             host_ip = host_ip,
     1392             vlan = host_vlan,
     1393             ifid = ifId
     1394         })
     1395     elseif ((page == "peers")) then
     1396         host_info = url2hostinfo(_GET)
     1397         peers = getTopFlowPeers(hostinfo2hostkey(host_info), 1 --[[exists query]] )
     1398         found = 0
     1399 
     1400         for key, value in pairs(peers) do
     1401             found = 1
     1402             break
     1403         end
     1404 
     1405         if (found) then
     1406             print [[
     1407 
     1408    <br />
     1409    <table border=0>
     1410    <tr>
     1411      <td>
     1412        <div id="chart-row-hosts">
     1413          <strong>]]
     1414             print(i18n("peers_page.top_peers_for_host", {
     1415                 hostkey = hostinfo2hostkey(host_info)
     1416             }))
     1417             print [[</strong>
     1418          <div class="clearfix"></div>
     1419        </div>
     1420 
     1421        <div id="chart-ring-protocol">
     1422          <strong>]]
     1423             print(i18n("peers_page.top_peer_protocol"))
     1424             print [[</strong>
     1425          <div class="clearfix"></div>
     1426        </div>
     1427      </td>
     1428    </tr>
     1429    </table>
     1430    <br />
     1431    <table class="table table-hover dc-data-table">
     1432         <thead>
     1433         <tr class="header">
     1434             <th>]]
     1435             print(i18n("peers_page.host"))
     1436             print [[</th>
     1437             <th>]]
     1438             print(i18n("application"))
     1439             print [[</th>
     1440             <th>]]
     1441             print(i18n("peers_page.traffic_volume"))
     1442             print [[</th>
     1443         </tr>
     1444         </thead>
     1445    </table>
     1446 
     1447 <script>
     1448 var protocolChart = dc.pieChart("#chart-ring-protocol");
     1449 va