Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
bump pull-request-monitoring from 1.5.3 to 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsymhoven committed May 28, 2021
1 parent b96450b commit c432c55
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
<assertj-core.version>3.16.1</assertj-core.version>
<echarts-api.version>5.1.0-2</echarts-api.version>
<forensics-api.version>1.0.0</forensics-api.version>
<pull-request-monitoring.version>1.5.3</pull-request-monitoring.version>
<pull-request-monitoring.version>1.6.0</pull-request-monitoring.version>
<plugin-util-api.version>2.2.0</plugin-util-api.version>
<fontawesome-api.version>5.15.3-2</fontawesome-api.version>
<gson.version>2.8.6</gson.version>
<workflow-cps.version>2.92</workflow-cps.version>
<workflow-multibranch.version>2.24</workflow-multibranch.version>
<!-- Other properties you may want to use:
~ jenkins-test-harness.version: Jenkins Test Harness version you use to test the plugin. For Jenkins version >= 1.580.1 use JTH 2.0 or higher.
~ hpi-plugin.version: The HPI Maven Plugin version used by the plugin..
Expand Down Expand Up @@ -70,6 +72,13 @@
<version>${saxon-he.version}</version>
</dependency>

<!-- Workflow Dependencies -->
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-multibranch</artifactId>
<version>${workflow-multibranch.version}</version>
</dependency>

<!-- Plugin Dependencies -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down Expand Up @@ -124,6 +133,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>${workflow-cps.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@
import hudson.Extension;
import hudson.model.Run;
import io.jenkins.plugins.coverage.targets.CoverageElement;
import io.jenkins.plugins.coverage.targets.CoverageResult;
import io.jenkins.plugins.coverage.targets.Ratio;
import io.jenkins.plugins.monitoring.MonitorPortlet;
import io.jenkins.plugins.monitoring.MonitorPortletFactory;
import org.kohsuke.stapler.bind.JavaScriptMethod;

import java.util.*;

/**
* A portlet that can be used for the pull-request-monitoring dashboard
* (https://github.com/jenkinsci/pull-request-monitoring-plugin).
* A portlet that can be used for the
* <a href="https://github.com/jenkinsci/pull-request-monitoring-plugin">pull-request-monitoring</a> dashboard.
*
* It renders the aggregated line, method and instruction coverage in a stacked bar chart.
* It renders the aggregated line and conditional coverage in a stacked bar chart and displays the delta,
* if a reference build is found.
*
* @author Simon Symhoven
*/
public class CoveragePullRequestMonitoringPortlet implements MonitorPortlet {
public class CoveragePullRequestMonitoringPortlet extends MonitorPortlet {
private final CoverageAction action;

/**
Expand All @@ -44,6 +43,11 @@ public String getId() {
return "code-coverage";
}

@Override
public boolean isDefault() {
return true;
}

@Override
public int getPreferredWidth() {
return 600;
Expand All @@ -56,7 +60,7 @@ public int getPreferredHeight() {

@Override
public Optional<String> getIconUrl() {
return Optional.empty();
return Optional.of("/images/48x48/graph.png");
}

@Override
Expand Down Expand Up @@ -133,7 +137,7 @@ public Optional<String> getReferenceBuildUrl() {
* The factory for the {@link CoveragePullRequestMonitoringPortlet}.
*/
@Extension(optional = true)
public static class PortletFactory implements MonitorPortletFactory {
public static class PortletFactory extends MonitorPortletFactory {

@Override
public Collection<MonitorPortlet> getPortlets(Run<?, ?> build) {
Expand Down

0 comments on commit c432c55

Please sign in to comment.