summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Hostbase/hostbase/webtemplates/edit.html
blob: 71ca621a1302cd62054159b3a72bebdd17acc954 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><!-- InstanceBegin template="/Templates/publicFull.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<link href="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/stylesheets/argonne.css" rel="stylesheet" type="text/css">
<link href="http://www.anl.gov/favicon.ico" rel="SHORTCUT ICON">
<script language="JavaScript" src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/javascript/anlmain.js" type="text/JavaScript"></script>
<script language="JavaScript" src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/javascript/stm31.js" type="text/JavaScript"></script>
<!-- InstanceBeginEditable name="head" -->
<!-- Insert page specific head elements in this region, including custom javascript -->
<!-- TemplateBeginEditable name="head" -->
<script language="JavaScript" src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/javascript/main.js" type="text/JavaScript"></script>
<!-- TemplateEndEditable --><!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="title" -->
<title></title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="metadata" -->
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="classification" content="">
<meta name="author" content="Argonne National Laboratory">
<meta name="expires" content="">
<!-- InstanceEndEditable -->
<!-- InstanceParam name="Contact URL" type="URL" value="../about/contacts.html" --><!-- InstanceParam name="Sitemap URL" type="URL" value="../Division/sitemap.html" --><!-- InstanceParam name="Search URL" type="URL" value="../About/search.html" --><!-- InstanceParam name="enableOptionalSponsorLogos" type="boolean" value="true" --><!-- InstanceParam name="enableNavBarTabs" type="boolean" value="true" --><!-- InstanceParam name="enableNavBarSearch" type="boolean" value="false" --><!-- InstanceParam name="enableOptionalSitemapFooter" type="boolean" value="false" --><!-- InstanceParam name="enableOptionalSearchFooter" type="boolean" value="false" -->
</head>
<body> 
<table width="100%" border="0" cellpadding="0" cellspacing="3"> 
  <tr> 
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr class="headerBkgd" valign="middle">
        <td width="10"><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" height="10" width="10" border="0" alt=""></td>
        <td width="300" align="left"><a href="http://www.anl.gov"><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/argonne_header_logo.jpg" alt="Argonne National Laboratory" width="227" height="100" border="0"></a></td>
        <td><span class="sectionTitle"><!-- InstanceBeginEditable name="divisionProgramIdentity" --><img src="http://www-unix.mcs.anl.gov/hostbaseweb/images/mcs_logo_white_minus_logo_small.png" width="92" height="31"><br>
                <a href="http://www.mcs.anl.gov">Mathematics
                and Computer Science </a><!-- InstanceEndEditable --></span></td>
      </tr>
    </table></td> 
  </tr> 
  <tr> 
    <td> <table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
         
        <tr> <!-- InstanceBeginRepeat name="localNavigation" --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" --> <a href="http://www.mcs.anl.gov">About
                  Us</a> <!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" --><a href="http://www-fp.mcs.anl.gov/division/research/">Research</a><!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" --> <a href="../research/index.html"></a><a href="http://www-fp.mcs.anl.gov/division/resources/">Facilities</a> <!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" --><a href="http://www-fp.mcs.anl.gov/division/people/">Staff</a><!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" -->
		  	<a href="http://www-fp.mcs.anl.gov/division/software/">Software</a> <!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" -->
		  	<a href="http://www-fp.mcs.anl.gov/division/collaboration">Collaborations </a>
          <!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry --> 
          <td nowrap class="navGlobalBkgd"><span class="navGlobal"><!-- InstanceBeginEditable name="localNavigationItem" -->
		  	<a href="http://www-fp.mcs.anl.gov/division/information/">Information</a>
          <!-- InstanceEndEditable --></span></td>
          <td width="3" nowrap><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="3" height="1" border="0" alt=""></td> 
          <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->  
         
        <td class="navGlobalBkgd" width="50%"><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/spacer.gif" width="1" height="30" border="0" alt=""></td> 
           </tr> </table> 
      <!-- #EndLibraryItem --></td> 
  </tr> 
  <tr> 
    <td class="greyBkgdLight"><span class="breadcrumbs"><a href="http://www.mcs.anl.gov/">MCS
          Home</a> &gt; <!-- InstanceBeginEditable name="topLevelBreadcrumbs" --> 
          <script language="JavaScript">breadCrumbs("www-unix.mcs.anl.gov/new",">","","breadcrumbs","None","None","0");</script>
          <!-- InstanceEndEditable --></span></td>
  </tr> 
  <tr valign="top"> 
    <td nowrap><table width="100%" border="0" cellpadding="5" cellspacing="0"> 
        <tr> 
          <td><!-- InstanceBeginEditable name="mainFeature" --> 
