提交 adfa9a30 编写于 作者: J Jesse Glick

[FIXED JENKINS-20327] When saving a list view, submit POST data with size...

[FIXED JENKINS-20327] When saving a list view, submit POST data with size proportional to the # of jobs selected for inclusion, not the number of options.
This can be done easily by setting json="true"; otherwise the default is to pass =false for each unselected job.
Ironically, even with this fix we are sending 2× what is needed,
since currently ListView.submit does not even check the json parameter for job names:
it only pays attention to top-level request parameters that the browser defines for selected checkboxes.
Ideally we could ask buildFormTree to ignore a given form element entirely, so as to avoid the wasted data.
上级 2b93c0cb
......@@ -55,7 +55,9 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=>
<li class='major bug'>
When Jenkins had a lot of jobs, submitting a view configuration change could overload the web server, even if few of the jobs were selected.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-20327">issue 20327</a>)
</ul>
</div><!--=TRUNK-END=-->
......
......@@ -51,7 +51,7 @@ THE SOFTWARE.
<j:set var="spanStyle" value="${it.recurse?'':'display:none'}"/>
</j:if>
<span class="${spanClass}" style="${spanStyle}">
<f:checkbox name="${job.getRelativeNameFromGroup(it.ownerItemGroup)}" checked="${it.jobNamesContains(job)}" title="${h.getRelativeDisplayNameFrom(job,it.ownerItemGroup)}" tooltip="${job.fullName}" />
<f:checkbox name="${job.getRelativeNameFromGroup(it.ownerItemGroup)}" checked="${it.jobNamesContains(job)}" title="${h.getRelativeDisplayNameFrom(job,it.ownerItemGroup)}" tooltip="${job.fullName}" json="true"/>
<br/>
</span>
</j:forEach>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册