templates: Hopefully escape all template inputs
This commit is contained in:
@@ -21,22 +21,22 @@
|
||||
<tt [% IF m.value.disabled %]style="text-decoration: line-through;"[% END %]>[% INCLUDE renderMachineName machine=m.key %]</tt>
|
||||
[% IF m.value.primarySystemType %]
|
||||
<span class="muted" style="font-weight: normal;">
|
||||
(<tt>[% m.value.primarySystemType %]</tt>)
|
||||
(<tt>[% m.value.primarySystemType | html %]</tt>)
|
||||
</span>
|
||||
|
||||
[% WRAPPER makePopover title="Details" classes="btn-secondary btn-sm" %]
|
||||
<ul class="list-unstyled mb-0">
|
||||
<li><b>System types: </b>[% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% system %]</tt>[% END %]</li>
|
||||
<li><b>Supported Features: </b>[% comma=0; FOREACH feat IN m.value.supportedFeatures %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% feat %]</tt>[% END %]</li>
|
||||
<li><b>Mandatory Features: </b>[% comma=0; FOREACH feat IN m.value.mandatoryFeatures %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% feat %]</tt>[% END %]</li>
|
||||
<li><b>System types: </b>[% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% system | html%]</tt>[% END %]</li>
|
||||
<li><b>Supported Features: </b>[% comma=0; FOREACH feat IN m.value.supportedFeatures %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% feat| html %]</tt>[% END %]</li>
|
||||
<li><b>Mandatory Features: </b>[% comma=0; FOREACH feat IN m.value.mandatoryFeatures %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% feat| html %]</tt>[% END %]</li>
|
||||
<li><b>Capacity: </b>[% INCLUDE renderYesNo value=m.value.hasCapacity %] <b>Static: </b>[% INCLUDE renderYesNo value=m.value.hasStaticCapacity %] <b>Dynamic: </b>[% INCLUDE renderYesNo value=m.value.hasDynamicCapacity %]</li>
|
||||
<li><b>Scheduling Score: </b>[% m.value.score %]</li>
|
||||
<li><b>Load: </b><tt>[% pretty_load(m.value.stats.load1) %]</tt> <tt>[% pretty_load(m.value.stats.load5) %]</tt> <tt>[% pretty_load(m.value.stats.load15) %]</tt></li>
|
||||
<li><b>Memory: </b><tt>[% human_bytes(m.value.stats.memUsage) %]</tt> of <tt>[% human_bytes(m.value.memTotal) %]</tt> used (<tt>[% human_bytes(m.value.memTotal - m.value.stats.memUsage) %]</tt> free)</li>
|
||||
<li><b>Scheduling Score: </b>[% HTML.escape(m.value.score) %]</li>
|
||||
<li><b>Load: </b><tt>[% pretty_load(m.value.stats.load1) | html %]</tt> <tt>[% pretty_load(m.value.stats.load5) | html %]</tt> <tt>[% pretty_load(m.value.stats.load15) | html %]</tt></li>
|
||||
<li><b>Memory: </b><tt>[% human_bytes(m.value.stats.memUsage) | html %]</tt> of <tt>[% human_bytes(m.value.memTotal) | html %]</tt> used (<tt>[% human_bytes(m.value.memTotal - m.value.stats.memUsage) | html %]</tt> free)</li>
|
||||
[% pressure = m.value.stats.pressure %]
|
||||
[% MACRO render_pressure(title, pressure) BLOCK %]
|
||||
[% IF pressure %]
|
||||
<tr><td><b>[% title %]:</b></td><td><tt>[% pretty_percent(pressure.avg10) %]%</tt></td><td><td><tt>[% pretty_percent(pressure.avg60) %]%</tt></td><td><td><tt>[% pretty_percent(pressure.avg300) %]%</tt></td><td>
|
||||
<tr><td><b>[% HTML.escape(title) %]:</b></td><td><tt>[% pretty_percent(pressure.avg10) | html %]%</tt></td><td><td><tt>[% pretty_percent(pressure.avg60) | html %]%</tt></td><td><td><tt>[% pretty_percent(pressure.avg300) | html %]%</tt></td><td>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF pressure %]
|
||||
@@ -56,7 +56,7 @@
|
||||
[% ELSE %]
|
||||
[% IF m.value.systemTypes %]
|
||||
<span class="muted" style="font-weight: normal;">
|
||||
([% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% system %]</tt>[% END %])
|
||||
([% comma=0; FOREACH system IN m.value.systemTypes %][% IF comma; %], [% ELSE; comma = 1; END %]<tt>[% system | html %]</tt>[% END %])
|
||||
</span>
|
||||
[% END %]
|
||||
[% END %]
|
||||
@@ -76,9 +76,9 @@
|
||||
[% idle = 0 %]
|
||||
<tr>
|
||||
<td><tt>[% INCLUDE renderFullJobName project=step.project jobset=step.jobset job=step.job %]</tt></td>
|
||||
<td><a [% HTML.attributes(href => c.uri_for('/build' step.build)) %]>[% step.build %]</a></td>
|
||||
<td>[% IF step.busy >= 30 %]<a class="row-link" [% HTML.attributes(href => c.uri_for('/build' step.build 'nixlog' step.stepnr 'tail')) %]>[% step.stepnr %]</a>[% ELSE; step.stepnr; END %]</td>
|
||||
<td><tt>[% step.drvpath.match('-(.*)').0 %]</tt></td>
|
||||
<td><a [% HTML.attributes(href => c.uri_for('/build' step.build)) %]>[% HTML.escape(step.build) %]</a></td>
|
||||
<td>[% IF step.busy >= 30 %]<a class="row-link" [% HTML.attributes(href => c.uri_for('/build' step.build 'nixlog' step.stepnr 'tail')) %]>[% HTML.escape(step.stepnr) %]</a>[% ELSE; HTML.escape(step.stepnr); END %]</td>
|
||||
<td><tt>[% step.drvpath.match('-(.*)').0 | html %]</tt></td>
|
||||
<td>[% INCLUDE renderBusyStatus %]</td>
|
||||
<td style="width: 10em">[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user