formatValue(http["receiver"]["response"]["num_2xx"]) ..
     1897                           "</span> <span id=trend_http_response_num_2xx></span></td></tr>")
     1898                 print("<tr><th>" .. i18n("http_page.response_code_3xx") ..
     1899                           "</th><td style=\"text-align: right;\"><span id=http_response_num_3xx>" ..
     1900                           formatValue(http["receiver"]["response"]["num_3xx"]) ..
     1901                           "</span> <span id=trend_http_response_num_3xx></span></td></tr>")
     1902                 print("<tr><th>" .. i18n("http_page.response_code_4xx") ..
     1903                           "</th><td style=\"text-align: right;\"><span id=http_response_num_4xx>" ..
     1904                           formatValue(http["receiver"]["response"]["num_4xx"]) ..
     1905                           "</span> <span id=trend_http_response_num_4xx></span></td></tr>")
     1906                 print("<tr><th>" .. i18n("http_page.response_code_5xx") ..
     1907                           "</th><td style=\"text-align: right;\"><span id=http_response_num_5xx>" ..
     1908                           formatValue(http["receiver"]["response"]["num_5xx"]) ..
     1909                           "</span> <span id=trend_http_response_num_5xx></span></td></tr>")
     1910             end
     1911 
     1912             local vh = http["virtual_hosts"]
     1913             if vh then
     1914                 local now = os.time()
     1915                 local ago1h = now - 3600
     1916                 local num = table.len(vh)
     1917                 if (num > 0) then
     1918                     local ifId = getInterfaceId(ifname)
     1919                     print("<tr><th rowspan=" .. (num + 1) .. " width=20%>" .. i18n("http_page.virtual_hosts") ..
     1920                               "</th><th>Name</th><th>" .. i18n("http_page.traffic_sent") .. "</th><th>" ..
     1921                               i18n("http_page.traffic_received") .. "</th><th>" .. i18n("http_page.requests_served") ..
     1922                               "</th></tr>\n")
     1923                     for k, v in pairsByKeys(vh, asc) do
     1924                         local j = string.gsub(k, "%.", "___")
     1925                         print("<tr><td>" .. format_external_link(k, k, false, "https") .. "")
     1926                         historicalProtoHostHref(ifId, host, nil, nil, k, host_vlan)
     1927                         print("</td>")
     1928                         print("<td align=right><span id=" .. j .. "_bytes_vhost_sent>" ..
     1929                                   bytesToSize(vh[k]["bytes.sent"]) .. "</span></td>")
     1930                         print("<td align=right><span id=" .. j .. "_bytes_vhost_rcvd>" ..
     1931                                   bytesToSize(vh[k]["bytes.rcvd"]) .. "</span></td>")
     1932                         print("<td align=right><span id=" .. j .. "_num_vhost_req_serv>" ..
     1933                                   formatValue(vh[k]["http.requests"]) .. "</span></td></tr>\n")
     1934                     end
     1935                 end
     1936             end
     1937 
     1938             print("</table>\n")
     1939         end
     1940 
     1941     elseif (page == "sites") then
     1942         if not prefs.are_top_talkers_enabled then
     1943             local msg = i18n("sites_page.top_sites_not_enabled_message", {
     1944                 url = ntop.getHttpPrefix() .. "/lua/admin/prefs.lua?tab=protocols"
     1945             })
     1946             print("<div class='alert alert-info'><i class='fas fa-info-circle fa-lg' aria-hidden='true'></i> " .. msg ..
     1947                       "</div>")
     1948 
     1949         elseif table.len(sites_granularities) > 0 then
     1950             local endpoint = string.format(ntop.getHttpPrefix() ..
     1951