summaryrefslogtreecommitdiffstats
path: root/webui_templates/profile_edit.tmpl
blob: 547ad0d80f623fb39027c420c46d9e85114e4023 (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
#extends cobbler.webui.master
#block body

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

<form method="post" action="$base_url/profile_save">
<fieldset id="cform">

<!--
       cobbler profile add -name=string -distro=string [-kickstart=url]
       [-kopts=string] [-ksmeta=string] [-virt-file-size=gigabytes]
       [-virt-ram=megabytes] [-virt-type=string] [-virt-path=string]
-->

    #if $profile
        <legend>Editing Profile</legend>
        <input type="hidden" name="new_or_edit" value="edit"/>
        <input type="hidden" name="oldname" value="$profile.name"/>
    #else
        <legend>Adding a Profile</legend>
        <input type="hidden" name="new_or_edit" value="new"/>
    #end if

    #if $profile
        #if $profile.distro == "<<inherit>>"
            #set $subprofile = 1
            <input type="hidden" name="subprofile" value="1"/> 
        #else
            #set $subprofile = 0
            <input type="hidden" name="subprofile" value="0"/> 
        #end if
    #else
        <input type="hidden" name="subprofile" value="$subprofile"/> 
    #end

    <table border=0>

    <tr>
    <td>
    <label for="name">Profile Name</label>
    </td>
    <td>
    #if $profile
    <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 $profile
            value="$profile.name"
        #end if
    />
    <p class="context-tip">Example:  RHEL-5-i386-webserver</p>
    </td>
    </tr>

    #if $profile
    <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>
    #end if

    #if $subprofile
       <tr>
       <td>
       <label for="distro">Parent</label>
       </td>
       <td>
       <select name="parent" id="parent">
           #for $parentobj in $profiles:
           <option name="$parentobj.name"
               #if $profile and $profile.parent == $parentobj.name
                   selected="true"
               #end if
           >$parentobj.name
       </option>
       #end for
       </select>
       <p class="context-tip">Inherit parameters from what profile?</p>
       </td>
       </tr>
    #else
       <tr>
       <td>
       <label for="distro">Distribution</label>
       </td>
       <td>
       <select name="distro" id="distro">
           #for $distro in $distros:
           <option name="$distro.name"
               #if $profile and $profile.distro == $distro.name
                   selected="true"
               #end if
           >$distro.name
       </option>
       #end for
       </select>
       <p class="context-tip">What OS is this profile based on?</p>
       </td>
       </tr>
    #end

    <!-- should allow freeform input but still show a list of choices? -->
    <!-- probably should implement a combo box eventually -->

    <tr>
    <td>
    <label for="kickstart">Kickstart File</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="kickstart" id="kickstart"
        #if $profile
            value="$profile.kickstart" 
        #end if
    />
    <p class="context-tip">An absolute filesystem path to a template (preferred), or http:// URL</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="kopts">Kernel Options</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="kopts" id="kopts"
        #if $profile
            value="$profile.kernel_options"
        #end if
    />
    <p class="context-tip">Example: noipv6 magic=foo</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="ksmeta">Kickstart Metadata</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="ksmeta" id="ksmeta"
        #if $profile
           value="$profile.ks_meta"
        #end if
    />
    <p class="context-tip">Example: dog=fido gnome=yes</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="virtfilesize">Virt Disk (GB)</label>
    </td>
    <td>
    <input type="text" size="5" style="width: 150px;" name="virtfilesize" id="virtfilesize"
        #if $profile
           value="$profile.virt_file_size"
        #end if
    />
    <p class="context-tip">For virtual installs only, require this disk size in GB.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="virtram">Virt RAM (MB)</label>
    </td>
    <td>
    <input type="text" size="5" style="width: 150px;" name="virtram" id="virtram"
        #if $profile
           value="$profile.virt_ram"
        #end if
    />
    <p class="context-tip">For virtual installs only, allocate this amount of RAM, in MB.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="virttype">Virt Type</label>
    </td>
    <td>
    #if $profile and $profile.virt_type == "auto"
        <input type="radio" name="virttype" id="virttype" value="auto" checked>Any
    #else
        #if $profile
            <input type="radio" name="virttype" id="virttype" value="auto">Any
        #else
            <input type="radio" name="virttype" id="virttype" value="auto" checked>Any
        #end if 
    #end if
    #if $profile and $profile.virt_type == "xenpv"
        <input type="radio" name="virttype" id="virttype" value="xenpv" checked>Xen (pv)
    #else
        <input type="radio" name="virttype" id="virttype" value="xenpv">Xen (pv)
    #end if
    #if $profile and $profile.virt_type == "qemu"
        <input type="radio" name="virttype" id="virttype" value="qemu" checked>qemu/KVM
    #else
        <input type="radio" name="virttype" id="virttype" value="qemu">qemu/KVM
    #end if
    <p class="context-tip">What virtualization technology should koan use?</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="virtpath">Virt Path</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="virtpath" id="virtpath"
        #if $profile
           value="$profile.virt_path"
        #end if
    />
    <p class="context-tip">Sets koan's storage preferences, read manpage or leave blank.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="virtpath">Virt Bridge</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="virtbridge" id="virtbridge"
        #if $profile
           value="$profile.virt_bridge"
        #end if
    />
    <p class="context-tip">Overrides the virtual networking bridge choice in settings.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="virtpath">Virt CPUs</label>
    </td>
    <td>
    <input type="text" size="255" style="width: 150px;" name="virtcpus" id="virtcpus"
        #if $profile
           value="$profile.virt_cpus"
        #end if
    />
    <p class="context-tip">How many virtual CPUs?  This is an integer.</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="repos">Yum Repos</label>
    </td>
    <td>

    <select name="repos" id="repos" multiple="1">
    <option value="--none--"> -- none -- </option>
    #for $repo in $repos:
        <option value="$repo.name"
            #if $profile and $repo.name in $profile.repos
                selected="1"
            #end if
        >$repo.name</option>
    #end for 
    </select>
    <p class="context-tip">Select one or many additional repos to automatically assign to the target system.   (this is a good place to include an updates repo)</p>
    </td>
    </tr>

    <tr>
    <td>
    <label for="dhcptag">DHCP Tag</label>
    </td>
    <td>
    <input type="text" size="128" style="width: 150px;" name="dhcptag" id="dhcptag"
        #if $profile
           value="$profile.dhcp_tag" 
        #end if
    />
    <p class="context-tip">Specifies alternative DHCP configuration, see manpage or leave blank</p>
    </td>
    </tr>

    #if $profile
    <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

    <tr>
    <td>
    </td>
    <td>
    <input type="submit" name="submit" value="Save"/>
    <input type="reset" name="reset" value="Reset"/>
    </td>
    </tr>

</fieldset>
#end block body