Make others in histogram a collapsible

sql-rework
Tomasz Golinski 2020-01-28 05:59:53 +01:00
rodzic 37efbff68a
commit f56b8a7c33
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -37,7 +37,9 @@ void show_histogram(const Caches& cc, std::string Cache::*ptr, std::string capti
std::cout << "<dd class=\"bar\" style=\"--percent: " << 100 * own.second / max << "%;\"><span class=\"text\">" << own.first << ": " << own.second << "</span></dd>\n";
else if (i == HIST_MAX) {
std::cout << "</dl>\n";
std::cout << "<div class=\"histogram_others\">Other: " << own.first << " (" << own.second << ")";
std::cout << "<div class=\"histogram_others\">";
std::cout << " <input id=\"histo_others\" class=\"toggle\" type=\"checkbox\">\n <label for=\"histo_others\" class=\"lbl-toggle\">See more:</label>\n <div class=\"collapsible-content\">\n <div class=\"content-inner\">\n";
std::cout << own.first << " (" << own.second << ")";
}
if (i > HIST_MAX)
std::cout << ", " << own.first << " (" << own.second << ")";
@ -46,7 +48,7 @@ void show_histogram(const Caches& cc, std::string Cache::*ptr, std::string capti
if (i < HIST_MAX)
std::cout << "</dl>\n";
else
std::cout << "</div>\n";
std::cout << " </div>\n </div>\n</div>\n";
} else {
std::cout << caption << '\n';
for (auto own : pairs)