ost_label
      292 
      293 if (host == nil) and (not only_historical) then
      294     -- We need to check if this is an aggregated host
      295     sendHTTPContentTypeHeader('text/html')
      296 
      297     page_utils.print_header_and_set_active_menu_entry(page_utils.menu_entries.hosts)
      298     if restoreInProgress then
      299         dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
      300         print('<div class=\"alert alert-info\"> ' .. i18n("host_details.host_restore_in_progress", {
      301             host = hostinfo2hostkey(host_info)
      302         }) .. " ")
      303         print('<i class="fas fa-spinner fa-spin"></i>')
      304         print("</div>")
      305         print [[<script type='text/javascript'>
      306    let recheckInterval = null;
      307 
      308    function recheckHostRestore() {
      309       $.ajax({
      310         type: 'GET',
      311         url: ']]
      312         print(ntop.getHttpPrefix())
      313         print [[/lua/host_stats.lua',
      314         data: { ifid: "]]
      315         print(ifId .. "")
      316         print('", ' .. hostinfo2json(host_info))
      317         print [[ },
      318         success: function(content) {
      319          if(content && content != '"{}"') {
      320             /* Host found, reload the page */
      321             clearInterval(recheckInterval);
      322             recheckInterval = null;
      323             location.reload();
      324          }
      325         }
      326       });
      327    }
      328 
      329    recheckInterval = setInterval(recheckHostRestore, 2000);
      330    recheckHostRestore();
      331 </script>]]
      332         dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
      333     else
      334         dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
      335         if (not (restoreFailed) and (host_info ~= nil) and canRestoreHost(ifId, host_info["host"], host_vlan)) then
      336             printRestoreHostBanner()
      337         else
      338             print('<div class=\"alert alert-danger\"><i class="fas fa-exclamation-triangle"></i> ')
      339             print(i18n("host_details.host_cannot_be_found_message", {
      340                 host = hostinfo2hostkey(host_info)
      341             }) .. " ")
      342             print(purgedErrorString())
      343             print("</div>")
      344         end
      345 
      346         dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
      347         return
      348     end
      349 else
      350     sendHTTPContentTypeHeader('text/html')
      351 
      352     page_utils.print_header_and_set_active_menu_entry(page_utils.menu_entries.hosts, nil, i18n("host", {
      353         host = host_info["host"]
      354     }))
      355 
      356     dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua")
      357 
      358     --   Added global javascript variable, in order to disable the refresh of pie chart in case
      359     --  of historical interface
      360     print('\n<script>var refresh = 3000 /* ms */;</script>\n')
      361 
      362     if _POST["action"] == "reset_stats" and isAdministrator() then
      363         if _POST["resetstats_mode"] == "reset_blacklisted" then
      364             interface.resetHostStats(hostkey, true)
      365         elseif interface.resetHostStats(hostkey) then
      366             print("<div class=\"alert alert alert-success\">")
      367             print(i18n("host_details.reset_stats_in_progress"))
      368             print [[<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>]]
      369             print("</div>")
      370         end
      371     end
      372 
      373     if host == nil then
      374         -- only_historical = true here
      375         host = hostkey2hostinfo(host_info["host"] .. "@" .. host_vlan)
      376     end