From a1536b62ca5caecd6b11a67e2ed08610d73d2104 Mon Sep 17 00:00:00 2001 From: Aleksandr Gekht Date: Thu, 14 Dec 2017 09:05:55 +0000 Subject: [PATCH 1/4] Updates to allow column selection in the display --- pom.xml | 2 +- .../PipelineAggregator.java | 50 ++++++++++++++++++- .../configure-entries.jelly | 17 +++++++ .../PipelineAggregator/index.jelly | 49 ++++++++++++------ src/main/webapp/css/pipeline-aggregator.css | 2 + src/main/webapp/js/pipeline-aggregator.js | 18 +++++-- 6 files changed, 119 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index da59efd..291dbdc 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.paul8620.jenkins.plugins pipeline-aggregator-view - 1.9-SNAPSHOT + 1.9.1-SNAPSHOT hpi diff --git a/src/main/java/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator.java b/src/main/java/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator.java index 2cb514d..a4124a6 100644 --- a/src/main/java/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator.java +++ b/src/main/java/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator.java @@ -47,6 +47,11 @@ public class PipelineAggregator extends View { private String filterRegex; + private boolean showCommitInfo; + private boolean showBuildNumber; + private boolean showBuildTime; + private boolean showBuildDuration; + @DataBoundConstructor public PipelineAggregator(String name, String viewName) { super(name); @@ -56,6 +61,11 @@ public PipelineAggregator(String name, String viewName) { this.useCondensedTables = false; this.onlyLastBuild = false; this.filterRegex = null; + + this.showCommitInfo = true; + this.showBuildNumber = true; + this.showBuildTime = true; + this.showBuildDuration = true; } protected Object readResolve() { @@ -83,6 +93,38 @@ public boolean isUseCondensedTables() { return useCondensedTables; } + public boolean isShowCommitInfo() { + return showCommitInfo; + } + + public void setShowCommitInfo(boolean showCommitInfo) { + this.showCommitInfo = showCommitInfo; + } + + public boolean isShowBuildNumber() { + return showBuildNumber; + } + + public void setShowBuildNumber(boolean showBuildNumber) { + this.showBuildNumber = showBuildNumber; + } + + public boolean isShowBuildTime() { + return showBuildTime; + } + + public void setShowBuildTime(boolean showBuildTime) { + this.showBuildTime = showBuildTime; + } + + public boolean isShowBuildDuration() { + return showBuildDuration; + } + + public void setShowBuildDuration(boolean showBuildDuration) { + this.showBuildDuration = showBuildDuration; + } + public boolean isUseScrollingCommits() { return useScrollingCommits; } @@ -114,7 +156,13 @@ protected void submit(StaplerRequest req) throws ServletException, IOException { this.buildHistorySize = json.getInt("buildHistorySize"); this.useCondensedTables = json.getBoolean("useCondensedTables"); this.useScrollingCommits = json.getBoolean("useScrollingCommits"); - this.onlyLastBuild = json.getBoolean("onlyLastBuild"); + this.onlyLastBuild = json.getBoolean("onlyLastBuild"); + + this.showCommitInfo = json.getBoolean("showCommitInfo"); + this.showBuildNumber = json.getBoolean("showBuildNumber"); + this.showBuildTime = json.getBoolean("showBuildTime"); + this.showBuildDuration = json.getBoolean("showBuildDuration"); + if (json.get("useRegexFilter") != null) { String regexToTest = req.getParameter("filterRegex"); try { diff --git a/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/configure-entries.jelly b/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/configure-entries.jelly index 8e15bb3..ddd1a0d 100644 --- a/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/configure-entries.jelly +++ b/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/configure-entries.jelly @@ -17,6 +17,9 @@ + + + @@ -24,4 +27,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/index.jelly b/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/index.jelly index 1ac46b0..b766edb 100644 --- a/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/index.jelly +++ b/src/main/resources/com/ooyala/jenkins/plugins/pipelineaggregatorview/PipelineAggregator/index.jelly @@ -20,6 +20,24 @@ + +
@@ -33,8 +51,22 @@ - + + +
${%Job}Stages${%Commits}${%Build}${%Finished}${%Duration - }
${%Job}Stages
@@ -45,18 +77,7 @@