aboutsummaryrefslogtreecommitdiff
path: root/src/listComponents.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/listComponents.js')
-rw-r--r--src/listComponents.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/listComponents.js b/src/listComponents.js
index a09abd9..2d89ac3 100644
--- a/src/listComponents.js
+++ b/src/listComponents.js
@@ -49,6 +49,28 @@ export class Counters extends Component {
49 } 49 }
50} 50}
51 51
52export class GroupsCoverage extends Component {
53 _renderChilds(row) {
54 return row.group
55 ? (<GroupsCoverage groups={row.group} />)
56 : (<PackagesCoverage packages={row.package} />);
57 }
58
59 _renderRow(row) {
60 return (
61 <li key={row.$.name}>
62 <span>{row.$.name}</span>
63 <Counters data={row.counter} inlineList="true" />
64 {this._renderChilds(row)}
65 </li>
66 )
67 }
68
69 render() {
70 return renderRows(row => this._renderRow(row), this.props.groups, false);
71 }
72}
73
52export class PackagesCoverage extends Component { 74export class PackagesCoverage extends Component {
53 _renderRow(row) { 75 _renderRow(row) {
54 return ( 76 return (
@@ -99,6 +121,27 @@ class MethodsCoverage extends Component {
99 } 121 }
100} 122}
101 123
124export class GroupsSourceCoverage extends Component {
125 _renderChilds(row) {
126 return row.group
127 ? (<GroupsSourceCoverage groups={row.group} sourceSet={this.props.sourceSet} />)
128 : (<PackagesSourceCoverage packages={row.package} sourceSet={this.props.sourceSet} />);
129 }
130
131 _renderRow(row) {
132 return (
133 <li key={row.$.name}>
134 <span>{row.$.name}</span>
135 {this._renderChilds(row)}
136 </li>
137 )
138 }
139
140 render() {
141 return renderRows(row => this._renderRow(row), this.props.groups, false);
142 }
143}
144
102export class PackagesSourceCoverage extends Component { 145export class PackagesSourceCoverage extends Component {
103 _renderRow(row) { 146 _renderRow(row) {
104 return ( 147 return (