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
|
# File 'components/reporters/plugin_formatters/html/exec.rb', line 19
def tpl
<<-HTML
<ul class="nav nav-tabs">
<% results.keys.each.with_index do |stage, i| %>
<li <%= 'class="active"' if i == 0 %> >
<a href="#!/plugins/exec/<%= stage %>">
<%= stage.capitalize %>
</a>
</li>
<% end %>
</ul>
<div class="tab-content">
<% results.each do |stage, data| %>
<div class="tab-pane <%= 'active' if results.keys.first == stage %>"
id="plugins-exec-<%= stage %>">
<dl class="dl-horizontal">
<dt>Executable</dt>
<dd><code><%= escapeHTML data['executable'] %></code></dd>
<dt>Status</dt>
<dd><%= data['status'] %></dd>
<dt>PID</dt>
<dd><%= data['pid'] %></dd>
<dt>Runtime</dt>
<dd><%= data['runtime'] %></dd>
</dl>
<strong>STDOUT</strong>
<pre><%= escapeHTML data['stdout'].to_s %></pre>
<strong>STDERR</strong>
<pre><%= escapeHTML data['stderr'].to_s %></pre>
</div>
<% end %>
</div>
HTML
end
|