source: trunk/templates/edit.tmpl@ 682

Last change on this file since 682 was 675, checked in by Kris Deugau, 10 years ago

/trunk

Extend per-IP rDNS through the "confirm add" page and the "edit" page. See #1.

  • Add flag in getBlockRDNS return to indicate if the results are from local caching instead of RPC results. There isn't really a clear way to globally flag "RPC server is up".
  • Add a sub to retrieve per-IP reverse DNS information for a passed CIDR range. Not limited in IPDB.pm, but dnsadmin will refuse to return anything for a block larger than /24 (v4) or /120 (v6) - an 8 bit inverse mask.
  • Use the new sub on editing a small(ish) non-pool block. CSS magic notwithstanding, handling more than 32 IPs in a list like this is awkward.
File size: 5.1 KB
RevLine 
[512]1<TMPL_IF webpath></TMPL_IF>
[469]2<div class="indent">
3<div class="heading">Edit the information below</div>
4
[470]5<table cellpadding="0" cellspacing="0">
[469]6<tr>
7<td>
8
9<TMPL_IF maychange>
10<form method="POST" action="main.cgi">
[513]11<fieldset><legend class="noshow">&nbsp;</legend>
[469]12<input type="hidden" name="action" value="update">
[634]13<input type="hidden" name="block" value="<TMPL_VAR NAME=id>">
[469]14</TMPL_IF>
15
[470]16<table cellspacing="1">
[469]17
18<tr class="row0">
19<td class=heading>IP block:</td>
20<td class="regular"><TMPL_VAR NAME=block></td>
21</tr>
22
23<tr class="row1">
[675]24<td class="heading">Reverse DNS:</td>
[586]25<td class="regular">
[675]26Pattern: <TMPL_IF maychange>
[586]27<input type="text" name="rdns" size="40" value="<TMPL_VAR NAME=rdns>">
28<TMPL_ELSE>
29<TMPL_VAR NAME=rdns>
30</TMPL_IF>
31<input type="button" value=" ? " onclick="helpRDNS()" class="regular">
[675]32<TMPL_IF cached>(cached)</TMPL_IF>
33<TMPL_IF r_iplist>
34<div class="rdns revdata">
35<ul class="collapsible notalist">
36<li>
37<label for="per-iplist">Per-IP reverse entries (click to show) <img src="<TMPL_VAR NAME=webpath>/images/tree_open.png"></label>
38<input type="checkbox" id="per-iplist" />
39<ul class="notalist">
40<li>
41<table>
42<TMPL_LOOP name="r_iplist">
43<tr>
44<td><TMPL_VAR NAME=r_ip></td>
45<td><input class="host" name="host_<TMPL_VAR NAME=r_ip>" value="<TMPL_VAR NAME=iphost>"></td>
46</tr>
47</TMPL_LOOP>
48</table>
49</li>
50</ul>
51</li>
52</ul>
53</div>
54</TMPL_IF>
[586]55</td>
56</tr>
57
58<tr class="row0">
[469]59<td class=heading>City:</td>
60<td class="regular">
61<TMPL_IF maychange>
62<input type=text name=city value="<TMPL_VAR NAME=city>">
63<TMPL_ELSE>
64<TMPL_VAR NAME=city>
65</TMPL_IF>
66</td>
67</tr>
68
[586]69<tr class="row1">
[469]70<td class=heading>Type:</td>
71<td class=regular>
72<TMPL_IF changetype>
73<select name=alloctype>
74<TMPL_LOOP name=alloctype> <option <TMPL_IF selme>selected="selected"</TMPL_IF> value="<TMPL_VAR NAME=type>"><TMPL_VAR NAME=disptype></option>
75</TMPL_LOOP>
76</select>
77<TMPL_ELSE>
78<TMPL_VAR NAME=disptype>
[470]79<input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
[469]80</TMPL_IF>
81</td>
82</tr>
83
[586]84<tr class="row0">
[634]85<td class=heading>Layer-2/demarc node:</td>
[469]86<td class=regular>
87<TMPL_IF maychange>
[634]88<select name="node">
89 <option selected="selected">--</option>
[469]90<TMPL_LOOP NAME=nodelist>
[530]91 <option value="<TMPL_VAR NAME=node_id>"<TMPL_IF selme> selected</TMPL_IF>><TMPL_VAR NAME=node_name></option></TMPL_LOOP>
[469]92</select>
[634]93&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newnode.cgi')">Add new demarc node</a>
[469]94<TMPL_ELSE>
[470]95<TMPL_IF nodename><TMPL_VAR NAME=nodename><TMPL_ELSE>N/A</TMPL_IF>
[469]96</TMPL_IF>
97</td>
98</tr>
99
[586]100<tr class="row1">
[469]101<td class=heading>CustID:</td>
102<td class="regular">
103<TMPL_IF maychange>
104<input type=text name=custid value="<TMPL_VAR NAME=custid>" maxlength=15 class="regular">
105<TMPL_ELSE>
106<TMPL_VAR NAME=custid>
107</TMPL_IF>
108</td>
109</tr>
110
[586]111<tr class="row0">
[469]112<td class=heading>SWIPed?:</td>
113<td class=regular>
[470]114<TMPL_IF swipable>
[469]115<TMPL_IF maychange>
[534]116<input type="checkbox" name="swip"<TMPL_IF swip> checked="checked"</TMPL_IF>>
[469]117<TMPL_ELSE>
118<TMPL_IF swip>Yes<TMPL_ELSE>No</TMPL_IF>
119</TMPL_IF>
[470]120<TMPL_ELSE>
121N/A
122</TMPL_IF>
[469]123</td>
124</tr>
125
[586]126<tr class="row1">
[469]127<td class=heading>Last modified:</td>
128<td class=regular><TMPL_VAR NAME=lastmod></td>
129</tr>
130
[586]131<tr class="row0">
[469]132<td class="heading">Circuit ID:</td>
133<td class="regular">
134<TMPL_IF maychange>
[534]135<input type="text" name="circid" value="<TMPL_VAR ESCAPE=HTML NAME=circid>" maxlength=64 size=64 class="regular">
[469]136<TMPL_ELSE>
[534]137<TMPL_VAR ESCAPE=HTML NAME=circid>
[469]138</TMPL_IF>
139</td>
140</tr>
141
[586]142<tr class="row1">
[469]143<td class="heading">Description/Name:</td>
144<td class="regular">
145<TMPL_IF maychange>
[534]146<input type="text" name="desc" value="<TMPL_VAR ESCAPE=HTML NAME=desc>" maxlength=64 size=64 class="regular">
[469]147<TMPL_ELSE>
[534]148<TMPL_VAR ESCAPE=HTML NAME=desc>
[469]149</TMPL_IF>
150</td>
151</tr>
152
[586]153<tr class="row0">
[469]154<td class="heading" valign="top">Notes:</td>
155<td class="regular">
[534]156<TMPL_IF maychange><textarea rows="8" cols="64" name="notes" class="regular"><TMPL_VAR ESCAPE=HTML NAME=notes></textarea>
[469]157<TMPL_ELSE>
[534]158<TMPL_VAR ESCAPE=HTML NAME=notes>
[469]159</TMPL_IF>
160</td>
161</tr>
162
163<TMPL_IF nocling>
[586]164<tr class="row1">
[470]165<td class="heading" valign="top">Restricted data:</td>
166<td class="regular">
[469]167<TMPL_IF maychange>
[534]168<textarea rows="3" cols="64" name="privdata" class="regular"><TMPL_VAR ESCAPE=HTML NAME=privdata></textarea>
[469]169<TMPL_ELSE>
[534]170<TMPL_VAR ESCAPE=HTML NAME=privdata>
[469]171</TMPL_IF>
172</td>
173</tr>
174</TMPL_IF>
175
176<TMPL_IF maychange>
[586]177<tr class="row<TMPL_IF nocling>0<TMPL_ELSE>1</TMPL_IF>">
[470]178<td colspan="2" class="center">
[634]179<input type="hidden" name="basetype" value="<TMPL_VAR NAME=basetype>">
[470]180<input type="submit" value=" Update this block " class="regular">
181</td>
182</tr>
183</TMPL_IF>
184</table>
185<TMPL_IF maychange>
[469]186</fieldset>
187</form>
188</TMPL_IF>
189
190<TMPL_IF maydel>
[470]191</td></tr>
192<tr><td class="center">
[469]193<form method="POST" action="main.cgi">
[513]194<fieldset><legend class="noshow">&nbsp;</legend>
[586]195<div class="row<TMPL_IF nocling><TMPL_IF maychange>1<TMPL_ELSE>0</TMPL_IF><TMPL_ELSE><TMPL_IF maychange>0<TMPL_ELSE>1</TMPL_IF></TMPL_IF>">
[469]196<input type="hidden" name="action" value="delete">
[634]197<input type="hidden" name="block" value="<TMPL_VAR NAME=id>">
198<input type="hidden" name="basetype" value="<TMPL_VAR NAME=basetype>">
[469]199<input type=submit value=" Delete this block ">
200</div>
[470]201</fieldset>
[469]202</form>
203</TMPL_IF>
[470]204
[469]205</td>
206</tr>
207</table>
208
209</div>
Note: See TracBrowser for help on using the repository browser.