Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HACK][JENKINS-33622] Get 2.x UI to show on config page.
- Loading branch information
1 parent
c4aa3bc
commit 2ae7154
Showing
3 changed files
with
135 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
src/main/resources/com/cloudbees/hudson/plugins/folder/AbstractFolder/configure2.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<!-- | ||
The MIT License | ||
Copyright 2013 CloudBees. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
--> | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form"> | ||
<div class="behavior-loading">${%LOADING}</div> | ||
<f:form method="post" action="configSubmit" name="config" tableClass="config-table scrollspy"> | ||
<j:set var="descriptor" value="${it.descriptor}"/> | ||
<j:set var="instance" value="${it}"/> | ||
|
||
<f:entry title="${%Name}" field="name"> | ||
<!-- | ||
TODO Remove block-control class | ||
Having this forces application of the 2.x UI but it is glitchy if no f:optionalBlock or f:radioBlock | ||
elements are in the form (such is the case for the standard Folder implementation). | ||
The save/apply buttons are out of place until the DOM is modified by expanding config elements or by | ||
resizing the browser window. | ||
--> | ||
<f:textbox clazz="block-control"/> | ||
</f:entry> | ||
|
||
<f:entry title="${%Display Name}" field="displayNameOrNull"> | ||
<f:textbox | ||
checkUrl="'${rootURL}/checkDisplayName?displayName='+encodeURIComponent(this.value)+'&jobName='+encodeURIComponent('${h.jsStringEscape(it.name)}')"/> | ||
</f:entry> | ||
|
||
<f:entry title="${%Description}" field="description"> | ||
<f:textarea codemirror-mode="${app.markupFormatter.codeMirrorMode}" | ||
codemirror-config="${app.markupFormatter.codeMirrorConfig}" | ||
previewEndpoint="/markupFormatter/previewDescription"/> | ||
</f:entry> | ||
|
||
<st:include page="configure-details" optional="true"/> | ||
|
||
<j:if test="${it.views.size()>1}"> | ||
<f:entry title="${%Default View}" field="defaultView"> | ||
<select class="setting-input" name="primaryView"> | ||
<j:forEach var="v" items="${it.views}"> | ||
<j:choose> | ||
<j:when test="${it.primaryView==v}"> | ||
<option value="${v.viewName}" selected="selected">${v.viewName}</option> | ||
</j:when> | ||
<j:otherwise> | ||
<option value="${v.viewName}">${v.viewName}</option> | ||
</j:otherwise> | ||
</j:choose> | ||
</j:forEach> | ||
</select> | ||
</f:entry> | ||
</j:if> | ||
|
||
<f:dropdownDescriptorSelector title="${%Views Tab Bar}" field="viewsTabBar"/> | ||
|
||
<!-- TODO tried to hide unless ${it.icon.descriptor.all().size() > 1} using f:invisibleEntry but this did not seem to work: --> | ||
<f:dropdownDescriptorSelector title="${%Icon}" field="icon"/> | ||
|
||
<f:section title="${%Health metrics}"> | ||
<f:advanced title="${%Health metrics}" align="left"> | ||
<f:block> | ||
<f:hetero-list descriptors="${descriptor.getHealthMetricDescriptors()}" | ||
items="${it.healthMetrics}" name="healthMetrics" | ||
addCaption="${%Add metric}" deleteCaption="${%Remove}" | ||
oneEach="true" hasHeader="true" honorOrder="true"/> | ||
</f:block> | ||
</f:advanced> | ||
</f:section> | ||
|
||
<!-- folder property configurations --> | ||
<f:descriptorList descriptors="${descriptor.getPropertyDescriptors()}" instances="${it.properties}" | ||
forceRowSet="true"/> | ||
|
||
<j:if test="${h.hasPermission(it,it.CONFIGURE)}"> | ||
<f:bottomButtonBar> | ||
<f:submit value="${%Save}"/> | ||
<f:apply/> | ||
</f:bottomButtonBar> | ||
</j:if> | ||
</f:form> | ||
<st:adjunct includes="lib.form.confirm"/> | ||
</j:jelly> |