-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.ejs
62 lines (56 loc) · 1.85 KB
/
ui.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<h1 id='overview'><%= name %></h1>
<div id='menu'>
<li><a href='#overview'>overview</a></li>
<% mods.forEach(function(mod){ %>
<li>
<span class='cov <%= mod.level %>'><%= mod.percent %></span>
<a href='#<%= mod.key %>'>
<span class='basename'><%= mod.key.split('/').pop() %></span>
</a>
</li>
<% }) %>
</div>
<div id='stats' class='<%= level %>'>
<div class='percentage'><%= percent + '%' %></div>
<div class='sloc'><%= sloc %></div>
<div class='hits'><%= hits %></div>
<div class='misses'><%= misses %></div>
</div>
<div id='files'>
<% mods.forEach(function(mod){ %>
<div class='file'>
<h2 id='<%= mod.key %>'><%= mod.key.split('/').pop() %></h2>
<div id='stats' class='<%= mod.level %>'>
<div class='percentage'><%= mod.percent + '%' %></div>
<div class='sloc'><%= mod.sloc %></div>
<div class='hits'><%= mod.hits %></div>
<div class='misses'><%= mod.misses %></div>
</div>
<table class='source'>
<tbody>
<% mod.lines.forEach(function(obj){ %>
<% if (obj.hits) { %>
<tr class='hit'>
<td class='line'><%= obj.n + 1 %></td>
<td class='hits'><%= obj.hits %></td>
<td class='source'><%= obj.src %></td>
</tr>
<% } else if (0 == obj.hits) { %>
<tr class='miss'>
<td class='line'><%= obj.n + 1 %></td>
<td class='hits'>0</td>
<td class='source'><%= obj.src %></td>
</tr>
<% } else { %>
<tr>
<td class='line'><%= obj.n + 1 %></td>
<td class='hits'></td>
<td class='source'><%= obj.src %></td>
</tr>
<% } %>
<% }) %>
</tbody>
</table>
</div>
<% }) %>
</div>