h = 10,
     2038                 csrf = ntop.getRandomCSRFValue()
     2039             }
     2040         
     2041             local json_context = json.encode(context)
     2042             template.render("pages/vue_page.template", { vue_page_name = "PageAggregatedLiveFlows", page_context = json_context })
     2043          
     2044             
     2045             print [[ 
     2046                          </div>
     2047 
     2048                 </div>]]
     2049         else
     2050             print [[
     2051       <div id="table-flows"></div>
     2052          <script>
     2053    var url_update = "]]
     2054 
     2055             local page_params = {
     2056                 application = _GET["application"],
     2057                 category = _GET["category"],
     2058                 alert_type = _GET["alert_type"],
     2059                 alert_type_severity = _GET["alert_type_severity"],
     2060                 tcp_flow_state = _GET["tcp_flow_state"],
     2061                 flowhosts_type = _GET["flowhosts_type"],
     2062                 traffic_type = _GET["traffic_type"],
     2063                 version = _GET["version"],
     2064                 l4proto = _GET["l4proto"],
     2065                 host = hostinfo2hostkey(host),
     2066                 tskey = _GET["tskey"],
     2067                 host_pool_id = _GET["host_pool_id"],
     2068                 talking_with = _GET["talking_with"]
     2069             }
     2070 
     2071             print(getPageUrl(ntop.getHttpPrefix() .. "/lua/get_flows_data.lua", page_params))
     2072 
     2073             print('";')
     2074 
     2075             if (ifstats.vlan) then
     2076                 show_vlan = true
     2077             else
     2078                 show_vlan = false
     2079             end
     2080             local active_flows_msg = i18n("flows_page.active_flows", {
     2081                 filter = ""
     2082             })
     2083             if not interface.isPacketInterface() then
     2084                 active_flows_msg = i18n("flows_page.recently_active_flows", {
     2085                     filter = ""
     2086                 })
     2087             elseif interface.isPcapDumpInterface() then
     2088                 active_flows_msg = i18n("flows")
     2089             end
     2090 
     2091             local duration_or_last_seen = prefs.flow_table_time
     2092             local begin_epoch_set = (ntop.getPref("ntopng.prefs.first_seen_set") == "1")
     2093 
     2094             local active_flows_msg = getFlowsTableTitle()
     2095 
     2096             print [[
     2097             $("#table-flows").datatable({
     2098             url: url_update,
     2099             buttons: [ ]]
     2100             printActiveFlowsDropdown("host_details.lua?page=flows", page_params, interface.getStats(),
     2101                 interface.getActiveFlowsStats(hostinfo2hostkey(host_info), nil, nil, page_params["talking_with"] or nil))
     2102             print [[ ],
     2103             tableCallback: function()  {
     2104                ]]
     2105             initFlowsRefreshRows()
     2106             print [[
     2107             },
     2108             showPagination: true,
     2109                   ]]
     2110 
     2111             print('title: "' .. active_flows_msg .. '",')
     2112 
     2113             -- Set the preference table
     2114             preference = tablePreferences("rows_number", _GET["perPage"])
     2115             if (preference ~= "") then
     2116                 print('perPage: ' .. preference .. ",\n")
     2117             end
     2118 
     2119             print('sort: [ ["' .. getDefaultTableSort("flows") .. '","' .. getDefaultTableSortOrder("flows") ..
     2120                       '"] ],\n')
     2121 
     2122             print [[
     2123       columns: [
     2124          {
     2125             t