From bbbda442183e657590876e071fe3d3785fc0cf38 Mon Sep 17 00:00:00 2001 From: hagen Date: Sun, 21 Aug 2016 00:00:00 +0000 Subject: [PATCH] * HTTPServer : show termination time in main page (closes #506) --- HTTPServer.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/HTTPServer.cpp b/HTTPServer.cpp index f10289ef..fdc5b38f 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -174,7 +174,7 @@ namespace http { s << "Uptime: "; ShowUptime(s, i2p::context.GetUptime ()); s << "
\r\n"; - s << "Status: "; + s << "Network status: "; switch (i2p::context.GetStatus ()) { case eRouterStatusOK: s << "OK"; break; @@ -183,6 +183,13 @@ namespace http { default: s << "Unknown"; } s << "
\r\n"; +#if (!defined(WIN32) && !defined(QT_GUI_LIB) && !defined(ANDROID)) + if (auto remains = Daemon.gracefullShutdownInterval) { + s << "Stopping in: "; + s << remains << " seconds"; + s << "
\r\n"; + } +#endif auto family = i2p::context.GetFamily (); if (family.length () > 0) s << "Family: " << family << "
\r\n"; @@ -415,15 +422,9 @@ namespace http { s << " Accept transit tunnels
\r\n"; #if (!defined(WIN32) && !defined(QT_GUI_LIB) && !defined(ANDROID)) if (Daemon.gracefullShutdownInterval) - { - s << " Cancel gracefull shutdown ("; - s << Daemon.gracefullShutdownInterval; - s << " seconds remains)
\r\n"; - } + s << " Cancel gracefull shutdown
"; else - { s << " Start gracefull shutdown
\r\n"; - } #endif #ifdef WIN32_APP s << " Gracefull shutdown
\r\n";