Skip to content

Commit

Permalink
Merge pull request #46 from jenkinsci/JENKINS-50924-fix-chart-style-enum
Browse files Browse the repository at this point in the history
[JENKINS-50924] Fix chart style value comparison
  • Loading branch information
vgaidarji committed May 5, 2018
2 parents 658edf1 + 139feff commit 0c0c60d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/java/hudson/plugins/plot/Plot.java
Expand Up @@ -299,9 +299,9 @@ private enum ChartStyle {
LINE("line"),
LINE_3D("line3d"),
LINE_SIMPLE("lineSimple"),
STACKED_AREA("stackedarea"),
STACKED_BAR("stackedbar"),
STACKED_BAR_3D("stackedbar3d"),
STACKED_AREA("stackedArea"),
STACKED_BAR("stackedBar"),
STACKED_BAR_3D("stackedBar3d"),
WATERFALL("waterfall");

private final String name;
Expand All @@ -312,7 +312,7 @@ private enum ChartStyle {

static ChartStyle forName(String name) {
for (ChartStyle chartStyle : ChartStyle.values()) {
if (name.equals(chartStyle.name)) {
if (name.equalsIgnoreCase(chartStyle.name)) {
return chartStyle;
}
}
Expand Down
Expand Up @@ -39,8 +39,8 @@
<f:option value="lineSimple" selected="${plot.style=='lineSimple'}">${%Line simple}</f:option>
<f:option value="line3d" selected="${plot.style=='line3d'}">${%Line 3D}</f:option>
<f:option value="stackedArea" selected="${plot.style=='stackedArea'}">${%Stacked Area}</f:option>
<f:option value="stackedbar" selected="${plot.style=='stackedbar'}">${%Stacked Bar}</f:option>
<f:option value="stackedbar3d" selected="${plot.style=='stackedbar3d'}">${%Stacked Bar 3D}
<f:option value="stackedBar" selected="${plot.style=='stackedBar'}">${%Stacked Bar}</f:option>
<f:option value="stackedBar3d" selected="${plot.style=='stackedBar3d'}">${%Stacked Bar 3D}
</f:option>
<f:option value="waterfall" selected="${plot.style=='waterfall'}">${%Waterfall}</f:option>
</select>
Expand Down

0 comments on commit 0c0c60d

Please sign in to comment.