@@ -885,7 +885,37 @@ function getCellValue(row, index){{
885
885
return code;
886
886
}
887
887
888
- private string HackGroupingToAllowAll(int groupingLevel)
888
+ private string ObserveAndHideNamespaceWhenGroupingByNamespace()
889
+ {
890
+ var code = $@"
891
+ var targetNode = document;
892
+
893
+ var config = {{ attributes: false, childList: true, subtree: true }};
894
+
895
+ var callback = function(mutationsList, observer) {{
896
+ var groupingInput = document.querySelector(""coverage-info .customizebox input"");
897
+ if(!groupingInput || groupingInput.value == 0){{
898
+ return;
899
+ }}
900
+
901
+ var rows = document.querySelectorAll(""coverage-info table tbody tr[class-row]"");
902
+ for(var i=0;i<rows.length;i++){{
903
+ var row = rows[i];
904
+ var cell = row.cells[0];
905
+ var a = cell.querySelector(""a"");
906
+ var fullyQualified = a.innerText;
907
+ var name = fullyQualified.substring(fullyQualified.lastIndexOf(""."") + 1);
908
+ a.innerText = name;
909
+ }};
910
+ }};
911
+
912
+ var observer = new MutationObserver(callback);
913
+ observer.observe(targetNode, config);
914
+ ";
915
+ return code;
916
+ }
917
+
918
+ private string HackGroupingToAllowAll(int groupingLevel)
889
919
{
890
920
return $@"
891
921
var customizeBox = document.getElementsByClassName('customizebox')[0];
@@ -1126,6 +1156,7 @@ public string ProcessUnifiedHtml(string htmlForProcessing, string reportOutputFo
1126
1156
{GetStickyTableHead()}
1127
1157
{HackGroupingToAllowAll(groupingLevel)}
1128
1158
{ObserveAndHideFullyCovered()}
1159
+ {ObserveAndHideNamespaceWhenGroupingByNamespace()}
1129
1160
function getRuleBySelector(cssRules,selector){{
1130
1161
for(var i=0;i<cssRules.length;i++){{
1131
1162
if(cssRules[i].selectorText == selector){{
0 commit comments