From 60d89e775d17388d103c908238c5820c69f9e378 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 25 Jan 2021 01:29:50 +0100 Subject: [PATCH] Mark unreachable instances as unreachable in HTML output. --- src/generators/html.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/generators/html.cpp b/src/generators/html.cpp index 4bbfd80..1938258 100644 --- a/src/generators/html.cpp +++ b/src/generators/html.cpp @@ -87,10 +87,24 @@ void write_html(ostream &out, const vector &entries) { out << "\n"; out << "
\n"; - out << " " << entry.report_time.substr(0, 10) << ": " - << entry.instance << "\n"; - out << R"( "; + if (entry.unreachable) + { + out << ""; + } + out << entry.report_time.substr(0, 10) << ": " << entry.instance; + if (entry.unreachable) + { + out << ""; + } + out << "\n" + << R"( Hyperlink to this entry)" << '\n'; + if (entry.unreachable) + { + out << "

This instance is currently " + "unreachable.

\n"; + } out << "

" << cgi::text2html(entry.description) << "

\n"; out << "

Tags: "; for (const auto &tag : entry.tags)