Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c40b6793ff4856261708692eb453ad63111288e4 (plain) (blame)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!-- **************************************************************************
#
# Copyright  (c) 2004-2013 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, Winston Prakash, 
#    Erik Ramfelt, Jean-Baptiste Quenot, Stephen Connolly, 
#    Tom Huybrechts, Yahoo! Inc., Duncan Mills
#        
#************************************************************************** --> 


<!--
  Config page
-->
<?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">
<l:layout norefresh="true" permission="${it.ADMINISTER}">
  <st:include page="sidepanel.jelly" />
  <l:main-panel>
    <div class="behavior-loading">${%LOADING}</div>
    <f:form method="post" name="config" action="configSubmit">
      <j:set var="instance" value="${it}" />
      <j:set var="descriptor" value="${instance.descriptor}" />
      
      <h1> 
        <img width="48" height="48" src="${imagesURL}/48x48/setting.png" alt="" style="margin-right:10px"/>
        ${%System Configurations}
      </h1>

      <f:entry title="${%Home directory}" help="/help/system-config/homeDirectory.html">
        ${it.rootDir}
      </f:entry>
      <f:entry title="${%Instance Tag}" help="/help/system-config/instanceTag.html">
        <f:textbox name="instance_tag" value="${it.instanceTag}" />
      </f:entry> 
      <f:entry title="${%System Message}" help="/help/system-config/systemMessage.html">
        <f:textarea name="system_message" value="${it.systemMessage}" />
      </f:entry>
      <f:entry title="${%Privacy Message}" help="/help/system-config/privacyMessage.html">
        <f:textbox name="privacy_message" value="${it.privacyMessage}" />
      </f:entry>       
      <f:entry title="${%# of executors}" field="numExecutors">
        <f:textbox />
      </f:entry>
      <j:if test="${!empty(it.slaves)}">
        <f:entry title="${%Labels}" field="labelString">
          <f:textbox />
        </f:entry>
        <f:slave-mode name="master.mode" node="${it}" />
      </j:if>
      <f:entry title="${%Quiet period}" help="/help/project-config/quietPeriod.html">
        <f:textbox clazz="number" name="quiet_period" value="${it.quietPeriod}"/>
      </f:entry>
      <f:entry title="${%SCM checkout retry count}" help="/help/project-config/scmCheckoutRetryCount.html">
        <f:textbox clazz="number" name="retry_count" value="${it.scmCheckoutRetryCount}"/>
      </f:entry>

      <j:if test="${size(h.viewsTabBarDescriptors) gt 1}">
        <f:dropdownList name="viewsTabBar" title="${%Views Tab Bar}" help="/help/project-config/viewsTabBar.html">
          <!-- Loop through available Views TabBar Descriptors -->
          <j:forEach var="descriptor" items="${h.viewsTabBarDescriptors}" varStatus="loop">
            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                                 selected="${descriptor==it.viewsTabBar.descriptor}"
                                 staplerClass="${descriptor.clazz.name}">
              <!-- Include config.jelly for this Views TabBar type -->
              <st:include page="${descriptor.configPage}" from="${descriptor}" optional="true"/>
            </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
      </j:if>

      <j:if test="${size(h.myViewsTabBarDescriptors) gt 1}">
        <f:dropdownList name="myViewsTabBar" title="${%My Views Tab Bar}" help="/help/project-config/myViewsTabBar.html">
          <!-- Loop through available My Views TabBar Descriptors -->
          <j:forEach var="descriptor" items="${h.myViewsTabBarDescriptors}" varStatus="loop">
            <f:dropdownListBlock title="${descriptor.displayName}" value="${loop.index}"
                                 selected="${descriptor==it.myViewsTabBar.descriptor}"
                                 staplerClass="${descriptor.clazz.name}">
              <!-- Include config.jelly for this Views TabBar type -->
              <st:include page="${descriptor.configPage}" from="${descriptor}" optional="true"/>
            </f:dropdownListBlock>
          </j:forEach>
        </f:dropdownList>
      </j:if>

      <j:if test="${size(it.views) gt 1}">
        <f:entry title="${%Default view}" help="/help/project-config/defaultView.html">
          <select class="setting-input" name="primaryView">
            <j:forEach var="v" items="${it.views}">
              <f:option value="${v.viewName}" selected="${it.primaryView==v}">
                ${v.viewName}
              </f:option>
            </j:forEach>
          </select>
        </f:entry>
      </j:if>

      <j:if test="${!empty(h.crumbIssuerDescriptors)}">
	    <f:optionalBlock name="csrf" title="${%Prevent Cross Site Request Forgery exploits}"
	                     checked="${it.useCrumbs}" help="/help/system-config/csrf.html">
	      <f:entry title="${%Crumbs}">
	        <table style="width:100%">
	          <f:descriptorRadioList title="${%Crumb Algorithm}" varName="issuer"
	                                 instance="${it.crumbIssuer}"
	                                 descriptors="${h.crumbIssuerDescriptors}"/>
	        </table>
	      </f:entry>
	    </f:optionalBlock>
      </j:if>

      <f:optionalBlock name="usageStatisticsCollected" checked="${it.usageStatisticsCollected}"
                       title="${%statsBlurb}"
                       help="/help/system-config/usage-statistics.html" />
      
      <f:optionalBlock name="useBlueBall" checked="${it.useBlueBall()}"
                       title="${%useBlueBallBlurb}"
                       help="/help/system-config/use-blue-ball.html" />

        <f:descriptorList title="${%Global properties}"
                          name="globalNodeProperties"
                          descriptors="${h.getNodePropertyDescriptors(it.class)}"
                          instances="${it.globalNodeProperties}" />

      <!-- list config pages from plugins, if any -->
      <j:forEach var="p" items="${it.pluginManager.plugins}">
        <j:if test="${h.hasView(p.plugin,'config.jelly')}">
          <f:rowSet name="plugin">
            <f:invisibleEntry>
              <input type="hidden" name="name" value="${p.shortName}"/>
            </f:invisibleEntry>
            <st:include page="config.jelly" it="${p.plugin}" optional="true"/>
          </f:rowSet>
        </j:if>
      </j:forEach>

      <!-- global configuration from everyone -->
      <j:forEach var="descriptor" items="${h.getSortedDescriptorsForGlobalConfig()}">
        <j:set var="instance" value="${descriptor}" /><!-- this makes the <f:textbox field=.../> work -->
        <f:rowSet name="${descriptor.jsonSafeClassName}">
          <st:include page="${descriptor.globalConfigPage}" from="${descriptor}" />
        </f:rowSet>
      </j:forEach>

      <j:if test="${!empty(h.getCloudDescriptors())}">
        <f:section title="${%Cloud}">
          <f:block>
            <f:hetero-list name="cloud" hasHeader="true"
                           descriptors="${h.getCloudDescriptors()}"
                           items="${it.clouds}"
                           addCaption="${%Add a new cloud}"
                           deleteCaption="${%Delete cloud}"/>
          </f:block>
        </f:section>
      </j:if>

      <f:block>
        <f:submit value="${%Save}" />
      </f:block>
    </f:form>
  </l:main-panel>
</l:layout>
</j:jelly>

Back to the top