Mark unreachable instances as unreachable in HTML output.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2021-01-25 01:29:50 +01:00
parent 7dd89a3d9b
commit 60d89e775d
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 17 additions and 3 deletions

View File

@ -87,10 +87,24 @@ void write_html(ostream &out, const vector<entry_type> &entries)
{
out << "\n";
out << " <details id=\"" << entry.instance << "\">\n";
out << " <summary>" << entry.report_time.substr(0, 10) << ": "
<< entry.instance << "</summary>\n";
out << R"( <a href="#)" << entry.instance
out << " <summary>";
if (entry.unreachable)
{
out << "<del>";
}
out << entry.report_time.substr(0, 10) << ": " << entry.instance;
if (entry.unreachable)
{
out << "</del>";
}
out << "</summary>\n"
<< R"( <a href="#)" << entry.instance
<< R"(" class="small">Hyperlink to this entry</a>)" << '\n';
if (entry.unreachable)
{
out << " <p><em>This instance is currently "
"unreachable.</em></p>\n";
}
out << " <p>" << cgi::text2html(entry.description) << "</p>\n";
out << " <p><strong>Tags:</strong> ";
for (const auto &tag : entry.tags)