提交 963af1b3 编写于 作者: M mindless

in r15291 ParametersAction.build was removed.

1) added back this field as private transient so old build data can be loaded
   without unmarshall exceptions
2) fixed view showing parameters used for a build, which was using this build field
   (I think that's why it was there in the first place).. now I used
   request.findAncestorObject to get the build.
(feel free to rework either/both of these changes to a "better" way)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15331 71c3de6d-444a-0410-be80-ed276b4c234a
上级 dade9a65
......@@ -53,6 +53,11 @@ public class ParametersAction implements Action, Iterable<ParameterValue>, Queue
private final List<ParameterValue> parameters;
/**
* @deprecated since 1.283; kept to avoid warnings loading old build data, but now transient.
*/
private transient AbstractBuild<?, ?> build;
public ParametersAction(List<ParameterValue> parameters) {
this.parameters = parameters;
}
......
......@@ -26,9 +26,13 @@ THE SOFTWARE.
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
<l:layout title="${it.displayName}">
<st:include page="sidepanel.jelly" it="${it.build}" />
<j:invokeStatic var="buildClass" className="java.lang.Class" method="forName">
<j:arg value="hudson.model.AbstractBuild" />
</j:invokeStatic>
<j:set var="build" value="${request.findAncestorObject(buildClass)}" />
<st:include page="sidepanel.jelly" it="${build}" />
<l:main-panel>
<h1>${%Build} #${it.build.number}</h1>
<h1>${%Build} #${build.number}</h1>
<l:pane title="${%Parameters}" width="3">
<j:forEach var="parameterValue" items="${it.parameters}">
<st:include it="${parameterValue}"
......@@ -37,4 +41,4 @@ THE SOFTWARE.
</l:pane>
</l:main-panel>
</l:layout>
</j:jelly>
\ No newline at end of file
</j:jelly>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册