16
37
<style type=text/css>
17
#for $interface in $interfaces
18
div#ipaddr${interface.id}{
38
{% for interface in interfaces %}
39
div#ipaddr{{ interface.0.id }}{
27
48
<form name="hostdata" action="?sub=true" method="post">
28
<input type="hidden" name="host" value="$host.id">
49
<input type="hidden" name="host" value="{{ host.id }}">
29
50
<table border="0" width="100%">
33
54
<tr> <td> <b>hostname</b></td>
34
<td> <input name="hostname" type="text" value="$host.hostname"></td></tr>
55
<td> <input name="hostname" value="{{ host.hostname }}"></td></tr>
35
56
<tr> <td> <b>whatami</b></td>
37
58
<select name="whatami">
38
#for $choice in $host.WHATAMI_CHOICES
39
#if $host.whatami == $choice[0]
40
<option value="$choice[0]" selected="selected">$choice[1]
42
<option value="$choice[0]">$choice[1]
59
{% for choice in host.WHATAMI_CHOICES %}
60
{% ifequal host.whatami choice.0 %}
61
<option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
63
<option value="{{ choice.0 }}">{{ choice.1 }}
45
66
</select></td></tr>
46
67
<tr> <td> <b>netgroup</b></td>
48
69
<select name="netgroup">
49
#for $choice in $host.NETGROUP_CHOICES
50
#if $host.netgroup == $choice[0]
51
<option value="$choice[0]" selected="selected">$choice[1]
53
<option value="$choice[0]">$choice[1]
70
{% for choice in host.NETGROUP_CHOICES %}
71
{% ifequal host.netgroup choice.0 %}
72
<option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
74
<option value="{{ choice.0 }}">{{ choice.1 }}
58
79
<tr> <td> <b>class</b></td>
60
81
<select name="security_class">
61
#for $choice in $host.CLASS_CHOICES
62
#if $host.security_class == $choice[0]
63
<option value="$choice[0]" selected="selected">$choice[1]
65
<option value="$choice[0]">$choice[1]
82
{% for choice in host.CLASS_CHOICES %}
83
{% ifequal host.security_class choice.0 %}
84
<option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
86
<option value="{{ choice.0 }}">{{ choice.1 }}
68
89
</select></td></tr>
69
90
<tr> <td> <b>support</b></td>
71
92
<select name="support">
72
#for $choice in $host.SUPPORT_CHOICES
73
#if $host.support == $choice[0]
74
<option value="$choice[0]" selected="selected">$choice[1]
76
<option value="$choice[0]">$choice[1]
93
{% for choice in host.SUPPORT_CHOICES %}
94
{% ifequal host.support choice.0 %}
95
<option value="{{ choice.0 }}" selected="selected">{{ choice.1 }}
97
<option value="{{ choice.0 }}">{{ choice.1 }}
79
100
</select></td></tr>
80
101
<tr> <td> <b>csi</b></td>
81
<td> <input name="csi" type="text" value="$host.csi"></td></tr>
102
<td> <input name="csi" type="text" value="{{ host.csi }}"></td></tr>
82
103
<tr> <td> <b>printq</b></td>
83
<td> <input name="printq" type="text" value="$host.printq"></td></tr>
84
<tr> <td> <b>dhcp</b></td>
87
<input type="checkbox" checked="checked" name="dhcp"></td></tr>
89
<input type="checkbox" name="dhcp"></td></tr>
104
<td> <input name="printq" type="text" value="{{ host.printq }}"></td></tr>
91
105
<tr> <td> <b>outbound_smtp</b></td>
93
#if $host.outbound_smtp
107
{% if host.outbound_smtp %}
94
108
<input type="checkbox" checked="checked" name="outbound_smtp"></td></tr>
96
110
<input type="checkbox" name="outbound_smtp"></td></tr>
98
112
<tr> <td> <b>primary_user</b></td>
99
<td> <input name="primary_user" type="text" size="32" value="$host.primary_user"></td></tr>
113
<td> <input name="primary_user" type="text" size="32" value="{{ host.primary_user }}"></td></tr>
100
114
<tr> <td> <b>administrator</b></td>
101
<td> <input name="administrator" type="text" size="32" value="$host.administrator"></td></tr>
115
<td> <input name="administrator" type="text" size="32" value="{{ host.administrator }}"></td></tr>
102
116
<tr> <td> <b>location</b></td>
103
<td> <input name="location" type="text" value="$host.location"></td></tr>
117
<td> <input name="location" type="text" value="{{ host.location }}"></td></tr>
104
118
<tr> <td> <b>expiration_date</b></td>
105
<td> <input name="expiration_date" type="text" value="$host.expiration_date"> YYYY-MM-DD</td></tr>
106
#for $interface in $interfaces
119
<td> <input name="expiration_date" type="text" value="{{ host.expiration_date }}"> YYYY-MM-DD</td></tr>
120
{% for interface in interfaces %}
107
121
<tr> <td><br><b>Interface</b>
109
#for $choice in $interface.TYPE_CHOICES
110
#if $interface.hdwr_type == $choice[0]
111
<input type="radio" name="hdwr_type$interface.id" value="$choice[0]" checked="checked">$choice[1]
113
<input type="radio" name="hdwr_type$interface.id" value="$choice[0]">$choice[1]
123
{% for choice in interface.0.TYPE_CHOICES %}
124
{% ifequal interface.0.hdwr_type choice.0 %}
125
<input type="radio" name="hdwr_type{{ interface.0.id }}" value="{{ choice.0 }}" checked="checked">{{ choice.1 }}
127
<input type="radio" name="hdwr_type{{ interface.0.id }}" value="{{ choice.0 }}">{{ choice.1 }}
131
<tr> <td> <b>dhcp</b></td>
133
{% if interface.0.dhcp %}
134
<input type="checkbox" checked="checked" name="dhcp{{ interface.0.id }}"></td></tr>
136
<input type="checkbox" name="dhcp{{ interface.0.id }}"></td></tr>
117
138
<tr> <td> <b>mac_addr</b></td>
118
<td> <input name="mac_addr$interface.id" type="text" value="$interface.mac_addr">
119
<a style="font-size:75%" href="/hostbase/$host.id/interface/${interface.id}/confirm">remove</a>
139
<td> <input name="mac_addr{{ interface.0.id }}" type="text" value="{{ interface.0.mac_addr }}">
140
<a style="font-size:75%" href="/hostbase/{{ host.id }}/interface/{{ interface.0.id }}/confirm">remove</a>
121
#for $ip in $ips[$interface.id]
142
{% for ip in interface.1 %}
122
143
<tr> <td> <b>ip_addr</b>
124
<td> <input name="ip_addr${ip.id}" type="text" value="$ip.ip_addr">
125
<a style="font-size:75%" href="/hostbase/$host.id/ip/${ip.id}/confirm">remove
145
<td> <input name="ip_addr{{ ip.id }}" type="text" value="{{ ip.ip_addr }}">
146
<a style="font-size:75%" href="/hostbase/{{ host.id }}/ip/{{ ip.id }}/confirm">remove
129
150
<!-- Section for adding a new IP address to an existing interface -->
130
151
<!-- By default, section is hidden -->
132
<div id=ipaddr${interface.id}>
153
<div id=ipaddr{{ interface.0.id }}>
133
154
<table border="0" width="100%">
135
156
<col width="150">
137
158
<tr> <td> <b>ip_addr</b></td>
138
<td> <input name="${interface.id}ip_addr" type="text"></td></tr>
159
<td> <input name="{{ interface.0.id }}ip_addr" type="text"></td></tr>
141
<a style="font-size:75%" href=# onclick="toggleAddr($interface.id)">Add a New IP Address</a>
162
<a style="font-size:75%" href=# onclick="toggleAddr({{ interface.0.id }})">Add a New IP Address</a>
142
163
<table border="0" width="100%">
144
165
<col width="150">
147
168
<!-- End section for new IP address -->
149
170
<!-- Section for add an entirely new interface to a host -->