/hudson-core/src/main/resources/hudson/model/Job/configure.jelly
http://github.com/hudson/hudson · Unknown · 123 lines · 113 code · 10 blank · 0 comment · 0 complexity · d87a6e19c9c2daac25cda79ffa650067 MD5 · raw file
- <!--
- The MIT License
- Copyright (c) 2004-2011, Oracle Corporation, Inc., Kohsuke Kawaguchi, Nikita Levyankov, id:cactusman
- 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.
- -->
- <!--
- Config page. derived class specific entries should go to configure-entries.jsp
- -->
- <?jelly escape-by-default='true'?>
- <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
- <l:layout title="${it.displayName} Config" norefresh="true" permission="${it.EXTENDED_READ}">
- <j:set var="jobUrl" value="${h.getNearestAncestorUrl(request,it)}"/>
- <st:include page="sidepanel.jelly" />
- <l:main-panel>
- <div class="behavior-loading">${%LOADING}</div>
- <f:form method="post" action="configSubmit" name="config" tableClass="configure">
- <j:set var="descriptor" value="${it.descriptor}" />
- <j:set var="instance" value="${it}" />
- <j:if test="${it.isNameEditable()}">
- <f:entry title="${%name(it.pronoun)}">
- <f:textbox name="name" value="${it.name}" />
- </f:entry>
- </j:if>
- <j:set var="cascadingCandidates" value="${cu.getCascadingParents(it.class, it)}"/>
- <j:choose>
- <j:when test="${cascadingCandidates.size() gt 0}">
- <f:entry title="${%cascadingProjectName}" help="/help/project-config/cascadingProject.html">
- <select class="setting-input" name="cascadingProjectName">
- <f:option value="">${%emptyCascadingProjectName}</f:option>
- <j:forEach var="job" items="${cascadingCandidates}">
- <f:option selected="${job.name==it.cascadingProjectName}" value="${job.name}">${job.name}</f:option>
- </j:forEach>
- </select>
- </f:entry>
- </j:when>
- <j:otherwise>
- <f:invisibleEntry>
- <input type="hidden" name="cascadingProjectName" value="${it.cascadingProjectName}" />
- </f:invisibleEntry>
- </j:otherwise>
- </j:choose>
- <f:entry title="${%Description}" help="/help/project-config/description.html">
- <f:textarea name="description" value="${it.description}"/>
- </f:entry>
- <j:if test="${it.supportsLogRotator()}">
- <!-- log rotator -->
- <j:set var="logRotatorProperty" value="${cu.getLogRotatorProjectProperty(it, it.LOG_ROTATOR_PROPERTY_NAME)}"/>
- <j:set var="logRotator" value="${logRotatorProperty.getValue()}"/>
- <f:optionalBlock name="logrotate"
- help="/help/project-config/log-rotation.html"
- title="${%Discard Old Builds}" checked="${logRotator!=null}"
- resetUrl="${jobUrl}/resetProjectProperty?propertyName=${it.LOG_ROTATOR_PROPERTY_NAME}"
- isPropertyOverridden="${logRotatorProperty.isOverridden()}">
- <st:include page="/hudson/tasks/LogRotator/config.jelly"/>
- </f:optionalBlock>
- </j:if>
- <!-- job property configurations -->
- <j:set var="instances" value="${it.properties}" />
- <j:forEach var="d" items="${h.getJobPropertyDescriptors(it.getClass())}" varStatus="loop">
- <j:scope>
- <j:set var="descriptor" value="${d}"/>
- <j:set var="instance" value="${instances[d]}"/>
- <j:set var="rowSetName" value="${'jobProperty'+loop.index}"/>
- <j:set var="propertyOverridden" value="false"/>
- <j:if test="${cu.isCascadableJobProperty(descriptor)}">
- <j:set var="rowSetName" value="${descriptor.jsonSafeClassName}"/>
- <j:set var="cascadingProperty" value="${cu.getBaseProjectProperty(it, descriptor.jsonSafeClassName)}"/>
- <j:set var="instance" value="${cascadingProperty.value}"/>
- <j:set var="propertyOverridden" value="${cascadingProperty.isOverridden()}"/>
- </j:if>
- <f:rowSet name="${rowSetName}" isPropertyOverridden='${propertyOverridden}'>
- <j:if test="${propertyOverridden}">
- <tr>
- <td>
- <div class="optional-reset">
- <a href="#" class="reset-button"
- resetURL="${jobUrl}/resetProjectProperty?propertyName=${cascadingProperty.key}">
- <img src="${imagesURL}/16x16/undo.png"/>
- </a>
- </div>
- </td>
- </tr>
- </j:if>
- <st:include from="${d}" page="${d.configPage}" optional="true"/>
- </f:rowSet>
- </j:scope>
- </j:forEach>
- <!-- additional entries from derived classes -->
- <st:include page="configure-entries.jelly" />
- <j:if test="${h.hasPermission(it,it.CONFIGURE)}">
- <f:block>
- <!--<input type="button" name="StructureTest" value="Test" onclick="buildFormTree(this.form)" />-->
- <f:submit value="${%Save}" />
- </f:block>
- </j:if>
- </f:form>
- </l:main-panel>
- </l:layout>
- </j:jelly>