-
-
Notifications
You must be signed in to change notification settings - Fork 63
Convert Groovy views to Jelly | use Jenkins.get() #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| The MIT License | ||
| Copyright (c) 2011, CloudBees, Inc. | ||
| 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:f="/lib/form"> | ||
| <j:if test="${size(descriptor.installations) != 0}"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You tested this logic interactively, right? (Cannot recall if there is a functional test for it.)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (There are actually good reasons to discards the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I tested with and without installations but not sure to have cover all other potential cases there. |
||
| <f:entry title="${%Ant Version}"> | ||
| <select class="setting-input" name="ant.antName"> | ||
| <option value="(Default)">${%Default}</option> | ||
| <j:forEach var="install" items="${descriptor.installations}"> | ||
| <f:option selected="${install.name == instance.ant.name}" value="${install.name}"> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW we ought to have a standard control in core for selecting a tool installation. |
||
| ${install.name} | ||
| </f:option> | ||
| </j:forEach> | ||
| </select> | ||
| </f:entry> | ||
| </j:if> | ||
|
|
||
| <f:entry title="${%Targets}" field="targets"> | ||
| <f:expandableTextbox /> | ||
| </f:entry> | ||
|
|
||
| <f:advanced> | ||
| <f:entry title="${%Build File}" field="buildFile"> | ||
| <f:expandableTextbox /> | ||
| </f:entry> | ||
| <f:entry title="${%Properties}" field="properties"> | ||
| <f:expandableTextbox /> | ||
| </f:entry> | ||
| <f:entry title="${%Java Options}" field="antOpts"> | ||
| <f:expandableTextbox /> | ||
| </f:entry> | ||
| </f:advanced> | ||
| </j:jelly> | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| The MIT License | ||
|
|
||
| Copyright (c) 2016-2018, CloudBees, Inc. | ||
|
|
||
| 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:f="/lib/form"> | ||
| <j:set var="antInstallations" value="${app.getDescriptor('hudson.tasks.Ant').installations}" /> | ||
| <j:if test="${size(antInstallations) != 0}"> | ||
| <f:entry title="${%Ant Version}"> | ||
| <select class="setting-input" name="ant.installation"> | ||
| <option value="">${%Default}</option> | ||
| <j:forEach var="install" items="${antInstallations}"> | ||
| <f:option selected="${install.name == instance.installation}" value="${install.name}"> | ||
| ${install.name} | ||
| </f:option> | ||
| </j:forEach> | ||
| </select> | ||
| </f:entry> | ||
| </j:if> | ||
|
|
||
| <j:set var="jdkInstallations" value="${app.getDescriptor('hudson.model.JDK').installations}" /> | ||
| <j:if test="${size(jdkInstallations) != 0}"> | ||
| <f:entry title="${%JDK}"> | ||
| <select class="setting-input" name="ant.jdk"> | ||
| <option value="">${%Default}</option> | ||
| <j:forEach var="install" items="${jdkInstallations}"> | ||
| <f:option selected="${install.name == instance.jdk}" value="${install.name}"> | ||
| ${install.name} | ||
| </f:option> | ||
| </j:forEach> | ||
| </select> | ||
| </f:entry> | ||
| </j:if> | ||
| </j:jelly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\o/