<script language=JavaScript type=text/Javascript>
function toggleAddr(interface_id){
   if(document.getElementById){
      var style = document.getElementById('ipaddr'+interface_id).style;
      style.display = style.display? "":"block";
   }
}
function toggleInter(){
   if(document.getElementById){
      var style = document.getElementById('interface').style;
      style.display = style.display? "":"block";
   }
}
</script>

<style type=text/css>
#for $interface in $interfaces
div#ipaddr${interface.id}{
   display: none;
}
<!-- 
#for $ip in $ips[$interface.id]
div#dns${ip.id}{
   display: none;
}
#end for
-->
#end for
div#interface{
   display: none;
}
</style>

#set $cont = 1

#if $request.GET.has_key('sub')
ok, submitted
#end if

#if $cont
<form name="hostdata" action="?sub=true" method="post">
<input type="hidden" name="host" value="$host.id">
<table border="0" width="100%">
   <colgroup>
   <col width="150">
   <col width="*">
   <tr> <td> <b>hostname</b></td>
   <td> <input name="hostname" type="text" value="$host.hostname"></td></tr>
   <tr> <td> <b>whatami</b></td>
   <td> <input name="whatami" type="text" value="$host.whatami"></td></tr>
   <tr> <td> <b>netgroup</b></td>
   <td>
   <select name="netgroup">
   #for $choice in $host.NETGROUP_CHOICES
       #if $host.netgroup == $choice[0]
           <option value="$choice[0]" selected="selected">$choice[1]
       #else
           <option value="$choice[0]">$choice[1]
       #end if
   #end for
   </select>
   </td></tr>
   <tr> <td> <b>class</b></td>
   <td>
   <select name="security_class">
   #for $choice in $host.CLASS_CHOICES
       #if $host.security_class == $choice[0]
           <option value="$choice[0]" selected="selected">$choice[1]
       #else
           <option value="$choice[0]">$choice[1]
       #end if
   #end for
   </select></td></tr>
   <tr> <td> <b>support</b></td>
   <td>
   <select name="support">
   #for $choice in $host.SUPPORT_CHOICES
       #if $host.support == $choice[0]
           <option value="$choice[0]" selected="selected">$choice[1]
       #else
           <option value="$choice[0]">$choice[1]
       #end if
   #end for
   </select></td></tr>
   <tr> <td> <b>csi</b></td>
   <td> <input name="csi" type="text" value="$host.csi"></td></tr>
   <tr> <td> <b>printq</b></td>
   <td> <input name="printq" type="text" value="$host.printq"></td></tr>
   <tr> <td> <b>dhcp</b></td>
   <td>
   #if $host.dhcp
       <input type="checkbox" checked="checked" name="dhcp"></td></tr>
   #else
       <input type="checkbox" name="dhcp"></td></tr>
   #end if   
   <tr> <td> <b>outbound_smtp</b></td>
   <td>
   #if $host.outbound_smtp
       <input type="checkbox" checked="checked" name="outbound_smtp"></td></tr>
   #else
       <input type="checkbox" name="outbound_smtp"></td></tr>
   #end if   
   <tr> <td> <b>primary_user</b></td>
   <td> <input name="primary_user" type="text" size="32" value="$host.primary_user"></td></tr>
   <tr> <td> <b>administrator</b></td>
   <td> <input name="administrator" type="text" size="32" value="$host.administrator"></td></tr>
   <tr> <td> <b>location</b></td>
   <td> <input name="location" type="text" value="$host.location"></td></tr>
   <tr> <td> <b>expiration_date</b></td>
   <td> <input name="expiration_date" type="text" value="$host.expiration_date"> YYYY-MM-DD</td></tr>
   #for $interface in $interfaces
       <tr> <td><br><b>Interface</b>
       </td><td><br>
       #for $choice in $interface.TYPE_CHOICES
           #if $interface.hdwr_type == $choice[0]
               <input type="radio" name="hdwr_type$interface.id" value="$choice[0]" checked="checked">$choice[1]
           #else
               <input type="radio" name="hdwr_type$interface.id" value="$choice[0]">$choice[1]
           #end if
       #end for
       </td></tr>
       <tr> <td> <b>mac_addr</b></td>
       <td> <input name="mac_addr$interface.id" type="text" value="$interface.mac_addr">
       <a style="font-size:75%" href="/hostbase/$host.id/interface/${interface.id}/confirm">remove</a>
       </td></tr>
       #for $ip in $ips[$interface.id]
           <tr> <td> <b>ip_addr</b>
	   </td>
           <td> <input name="ip_addr${ip.id}" type="text" value="$ip.ip_addr">
	   <a style="font-size:75%" href="/hostbase/$host.id/ip/${ip.id}/confirm">remove
	   </a></td></tr>
       #end for

