Skip to content

Commit

Permalink
Merge pull request #19 from mixalturek/master
Browse files Browse the repository at this point in the history
[JENKINS-23891] Redesign of configuration page
  • Loading branch information
mixalturek committed Jul 23, 2014
2 parents b70bb5a + 90e1a1f commit a490025
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 151 deletions.
Expand Up @@ -5,8 +5,7 @@
<j:set var="config" value="${descriptor.config}"/>
</j:if>

<f:entry title="${%Cppcheck report XMLs}"
description="${%description.pattern('http://ant.apache.org/manual/Types/fileset.html')}">
<f:entry title="${%Cppcheck report XMLs}" field="pattern">
<f:textbox name="cppcheck.pattern" value="${config.pattern}"/>
</f:entry>

Expand Down

This file was deleted.

@@ -0,0 +1,12 @@
<p style="margin-top: 0px;">Cppcheck must be executed to generate XML reports for this plugin to function.
<a href="http://ant.apache.org/manual/Types/fileset.html">Fileset
'includes'</a> setting specifies the generated Cppcheck XML report files,
such as '**/cppcheck-result-*.xml'. Base directory of the fileset is relative
to the workspace root directory.</p>

<p>If no value is set, then the default '**/cppcheck-result.xml' will be used.
Be sure to never include any non-report files into this pattern.</p>

<p>The plugin is able to work with both XML formats produced by Cppcheck,
but always prefer to use the newer version 2. Cppcheck doesn't report some
issues with the legacy format.</p>
@@ -0,0 +1,2 @@
Determines which severity of issues should be considered when evaluating the
build status and health.
@@ -0,0 +1,4 @@
Configure the build status and health. A build is considered as unstable or
failure if the new or total number of issues exceeds the specified thresholds.
The build health is also determined by thresholds. If the actual number of
issues is between the provided thresholds, then the build health is interpolated.
221 changes: 111 additions & 110 deletions src/main/resources/util/thresholds.jelly
Expand Up @@ -12,29 +12,31 @@
</j:if>


<f:entry title="${%Build status}" description="${%description.status}">
<f:entry title="${%Build status thresholds}" field="thresholds">
<table>
<thead>
<tr>
<td></td>
<td width="80">
<img src="${rootURL}/images/16x16/health-80plus.gif" alt="100%"
<img src="${rootURL}/images/16x16/health-80plus.gif" alt="${%Health 100%}"
title="${%description.healthy}"/>
</td>
<td width="80">
<img src="${rootURL}/images/16x16/health-00to19.gif" alt="0%"
<img src="${rootURL}/images/16x16/health-00to19.gif" alt="${%Health 0%}"
title="${%description.unhealthy}"/>
</td>
<td width="80">
<img src="${rootURL}/images/16x16/yellow.gif" alt="100%" title="${%description.threshold}"/>
<img src="${rootURL}/images/16x16/yellow.gif" alt="100%"
title="${%description.threshold}"/>
${%Total}
</td>
<td width="80">
<img src="${rootURL}/images/16x16/yellow.gif" alt="100%" title="${%description.newThreshold}"/>
<img src="${rootURL}/images/16x16/yellow.gif" alt="100%"
title="${%description.newThreshold}"/>
${%New}
</td>
<td width="80">
<img src="${rootURL}/images/16x16/red.gif" alt="100%" title="${%description.failureThreshold}"/>
<img src="${rootURL}/images/16x16/red.gif" alt="100%"
title="${%description.failureThreshold}"/>
${%Total}
</td>
<td width="80">
Expand All @@ -46,7 +48,6 @@
</thead>
<tbody>
<tr>
<td style="vertical-align:middle">${%Thresholds:}</td>
<td>
<f:textbox name="cppcheck.config.configSeverityEvaluation.healthy"
value="${config.configSeverityEvaluation.healthy}"/>
Expand Down Expand Up @@ -77,22 +78,25 @@
</f:entry>


<f:entry title="${%severity.evaluation}" description="${%description.limit}">
<f:entry title="${%severity.evaluation}" field="severity">

<f:checkbox name="${id}.config.configSeverityEvaluation.severityError"
checked="${config.configSeverityEvaluation.severityError}" id="thresholdLimit.severityError"/>
checked="${config.configSeverityEvaluation.severityError}"
id="thresholdLimit.severityError"/>
<st:nbsp/>
<label for="thresholdLimit.severityError">${%Error}</label>
<st:nbsp/>

