From d1ab16f70a161797aa00d21fae5b26852d28df0f Mon Sep 17 00:00:00 2001 From: dr|z3d Date: Sat, 21 Aug 2021 03:19:55 +0000 Subject: [PATCH] Console: move uptime to commands page; autofresh for dests/control/tunnel summary --- daemon/HTTPServer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index a70bb1e9..479810ee 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -582,9 +582,6 @@ namespace http { void ShowStatus (std::stringstream& s, bool includeHiddenContent, i2p::http::OutputFormatEnum outputFormat) { - s << "" << tr("Uptime") << ""; - ShowUptime(s, i2p::context.GetUptime ()); - s << "\r\n"; if (i2p::context.SupportsV4 ()) { s << "" << tr("Network Status") << ""; @@ -1221,6 +1218,9 @@ namespace http { } s << "\r\n\r\n"; } + s << "" << tr("Uptime") << ""; + ShowUptime(s, i2p::context.GetUptime ()); + s << "\r\n"; s << "" << tr("Data path") << "" << i2p::fs::GetUTF8DataDir() << "\r\n"; s << "\r\n\r\n\r\n\r\n"; @@ -1807,6 +1807,10 @@ namespace http { } // HTML head start ShowPageHead (s); + if (req.uri.find("summary") != std::string::npos || + req.uri.find("commands") != std::string::npos || + (req.uri.find("local_destinations") != std::string::npos && req.uri.find("b32") == std::string::npos)) + res.add_header("Refresh", "10"); if (req.uri.find("page=") != std::string::npos) { HandlePage (req, res, s); } else if (req.uri.find("cmd=") != std::string::npos) {