></i> " ..
     1545                     i18n("peers_page.no_active_flows_message") .. "</div>")
     1546         end
     1547     elseif ((page == "traffic")) then
     1548         -- template render
     1549         template.render("pages/hosts/traffic_stats.template", {})
     1550 
     1551     elseif ((page == "ports")) then
     1552         print('<table class="table table-bordered table-striped">\n')
     1553 
     1554         if (host.used_ports ~= nil) then
     1555             local len
     1556             if (table.len(host.used_ports.local_server_ports) == 0) then
     1557                 len = ""
     1558             else
     1559                 len = "rowspan=2"
     1560             end
     1561 
     1562             print('\n<tr><th class="text-start" ' .. len .. '>' .. i18n("ports_page.active_server_ports") .. '</th>')
     1563             printPorts(host.used_ports.local_server_ports, true)
     1564 
     1565             if (table.len(host.used_ports.remote_contacted_ports) == 0) then
     1566                 len = ""
     1567             else
     1568                 len = "rowspan=2"
     1569             end
     1570             print('\n<tr><th class="text-start" ' .. len .. '>' .. i18n("ports_page.client_contacted_server_ports") ..
     1571                       '</th>')
     1572             printPorts(host.used_ports.remote_contacted_ports, false)
     1573         end
     1574 
     1575         print('<tr><th class="text-start">' .. i18n("ports_page.client_ports") ..
     1576                   '</th><td colspan=5><div class="pie-chart" id="clientPortsDistro"></div></td></tr>')
     1577         print('<tr><th class="text-start">' .. i18n("ports_page.server_ports") ..
     1578                   '</th><td colspan=5><div class="pie-chart" id="serverPortsDistro"></div></td></tr>')
     1579 
     1580         print [[
     1581   </table>
     1582     <script type='text/javascript'>
     1583            window.onload=function() {
     1584                do_pie("#clientPortsDistro", ']]
     1585         print(ntop.getHttpPrefix())
     1586         print [[/lua/iface_ports_list.lua', { clisrv: "client", ifid: "]]
     1587         print(ifId .. "")
     1588         print('", ' .. hostinfo2json(host_info) .. "}, \"\", refresh); \n")
     1589         print [[
     1590                do_pie("#serverPortsDistro", ']]
     1591         print(ntop.getHttpPrefix())
     1592         print [[/lua/iface_ports_list.lua', { clisrv: "server", ifid: "]]
     1593         print(ifId .. "")
     1594         print('", ' .. hostinfo2json(host_info) .. "}, \"\", refresh); \n")
     1595         print [[
     1596             }
     1597         </script><p>
     1598     ]]
     1599         -- template render
     1600         -- template.render("pages/hosts/ports_stats.template", {})
     1601 
     1602     elseif ((page == "listening_ports")) then
     1603         template.render("htmlPages/hostDetails/listening-ports.template", {
     1604             processes_endpoint = "/lua/rest/v2/get/host/processes/listening_ports.lua",
     1605             host = host_ip,
     1606             vlan = host_vlan,
     1607             http_prefix = ntop.getHttpPrefix(),
     1608             csrf = ntop.getRandomCSRFValue()
     1609         })
     1610 
     1611     elseif ((page == "ICMP")) then
     1612 
     1613         print [[
     1614      <table id="myTable" class="table table-bordered table-striped tablesorter">
     1615      <thead><tr><th>]]
     1616         print(i18n("icmp_page.icmp_message"))
     1617         print [[</th><th>]]
     1618         print(i18n("icmp_page.icmp_type"))
     1619         print [[</th><th>]]
     1620         print(i18n("icmp_page.icmp_code"))
     1621         print [[</th><th>]]
     1622         print(i18n("icmp_page.last_sent_peer"))
     1623         print [[</th><th>]]
     1624         print(i18n("icmp_page.last_rcvd_peer"))
     1625