<f:checkbox name="${id}.config.configSeverityEvaluation.severityWarning"
checked="${config.configSeverityEvaluation.severityWarning}" id="thresholdLimit.severityWarning"/>
checked="${config.configSeverityEvaluation.severityWarning}"
id="thresholdLimit.severityWarning"/>
<st:nbsp/>
<label for="thresholdLimit.severityWarning">${%Warning}</label>
<st:nbsp/>

<f:checkbox name="${id}.config.configSeverityEvaluation.severityStyle"
checked="${config.configSeverityEvaluation.severityStyle}" id="thresholdLimit.severityStyle"/>
checked="${config.configSeverityEvaluation.severityStyle}"
id="thresholdLimit.severityStyle"/>
<st:nbsp/>
<label for="thresholdLimit.severityStyle">${%Style}</label>
<st:nbsp/>
Expand Down Expand Up @@ -127,104 +131,101 @@

</f:entry>

<f:entry title="${%graph.configuration}">

<f:advanced>

<f:entry title="${%graph.configuration}" description="${%graph.description}">

<table>
<tr>
<td>
<label for="configGraph.xSize">${%Chart Width}</label>
<f:textbox name="${id}.config.configGraph.xSize" value="${config.configGraph.xSize}"
id="configGraph.xSize"/>
</td>
<td>
<label for="configGraph.xSize">${%Chart Height}</label>
<f:textbox name="${id}.config.configGraph.ySize" value="${config.configGraph.ySize}"
id="configGraph.ySize"/>
</td>
<td colspan="2">
<st:nbsp/>
</td>
</tr>
<tr>
<td>
<f:checkbox name="${id}.config.configGraph.displayAllErrors"
checked="${config.configGraph.displayAllErrors}" id="configGraph.displayAllErrors"/>
<st:nbsp/>
<label for="configGraph.displayAllErrors">${%Display all errors}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayErrorSeverity"
checked="${config.configGraph.displayErrorSeverity}"
id="configGraph.displayErrorSeverity"/>
<st:nbsp/>
<label for="configGraph.displayErrorSeverity">${%Display errors}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayWarningSeverity"
checked="${config.configGraph.displayWarningSeverity}"
id="configGrah.displayWarningSeverity"/>
<st:nbsp/>
<label for="configGraph.displayWarningSeverity">${%Display warnings}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayStyleSeverity"
checked="${config.configGraph.displayStyleSeverity}"
id="configGraph.displayStyleSeverity"/>
<st:nbsp/>
<label for="configGraph.displayStyleSeverity">${%Display style}</label>
<st:nbsp/>
</td>
</tr>
<tr>
<td>
<f:checkbox name="${id}.config.configGraph.displayPerformanceSeverity"
checked="${config.configGraph.displayPerformanceSeverity}"
id="configGraph.displayPerformanceSeverity"/>
<st:nbsp/>
<label for="configGraph.displayPerformanceSeverity">${%Display performance}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayPortabilitySeverity"
checked="${config.configGraph.displayPortabilitySeverity}"
id="configGraph.displayPortabilitySeverity"/>
<st:nbsp/>
<label for="configGraph.displayPortabilitySeverity">${%Display portability}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayInformationSeverity"
checked="${config.configGraph.displayInformationSeverity}"
id="configGraph.displayInformationSeverity"/>
<st:nbsp/>
<label for="configGraph.displayInformationSeverity">${%Display information}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayNoCategorySeverity"
checked="${config.configGraph.displayNoCategorySeverity}"
id="configGraph.displayNoCategorySeverity"/>
<st:nbsp/>
<label for="configGraph.displayNoCategorySeverity">${%Display no category}</label>
<st:nbsp/>
</td>
</tr>
</table>

</f:entry>