<!-- Section for adding a new IP address to an existing interface -->
<!-- By default, section is hidden -->
       </table>
       <div id=ipaddr${interface.id}>
       <table border="0" width="100%">
           <colgroup>
           <col width="150">
           <col width="*">
           <tr> <td> <b>ip_addr</b></td>
           <td> <input name="${interface.id}ip_addr" type="text"></td></tr>
       </table>
       </div>
       <a style="font-size:75%" href=# onclick="toggleAddr($interface.id)">Add a New IP Address</a>
       <table border="0" width="100%">
           <colgroup>
               <col width="150">
	       <col width="*">
   #end for
<!--  End section for new IP address -->

<!-- Section for add an entirely new interface to a host -->
<!-- By default, section is hidden -->
   </table>
   <div id=interface>
   <table border="0" width="100%">
       <colgroup>
       <col width="150">
       <col width="*">
   <tr> <td><br><b>Interface</b></td><td><br>
   #for $choice in $type_choices
   <input type="radio" name="hdwr_type_new" value="$choice[0]">$choice[1]
   #end for
   </td></tr>
   <tr> <td> <b>mac_addr</b></td>
   <td> <input name="mac_addr_new" type="text"></td></tr>
   <tr> <td> <b>ip_addr</b></td>
   <td> <input name="ip_addr_new" type="text"></td></tr>
</table>
</div>
<a style="font-size:75%" href=# onclick="toggleInter()">Add a New Interface</a>
<!-- End new interface section -->


<table border="0" width="100%">
   <colgroup>
   <col width="150">
   <col width="*">
<tr> <td> <b>comments</b></td>
<td> <textarea rows="10" cols="50" name="comments">$host.comments</textarea></td></tr>
</table>
<a style="font-size:75%" href="/hostbase/$host.id/dns/edit">edit detailed DNS information for this host</a>
<br>
this host is 
<select name="status">
#for $choice in $host.STATUS_CHOICES
#if $host.status == $choice[0]
<option value="$choice[0]" selected="selected">$choice[1]
#else
<option value="$choice[0]">$choice[1]
#end if
#end for
</select><br>
last update on $host.last<br>
<p><input type="submit" value="Submit">
</form>
#end if
            <!-- InstanceEndEditable --></td> 
        </tr> 
    </table></td>
  </tr> 
  <tr valign="top"> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
        <tr> 
          <td colspan="2" align="left"><hr size="1"></td> 
        </tr> 
        <tr valign="top"> 
          <td colspan="2" align="center"><table border="0" cellspacing="0" cellpadding="5">
            <tr>
              <td><a href="http://www.doe.gov/"><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/logos/footer_doe.gif" alt="U.S. Department of Energy" width="153" height="35" border="0"></a></td>
              <td><a href="http://www.uchicago.edu/"><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/logos/footer_uofc.gif" alt="The University of Chicago" width="125" height="34" border="0"></a></td>
              
              <td><!-- InstanceBeginEditable name="sponsorLogos" --><!-- #BeginLibraryItem "/Library/logoOfficeOfScience.lbi" --><a href="http://www.sc.doe.gov/"><img src="http://www-unix.mcs.anl.gov/hostbaseweb/anl_templates/images/logos/footer_doe_science.gif" alt="Office of Science - Department of Energy" width="143" height="31" border="0"></a><!-- #EndLibraryItem --><!-- InstanceEndEditable --></td>
             </tr>
          </table></td> 
        </tr> 
        <tr> 
          <td colspan="2" align="center"> <table cellspacing="0" cellpadding="2" border="0"> 
              <tr> 
                <td class="footerText"><a href="http://www.anl.gov/notice.html">Privacy &amp; Security Notice</a>&nbsp;|&nbsp;<a href="http://www.anl.gov/Administration/contactus.html">Contact Us</a></td> 
              </tr> 
            </table></td> 
        </tr> 
      </table></td> 
  </tr> 
</table> 
</body>
<!-- InstanceEnd --></html>