-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make issues in modified code visible.
- Loading branch information
Showing
31 changed files
with
550 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
plugin/src/main/java/io/jenkins/plugins/analysis/core/charts/ModifiedCodePieChart.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.jenkins.plugins.analysis.core.charts; | ||
|
||
import edu.hm.hafner.analysis.Report; | ||
import edu.hm.hafner.echarts.PieChartModel; | ||
import edu.hm.hafner.echarts.PieData; | ||
|
||
import io.jenkins.plugins.echarts.JenkinsPalette; | ||
|
||
/** | ||
* Builds the model for a pie chart showing the number of issues in modified code. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class ModifiedCodePieChart { | ||
/** | ||
* Creates the chart for the specified result. | ||
* | ||
* @param issues | ||
* all issues | ||
* | ||
* @return the chart model | ||
*/ | ||
public PieChartModel create(final Report issues) { | ||
PieChartModel model = new PieChartModel(Messages.NewVersusFixed_Name()); | ||
|
||
var totals = issues.size(); | ||
model.add(new PieData(Messages.Modified_Code_Warnings_Short(), totals), JenkinsPalette.RED.normal()); | ||
model.add(new PieData(Messages.Unchanged_Code_Warnings_Short(), totals), JenkinsPalette.YELLOW.normal()); | ||
|
||
return model; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.