</f:advanced>
<table>
<tr>
<td>
<label for="configGraph.xSize">${%Chart Width}</label>
<f:textbox name="${id}.config.configGraph.xSize"
value="${config.configGraph.xSize}"
id="configGraph.xSize"/>
</td>
<td>
<label for="configGraph.xSize">${%Chart Height}</label>
<f:textbox name="${id}.config.configGraph.ySize"
value="${config.configGraph.ySize}"
id="configGraph.ySize"/>
</td>
<td colspan="2">
<st:nbsp/>
</td>
</tr>
<tr>
<td>
<f:checkbox name="${id}.config.configGraph.displayAllErrors"
checked="${config.configGraph.displayAllErrors}"
id="configGraph.displayAllErrors"/>
<st:nbsp/>
<label for="configGraph.displayAllErrors">${%Display sum of all issues}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayErrorSeverity"
checked="${config.configGraph.displayErrorSeverity}"
id="configGraph.displayErrorSeverity"/>
<st:nbsp/>
<label for="configGraph.displayErrorSeverity">${%Display errors}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayWarningSeverity"
checked="${config.configGraph.displayWarningSeverity}"
id="configGrah.displayWarningSeverity"/>
<st:nbsp/>
<label for="configGraph.displayWarningSeverity">${%Display warnings}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayStyleSeverity"
checked="${config.configGraph.displayStyleSeverity}"
id="configGraph.displayStyleSeverity"/>
<st:nbsp/>
<label for="configGraph.displayStyleSeverity">${%Display style}</label>
<st:nbsp/>
</td>
</tr>
<tr>
<td>
<f:checkbox name="${id}.config.configGraph.displayPerformanceSeverity"
checked="${config.configGraph.displayPerformanceSeverity}"
id="configGraph.displayPerformanceSeverity"/>
<st:nbsp/>
<label for="configGraph.displayPerformanceSeverity">${%Display performance}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayPortabilitySeverity"
checked="${config.configGraph.displayPortabilitySeverity}"
id="configGraph.displayPortabilitySeverity"/>
<st:nbsp/>
<label for="configGraph.displayPortabilitySeverity">${%Display portability}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayInformationSeverity"
checked="${config.configGraph.displayInformationSeverity}"
id="configGraph.displayInformationSeverity"/>
<st:nbsp/>
<label for="configGraph.displayInformationSeverity">${%Display information}</label>
<st:nbsp/>
</td>

<td>
<f:checkbox name="${id}.config.configGraph.displayNoCategorySeverity"
checked="${config.configGraph.displayNoCategorySeverity}"
id="configGraph.displayNoCategorySeverity"/>
<st:nbsp/>
<label for="configGraph.displayNoCategorySeverity">${%Display no category}</label>
<st:nbsp/>
</td>
</tr>
</table>

</f:entry>
</j:jelly>
46 changes: 14 additions & 32 deletions src/main/resources/util/thresholds.properties
@@ -1,36 +1,18 @@
description.threshold=If the total number of errors exceeds this threshold then a build is \
considered as unstable. Leave this field empty if the unstable state of the build \
should not depend on the total number of errors.
description.newThreshold=If the number of new errors exceeds this threshold then a build is \
considered as unstable. Leave this field empty if the unstable state of the build \
should not depend on the number of new errors.
description.failureThreshold=If the total number of errors exceeds this threshold then a build is \
considered as failed. Leave this field empty if the failed state of the build \
should not depend on the total number of errors.
description.newFailureThreshold=If the number of new errors exceeds this threshold then a build is \
considered as failed. Leave this field empty if the failed state of the build \
should not depend on the number of new errors.
description.healthy=Report health as 100% when the number of errors is less than this value.
description.unhealthy=Report health as 0% when the number of errors is greater than this value.

description.status=Configure the build status and health. A build is considered as unstable or failure \
if the new or total number of errors exceeds the specified thresholds. \
The build health is also determined by thresholds. If the actual number of errors is between \
the provided thresholds, then the build health is interpolated.



description.limit=Determines which severity of errors should be considered when evaluating the build status and health.

description.threshold=If the total number of issues exceeds this threshold then a build is \
considered as unstable. Leave this field empty if the unstable state of the build \
should not depend on the total number of issues.
description.newThreshold=If the number of new issues exceeds this threshold then a build is \
considered as unstable. Leave this field empty if the unstable state of the build \
should not depend on the number of new issues.
description.failureThreshold=If the total number of issues exceeds this threshold then a build is \
considered as failed. Leave this field empty if the failed state of the build \
should not depend on the total number of issues.
description.newFailureThreshold=If the number of new issues exceeds this threshold then a build is \
considered as failed. Leave this field empty if the failed state of the build \
should not depend on the number of new issues.
description.healthy=Report health as 100% when the number of issues is less than this value.
description.unhealthy=Report health as 0% when the number of issues is greater than this value.

severity.evaluation=Severity evaluation

graph.configuration=Graph configuration
graph.description=Check severity category to display in the graph







0 comments on commit a490025

Please sign in to comment.