Skip to content

Commit

Permalink
[FIXED JENKINS-17454] Display parameters of queue items in build hist…
Browse files Browse the repository at this point in the history
…ory widget.

Also provide proper overrides of ParameterValue.getShortDescription, rather than delegating to toString.
  • Loading branch information
jglick committed Apr 3, 2013
1 parent d2603be commit 750da1a
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -58,6 +58,9 @@
<li class=bug>
JUnit result archiver should only fail builds if there are really no results - i.e. also no skipped tests.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-7970">issue 7970</a>)
<li class=rfe>
Better display of parameters in queue items.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-17454">issue 17454</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
7 changes: 6 additions & 1 deletion core/src/main/java/hudson/model/BooleanParameterValue.java
Expand Up @@ -90,4 +90,9 @@ public int hashCode() {
public String toString() {
return "(BooleanParameterValue) " + getName() + "='" + value + "'";
}
}

@Override public String getShortDescription() {
return name + '=' + value;
}

}
4 changes: 4 additions & 0 deletions core/src/main/java/hudson/model/FileParameterValue.java
Expand Up @@ -175,6 +175,10 @@ public String toString() {
return "(FileParameterValue) " + getName() + "='" + originalFileName + "'";
}

@Override public String getShortDescription() {
return name + "=" + originalFileName;
}

/**
* Serve this file parameter in response to a {@link StaplerRequest}.
*
Expand Down
4 changes: 4 additions & 0 deletions core/src/main/java/hudson/model/JobParameterValue.java
Expand Up @@ -46,4 +46,8 @@ public void buildEnvVars(AbstractBuild<?,?> build, EnvVars env) {
env.put(name,job.toString());
env.put(name.toUpperCase(Locale.ENGLISH),job.toString()); // backward compatibility pre 1.345
}

@Override public String getShortDescription() {
return name + "=" + job.getFullDisplayName();
}
}
5 changes: 5 additions & 0 deletions core/src/main/java/hudson/model/PasswordParameterValue.java
Expand Up @@ -72,4 +72,9 @@ public boolean isSensitive() {
public Secret getValue() {
return value;
}

@Override public String getShortDescription() {
return name + "=****";
}

}
4 changes: 4 additions & 0 deletions core/src/main/java/hudson/model/RunParameterValue.java
Expand Up @@ -91,4 +91,8 @@ public String toString() {
return "(RunParameterValue) " + getName() + "='" + getRunId() + "'";
}

@Override public String getShortDescription() {
return name + "=" + getRun().getFullDisplayName();
}

}
5 changes: 5 additions & 0 deletions core/src/main/java/hudson/model/StringParameterValue.java
Expand Up @@ -96,4 +96,9 @@ public boolean equals(Object obj) {
public String toString() {
return "(StringParameterValue) " + getName() + "='" + value + "'";
}

@Override public String getShortDescription() {
return name + '=' + value;
}

}
Expand Up @@ -56,6 +56,7 @@ THE SOFTWARE.
(${%pending})
</j:otherwise>
</j:choose>
${item.params}
</td>
</tr>
</j:forEach>
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/lib/hudson/queue.jelly
Expand Up @@ -65,6 +65,7 @@ THE SOFTWARE.
<a href="${rootURL}/${item.task.url}" class="model-link tl-tr" tooltip="${item.why}${h.escape(item.params)}&lt;br&gt;${%WaitingFor(item.inQueueForString)}">
${item.task.fullDisplayName}
</a>
<!-- XXX include estimated number as in BuildHistoryWidget/entries.jelly if possible -->
<j:if test="${stuck}">
&#160;
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Executor+Starvation">
Expand Down

0 comments on commit 750da1a

Please sign in to comment.