summaryrefslogtreecommitdiffstats
path: root/webui_templates/repo_edit.tmpl
blob: 62f0e9ed4f56ba44117d403f04384a773951a8c5 (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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#extends cobbler.webui.master
#block body

#import time

#if $repo
<script language="javascript">
function disablename(value)
{
   document.getElementById("name").disabled=value;
   if (value) {
       document.getElementById("name").value = "$repo.name";
   }
}
</script>
#end if

#if $editable != True
#set global $owners = $repo.owners
#include "/usr/share/cobbler/webui_templates/enoaccess.tmpl"
#end if

<form method="post" action="$base_url?mode=repo_save">
<fieldset id="cform">

    #if $repo
        <legend>Editing Repo</legend>
        <input type="hidden" name="new_or_edit" value="edit"/>
        <input type="hidden" name="oldname" value="$repo.name"/>
    #else
        <legend>Adding a Repo</legend>
        <input type="hidden" name="new_or_edit" value="new"/>
    #end if
 
    <table border=0>
    
    <tr>
    <td>
    <label for="name">Name</label>
    </td>
    <td>
    #if $repo
    <input type="text" size="128" style="width: 150px;" name="name" id="name" disabled="true"
    #else
    <input type="text" size="128" style="width: 150px;" name="name" id="name"
    #end if
        #if $repo
            value="$repo.name"
        #end if
    />
    <p class="context-tip">Example: EL-5-i386-EPEL-testing</p>
    </td>
    </tr>

    #if $repo
    <tr>
    <td>
    <label for="mode">Edit Mode</label>
    </td>
    <td>
    <input type="radio" name="editmode" value="edit" checked onclick="javascript:disablename(true)">Edit
    <input type="radio" name="editmode" value="rename" onclick="javascript:disablename(false)">Rename + Edit
    <input type="radio" name="editmode" value="copy" onclick="javascript:disablename(false)">Copy + Edit
    <p class="context-tip">How do you want to modify this object?</p>
    </td>
    </tr>
    #else
    <input type="hidden" name="editmode" value="new"/>
    #end if

    #if $repo
    <tr>
    <td>
    <label>Created</label>
    </td>
    <td>
    $time.ctime($repo.ctime)
    </td>
    </tr>

    <tr>
    <td>
    <label>Last Modified</label>
    </td>
    <td>
    $time.ctime($repo.mtime)
    </td>
    </tr>
    #end if

    <tr>
    <td>
    <label for="comment">Comment</label>
    </td>
    <td>
    #if $repo
       #set $comm = $repo.comment
    #else
       #set $comm = ""
    #end if
    <textarea rows="5" cols="30" 400px;" name="comment" id="comment">$comm</textarea>
    <p class="context-tip">This is a free-form description field</p>
    </td>
    </tr>


    <tr>
    <td>
    <label for="mirror">Mirror Location (http/ftp/rsync)</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 400px;" name="mirror" id="mirror"
        #if $repo
            value="$repo.mirror"
        #end if
    />
    <p class="context-tip">Full and EXACT url path (see docs).  Can be http://, ftp://, local, or rsync://</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="keep_updated">Keep Updated</label>
    </td>
    <td>
    <input type="checkbox" name="keep_updated" id="keep_updated" 
        #if $repo 
            #if str($repo.keep_updated) != "False"
                checked="true"  
            #end if
        #else
            checked="true"
        #end if
    />
    <p class="context-tip">Uncheck to prevent the mirror from being updated again.</p>    
    </td>
    </tr>
    <br/>

    <tr>
    <td>
    <label for="keep_updated">Mirror Locally</label>
    </td>
    <td>
    <input type="checkbox" name="mirror_locally" id="mirror_locally" 
        #if $repo 
            #if str($repo.mirror_locally) != "False"
                checked="true"
            #end if
        #else
                checked="true"
        #end if
    />
    <p class="context-tip">Uncheck to reference the repository directly instead of mirroring.</p>
    </td>
    </tr>
    <br/>

    <tr>
    <td>
    <label for="priority">Priority</label>
    </td>
    <td>
    <input type="text" size="512" style="width: 150px;" name="priority" id="priority"
        #if $repo
            value="$repo.priority"
        #end if
    />
    <p class="context-tip">Repo priority, if using yum priorities plugin of target (99=default) </p>
    </td>
    </tr>
    <br/>

    ## FIXME: input field sizes should be larger (universally)
    ## FIXME: make this a text area?

    <tr>
    <td>
    <label for="rpm_list">RPM List</label>
    </td>
    <td>
    <input type="text" size="512" style="width: 400px;" name="rpm_list" id="rpm_list"
        #if $repo
            value="$repo.rpm_list"
        #end if
    />
    <p class="context-tip">Blank, or a list of specific RPMs (and only those RPMs) to mirror, space delimited.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="createrepo_flags">Createrepo flags</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="creatrepoflags" id="createrepoflags"
        #if $repo
            value="$repo.createrepo_flags"
        #end if
    />
    <p class="context-tip">Additional flags to pass to yum's createrepo if http or ftp.</p>
    </td>
    </tr>


    <tr>
    <td>
    <label for="arch">Architecture</label>
    </td>
    <td>
    #if $repo and $repo.arch == "i386"
        <input type="radio"  name="arch" id="arch" value="i386" checked>x86
    #else
        <input type="radio" name="arch" id="arch" value="i386">i386
    #end if
    #if $repo and $repo.arch == "x86_64"
        <input type="radio" name="arch" id="arch" value="x86_64" checked>x86_64
    #else
        <input type="radio" name="arch" id="arch" value="x86_64">x86_64
    #end if
    #if $repo and $repo.arch == "ppc"
        <input type="radio" name="arch" id="arch" value="ppc" checked>ppc
    #else
        <input type="radio" name="arch" id="arch" value="ppc">ppc
    #end if
    #if $repo and $repo.arch == "ppc64"
        <input type="radio" name="arch" id="arch" value="ppc64" checked>ppc64
    #else
        <input type="radio" name="arch" id="arch" value="ppc64">ppc64
    #end if
    #if $repo and $repo.arch == "s390"
        <input type="radio" name="arch" id="arch" value="s390" checked>s390
    #else
        <input type="radio" name="arch" id="arch" value="s390">s390
    #end if
    #if $repo and $repo.arch == "s390x"
        <input type="radio" name="arch" id="arch" value="s390x" checked>s390x
    #else
        <input type="radio" name="arch" id="arch" value="s390x">s390x
    #end if
    #if $repo and $repo.arch == "ia64"
        <input type="radio" name="arch" id="arch" value="ia64" checked>ia64
    #else
        <input type="radio" name="arch" id="arch" value="ia64">ia64
    #end if
    #if $repo and $repo.arch == "noarch"
        <input type="radio" name="arch" id="arch" value="noarch" checked>noarch
    #else
        <input type="radio" name="arch" id="arch" value="noarch">noarch
    #end if
    #if $repo and $repo.arch == "src"
        <input type="radio" name="arch" id="arch" value="src" checked>src
    #else
        <input type="radio" name="arch" id="arch" value="src">src
    #end if



    <p class="context-tip">What architecture is the repo?</p>                      
    </td>
    </tr>


    <tr>
    <td>
    <label for="yumopts">Yum options</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="yumopts" id="yumopts" 
        #if $repo
            value="$repo.yumopts" 
        #end if
    />
    <p class="context-tip">Sets specific yum plugin parameters on the installed system.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="environment">Environment</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="environment" id="environment" 
        #if $repo
            value="$repo.environment" 
        #end if
    />
    <p class="context-tip">Sets environment variables for each rsync/reposync operation.</p>
    </td>
    </tr>


    <tr>
    <td>
    <label for="owners">Access Allowed For</label>
    </td>
    <td>
    #if $repo
       #set ownerslist = ' '.join($repo.owners)
    #end if
    <input type="text" size="255" style="width: 400px;" name="owners" id="owners"
        #if $repo
            value="$ownerslist"
        #else
            value="$user"
        #end if
    />
    <p class="context-tip">Applies only if using authz_ownership module, space delimited</p>
    </td>
    </tr>


    #if $repo and $editable == True
    <tr>
    <td>
    <label for="delete">Delete</label>
    </td>
    <td>
       <input type="checkbox" name="delete1" value="delete1">Yes
       <input type="checkbox" name="delete2" value="delete2">Really
    <p class="context-tip">Check both buttons and click save to delete this object.</p>
    </td>
    </tr>
    #end if

    #if $editable == True
    <tr>
    <td>
    </td>
    <td>
    <input type="submit" name="submit" value="Save"/>
    <input type="reset" name="reset" value="Reset"/>
    </tr>
    #end if
 
</table>
</fieldset>
</form>
<br/>    

<blockquote>
Note:  Newly added repo definitions will not be usable until
"cobbler reposync" is run from the command line on this system.
Placing "cobbler reposync" on a crontab is recommended procedure.
</blockquote>

<br/>
#end block body