aboutsummaryrefslogtreecommitdiffstats
blob: 82c5d92e4a6e3d135ad642b7c7bf2871ab4341bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!-- **************************************************************************
#
# Copyright  (c) 2004-2011 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Kohsuke Kawaguchi, id:cactusman, Nikita Levyankov, Anton Kozak
#        
#
#************************************************************************** --> 


<!--
  Config page. derived class specific entries should go to configure-entries.jsp
-->
<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:if 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:if>
        <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>