MCPcopy Create free account
hub / github.com/bytedance/bolt / printTableCss

Function printTableCss

bolt/functions/CoverageUtil.cpp:175–195  ·  view source on GitHub ↗

Prints out CSS rules to - add lightblue background to table header; - add lightblue background to an empty column that separates scalar, aggregate, and window functions; - highlight cells identified by TableCellTracker.

Source from the content-addressed store, hash-verified

173/// aggregate, and window functions;
174/// - highlight cells identified by TableCellTracker.
175void printTableCss(
176 size_t numScalarColumns,
177 const TableCellTracker& cellTracker,
178 std::ostream& out) {
179 out << " div.body {max-width: 1300px;}" << std::endl;
180 out << " table.coverage th {background-color: lightblue; text-align: center;}"
181 << std::endl;
182 out << " table.coverage "
183 << "td:nth-child(" << numScalarColumns + 1 << ") "
184 << "{background-color: lightblue;}" << std::endl;
185 out << " table.coverage "
186 << "td:nth-child(" << numScalarColumns + 3 << ") "
187 << "{background-color: lightblue;}" << std::endl;
188
189 for (const auto& entry : cellTracker.cells()) {
190 out << " table.coverage "
191 << "tr:nth-child(" << entry.first + 1 << ") "
192 << "td:nth-child(" << entry.second + 1 << ") "
193 << "{background-color: #6BA81E;}" << std::endl;
194 }
195}
196
197void printCoverageMap(
198 const std::vector<std::string>& scalarNames,

Callers 1

printCoverageMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected