Skip to content
Permalink
Browse files

JENKINS-48808 - allow path auto-match: ui fixes

Change-Id: I8bf541ff14dbf6400edcf7c18fb4db784b4dccbb
  • Loading branch information...
aquarellian committed Jan 4, 2018
1 parent f861463 commit c711c249eaa4d4ba4756cac35cc82daa7a5699c9
Showing with 84 additions and 56 deletions.
  1. +5 −3 src/main/java/org/jenkinsci/plugins/sonargerrit/config/GerritAuthenticationConfig.java
  2. +3 −3 src/main/resources/org/jenkinsci/plugins/sonargerrit/SonarToGerritPublisher/config.jelly
  3. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/SonarToGerritPublisher/help-authConfig.html
  4. +3 −0 ...ain/resources/org/jenkinsci/plugins/sonargerrit/SonarToGerritPublisher/help-inspectionConfig.html
  5. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/SonarToGerritPublisher/help-reviewSettings.html
  6. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/SonarToGerritPublisher/help-scoreSettings.html
  7. +1 −1 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/GerritAuthenticationConfig/config.jelly
  8. +0 −6 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/InspectionConfig/config.jelly
  9. +4 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/InspectionConfig/help-autoMatch.html
  10. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/InspectionConfig/help-baseConfig.html
  11. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/InspectionConfig/help-serverURL.html
  12. +0 −3 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/InspectionConfig/help-sonarURL.html
  13. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/InspectionConfig/help-subJobConfigs.html
  14. +2 −2 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/IssueFilterConfig/config.jelly
  15. +2 −2 ...n/resources/org/jenkinsci/plugins/sonargerrit/config/IssueFilterConfig/help-changedLinesOnly.html
  16. +2 −2 ...main/resources/org/jenkinsci/plugins/sonargerrit/config/IssueFilterConfig/help-newIssuesOnly.html
  17. 0 ...otificationConfig/{help-issuesNotification.html → help-commentedIssuesNotificationRecipient.html}
  18. 0 ...cationConfig/{help-negativeScoreNotification.html → help-negativeScoreNotificationRecipient.html}
  19. 0 ...fig/NotificationConfig/{help-noIssuesNotification.html → help-noIssuesNotificationRecipient.html}
  20. +21 −22 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/ReviewConfig/config.jelly
  21. 0 ...plugins/sonargerrit/config/ReviewConfig/{help-issueComment.html → help-issueCommentTemplate.html}
  22. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/ReviewConfig/help-issueFilterConfig.html
  23. 0 .../sonargerrit/config/ReviewConfig/{help-noIssuesToPostText.html → help-noIssuesTitleTemplate.html}
  24. 0 ...argerrit/config/ReviewConfig/{help-someIssuesToPostText.html → help-someIssuesTitleTemplate.html}
  25. +7 −4 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/ScoreConfig/config.jelly
  26. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/ScoreConfig/help-issueFilterConfig.html
  27. +6 −4 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/SubJobConfig/config.jelly
  28. +0 −3 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/SubJobConfig/help-path.html
  29. +1 −1 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/SubJobConfig/help-projectPath.html
  30. +3 −0 src/main/resources/org/jenkinsci/plugins/sonargerrit/config/SubJobConfig/help-sonarReportPath.html
@@ -15,6 +15,8 @@
import java.io.IOException;
import java.util.List;

import static org.jenkinsci.plugins.sonargerrit.util.Localization.getLocalized;

/**
* Project: Sonar-Gerrit Plugin
* Author: Tatiana Didik
@@ -59,16 +61,16 @@ public FormValidation doTestConnection(@QueryParameter("username") final String

IGerritHudsonTriggerConfig gerritConfig = GerritManagement.getConfig(serverName);
if (gerritConfig == null) {
return FormValidation.error("jenkins.plugin.error.gerrit.config.empty");
return FormValidation.error(getLocalized("jenkins.plugin.error.gerrit.config.empty"));
}

if (!gerritConfig.isUseRestApi()) {
return FormValidation.error("jenkins.plugin.error.gerrit.restapi.off");
return FormValidation.error(getLocalized("jenkins.plugin.error.gerrit.restapi.off"));
}

GerritServer server = PluginImpl.getServer_(serverName);
if (server == null) {
return FormValidation.error("jenkins.plugin.error.gerrit.server.empty");
return FormValidation.error(getLocalized("jenkins.plugin.error.gerrit.server.empty"));
}
return server.getDescriptor().doTestRestConnection(gerritConfig.getGerritFrontEndUrl(), username, password/*, gerritConfig.isUseRestApi()*/);

@@ -5,9 +5,9 @@
<f:property title="${%jenkins.plugin.settings.inspection.settings}" field="inspectionConfig"/>
</f:section>

<f:advanced>
<f:advanced title="${%jenkins.plugin.settings.gerrit}">

<f:section title="${%jenkins.plugin.settings.gerrit}">
<!--<f:section title="${%jenkins.plugin.settings.gerrit}">-->

<f:section title="${%jenkins.plugin.settings.gerrit.credentials}">
<f:optionalProperty title="${%jenkins.plugin.settings.gerrit.credentials}" field="authConfig"/>
@@ -25,6 +25,6 @@
<f:property title="${%jenkins.plugin.settings.gerrit.notification.settings}"
field="notificationConfig"/>
</f:section>
</f:section>
<!--</f:section>-->
</f:advanced>
</j:jelly>
@@ -0,0 +1,3 @@
<div>
<b>Override</b> HTTP credentials specified in Gerrit Trigger settings to be used for review posting
</div>
@@ -0,0 +1,3 @@
<div>
Configure accordance of SonarQube report(s) and project or module(s) path(s)
</div>
@@ -0,0 +1,3 @@
<div>
Issues filter and review templates for Gerrit review
</div>
@@ -0,0 +1,3 @@
<div>
Gerrit score configuration and separate issue filter
</div>
@@ -11,7 +11,7 @@
</f:entry>

<j:set var="servers" value="${descriptor.getGerritServerNames()}"/>
<f:entry title="${%jenkins.plugin.settings.gerrit.credentials.server}">
<f:entry title="${%jenkins.plugin.settings.gerrit.credentials.server}" help="/help-serverName.html">
<select name="serverName">
<j:forEach var="inst" items="${servers}">
<f:option>${inst}</f:option>
@@ -4,12 +4,6 @@
<f:textbox default="${descriptor.SONAR_URL}" placeholder="${descriptor.SONAR_URL}"/>
</f:entry>

${instance}
${instance.baseConfig.autoMatch}
${baseConfig.autoMatch}
${baseConfig.autoMatch == null}
${baseConfig}
${baseConfig == null}
<f:radioBlock name="type"
title="${%jenkins.plugin.settings.inspection.base.config}"
value="${descriptor.BASE_TYPE}"
@@ -0,0 +1,4 @@
<div>
Allow plugin to match inspection and review system file names automatically
(useful for projects with several nested modules)
</div>
@@ -0,0 +1,3 @@
<div>
Provides settings for the whole project
</div>
@@ -0,0 +1,3 @@
<div>
URL of the SonarQube instance used for static code analysis
</div>

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,3 @@
<div>
Provides separate settings for each module
</div>
@@ -1,7 +1,7 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

<f:entry title="${%jenkins.plugin.settings.gerrit.filter.severity}">
<f:entry title="${%jenkins.plugin.settings.gerrit.filter.severity}" field="severity">
<select name="severity" field="severity" value="${instance.severity}" default="${descriptor.SEVERITY}">
<f:option value="INFO" selected="${instance.severity == 'INFO'}">
${%INFO}
@@ -32,6 +32,6 @@
field="changedLinesOnly"
value="${changedLinesOnly}"
description="${%jenkins.plugin.settings.gerrit.filter.lines.changed.description}">
<f:checkbox default="descriptor.CHANGED_LINES_ONLY"/>
<f:checkbox selected="${changedLinesOnly}" default="descriptor.CHANGED_LINES_ONLY"/>
</f:entry>
</j:jelly>
@@ -1,4 +1,4 @@
<div>
Check if you want only <b>changed in current commit</b> lines to be commented by Gerrit.
If you want modified files to be commented with <b>all issues</b> leave this control unchecked.
Only <b>changed in current commit</b> lines to be commented by Gerrit when checked.
Modified files to be commented with <b>all issues</b> if this control unchecked.
</div>
@@ -1,4 +1,4 @@
<div>
Check if you want only <b>new</b> SonarQube issues to be commented in Gerrit.
If you want modified files to be commented with <b>all</b> corresponding issues leave this control unchecked.
Only <b>new</b> SonarQube issues to be commented in Gerrit when checked.
Modified files to be commented with <b>all</b> corresponding issues when unchecked.
</div>
@@ -3,27 +3,26 @@

<f:property
title="${%jenkins.plugin.settings.gerrit.review.filter}"
field="issueFilterConfig" />
field="issueFilterConfig"/>

<f:entry title="${%jenkins.plugin.settings.gerrit.review.template.title.no.issues}"
field="noIssuesTitleTemplate">
<f:textbox
default="${descriptor.NO_ISSUES_TITLE_TEMPLATE}"
placeholder="${descriptor.NO_ISSUES_TITLE_TEMPLATE}"/>
</f:entry>
<f:entry title="${%jenkins.plugin.settings.gerrit.review.template.title.issues}"
field="someIssuesTitleTemplate">
<f:textbox
default="${descriptor.SOME_ISSUES_TITLE_TEMPLATE}"
placeholder="${descriptor.SOME_ISSUES_TITLE_TEMPLATE}"/>
</f:entry>
<f:entry
title="${%jenkins.plugin.settings.gerrit.review.template.body}"
field="issueCommentTemplate">
<f:textarea
default="${descriptor.ISSUE_COMMENT_TEMPLATE}"
placeholder="${descriptor.ISSUE_COMMENT_TEMPLATE}"/>
</f:entry>

<f:section title="${%jenkins.plugin.settings.gerrit.review.template}">
<f:entry title="${%jenkins.plugin.settings.gerrit.review.template.title.no.issues}"
field="noIssuesTitleTemplate">
<f:textbox
default="${descriptor.NO_ISSUES_TITLE_TEMPLATE}"
placeholder="${descriptor.NO_ISSUES_TITLE_TEMPLATE}"/>
</f:entry>
<f:entry title="${%jenkins.plugin.settings.gerrit.review.template.title.issues}"
field="someIssuesTitleTemplate">
<f:textbox
default="${descriptor.SOME_ISSUES_TITLE_TEMPLATE}"
placeholder="${descriptor.SOME_ISSUES_TITLE_TEMPLATE}"/>
</f:entry>
<f:entry
title="${%jenkins.plugin.settings.gerrit.review.template.body}"
field="issueCommentTemplate">
<f:textarea
default="${descriptor.ISSUE_COMMENT_TEMPLATE}"
placeholder="${descriptor.ISSUE_COMMENT_TEMPLATE}"/>
</f:entry>
</f:section>
</j:jelly>
@@ -0,0 +1,3 @@
<div>
Issue filter to specify issues to be <b>commented</b> in Gerrit
</div>
@@ -1,16 +1,21 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

<f:property
title="${%jenkins.plugin.settings.gerrit.score.filter}"
field="issueFilterConfig"/>

<f:entry
title="${%jenkins.plugin.settings.gerrit.score.category}"
field="category"
required="true">
<f:textbox default="${descriptor.CATEGORY}"
placeholder="${descriptor.CATEGORY}"/>
</f:entry>

<f:entry title="${%jenkins.plugin.settings.gerrit.score.no.issues}"
field="noIssuesScore"
required="true">
required="true">
<f:number
clazz="number"
min="-2"
@@ -19,6 +24,7 @@
default="${descriptor.NO_ISSUES_SCORE}"
placeholder="${descriptor.NO_ISSUES_SCORE}"/>
</f:entry>

<f:entry
title="${%jenkins.plugin.settings.gerrit.score.issues}"
field="issuesScore"
@@ -32,7 +38,4 @@
placeholder="${descriptor.SOME_ISSUES_SCORE}"/>
</f:entry>

<f:property
title="${%jenkins.plugin.settings.gerrit.score.filter}"
field="issueFilterConfig"/>
</j:jelly>
@@ -0,0 +1,3 @@
<div>
Issue filter to specify issues to affect <b>score</b> in Gerrit
</div>
@@ -1,14 +1,16 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">

<f:entry title="${%jenkins.plugin.settings.inspection.project.report.path}">
<f:textbox field="sonarReportPath" value="${subJobConfigs.sonarReportPath}"
<f:entry field="sonarReportPath"
title="${%jenkins.plugin.settings.inspection.project.report.path}">
<f:textbox value="${subJobConfigs.sonarReportPath}"
default="${descriptor.SONAR_REPORT_PATH}"
placeholder="${descriptor.SONAR_REPORT_PATH}"/>
</f:entry>

<f:entry title="${%jenkins.plugin.settings.inspection.project.base.path}">
<f:textbox field="projectPath" value="${subJobConfigs.projectPath}"
<f:entry field="projectPath"
title="${%jenkins.plugin.settings.inspection.project.base.path}">
<f:textbox value="${subJobConfigs.projectPath}"
default="${descriptor.PROJECT_PATH}"
placeholder="${descriptor.PROJECT_PATH}"/>
</f:entry>

This file was deleted.

Oops, something went wrong.
@@ -1,3 +1,3 @@
<div>
Path to project base dir
Provides module prefix for a file path for multi-module projects
</div>
@@ -0,0 +1,3 @@
<div>
Path to SonarQube report on Jenkins server. Default value is "target/sonar/sonar-report.json"
</div>

0 comments on commit c711c24

Please sign in to comment.
You can’t perform that action at this time.