source: trunk/templates/assign.tmpl@ 675

Last change on this file since 675 was 675, checked in by Kris Deugau, 9 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: 4.1 KB
Line 
1<div class="indent">
2<div class="tblsubtitle">Assign IP<TMPL_UNLESS fbip>s</TMPL_UNLESS></div>
3<br>
4
5<form method="post" action="main.cgi" class="regular">
6<fieldset><legend class="noshow">&nbsp;</legend>
7
8<table class="regular" cellspacing="1" cellpadding="1">
9
10<TMPL_IF allocfrom>
11<tr class="row0">
12<TMPL_IF fbip>
13<td>IP pool:</td>
14<TMPL_ELSE>
15<td>Free block selected:</td>
16</TMPL_IF>
17<td><TMPL_VAR NAME=allocfrom><input type="hidden" name="allocfrom" value="<TMPL_VAR NAME=allocfrom>">
18<input type="hidden" name="parent" value="<TMPL_VAR NAME=parent>">
19<input type="hidden" name="fbid" value="<TMPL_VAR NAME=fbid>">
20</td>
21</tr>
22<tr class="row1">
23<TMPL_IF fbip>
24<td>IP:</td>
25<td>
26<TMPL_VAR NAME=block><input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
27<input type="hidden" name="fbassign" value="y">
28</td>
29<TMPL_ELSE>
30<td>Allocation:</td>
31<td>
32<input name="block" value="<TMPL_VAR NAME=block>" size="40">
33<input type="hidden" name="fbassign" value="y">
34</td>
35</TMPL_IF>
36</tr>
37</TMPL_IF>
38
39<tr class="row0">
40<td>Customer location:</td>
41<td>
42<select name="city">
43 <option selected="selected">-</option>
44<TMPL_LOOP NAME=citylist>
45 <option><TMPL_VAR NAME=city></option></TMPL_LOOP>
46</select>
47&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newcity.cgi')">Add new location</a>
48</td>
49</tr>
50
51<tr class="row1">
52<td>Allocation type:</td>
53<td>
54<TMPL_IF fbip>
55<TMPL_VAR NAME=fbdisptype><input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
56<TMPL_ELSE>
57<select name="alloctype">
58<TMPL_LOOP name=typelist>
59 <option value="<TMPL_VAR NAME=type>"<TMPL_IF sel> selected</TMPL_IF>><TMPL_VAR NAME=listname></option></TMPL_LOOP>
60</select>
61<input type="button" value=" ? " onclick="helpAllocTypes()" class="regular">
62</TMPL_IF>
63</td>
64</tr>
65
66<TMPL_UNLESS allocfrom>
67<tr class="row0">
68<td>Subnet CIDR mask length:</td>
69<td valign="top">&nbsp;/&nbsp;<input type="text" name="maskbits" size="3" maxlength="3"></td>
70</tr>
71</TMPL_UNLESS>
72
73<tr class="<TMPL_VAR NAME=rowa>">
74<td>Reverse DNS pattern:</td>
75<td>
76<input type="text" name="rdns" value="<TMPL_VAR NAME=rdns>" size="40">
77<input type="button" value=" ? " onclick="helpRDNS()" class="regular">
78<TMPL_IF cached>(cached)</TMPL_IF>
79</td>
80</tr>
81
82<tr class="<TMPL_VAR NAME=rowb>">
83<td>Customer ID:</td>
84<td><input type="text" name="custid" size="15" maxlength="15"> (Only required for Customer allocations)</td>
85</tr>
86
87<tr class="<TMPL_VAR NAME=rowa>">
88<td>Layer-2/demarc node</td>
89<td>
90<select name="node">
91 <option selected>-</option>
92<TMPL_LOOP NAME=nodelist>
93 <option value="<TMPL_VAR NAME=node_id>"><TMPL_VAR NAME=node_name></option></TMPL_LOOP>
94</select>
95&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newnode.cgi')">Add new demarc node</a>
96</td>
97</tr>
98
99<TMPL_UNLESS allocfrom>
100<tr class="<TMPL_VAR NAME=rowb>">
101<td>Allocate from blocks in this location:</td>
102<td>
103<select name="pop">
104 <option selected value="">-</option>
105<TMPL_LOOP NAME=pops>
106 <option><TMPL_VAR NAME=pop></option></TMPL_LOOP>
107</select>
108</td>
109</tr>
110
111<tr class="<TMPL_VAR NAME=rowa>">
112<td>Limit to blocks in this master:&nbsp;</td>
113<td>
114<select name="allocfrom">
115 <option selected="selected">-</option>
116<TMPL_LOOP NAME=masterlist>
117 <option value=<TMPL_VAR NAME=id>><TMPL_VAR NAME=master><TMPL_IF vrf> (<TMPL_VAR NAME=vrf>)</TMPL_IF></option></TMPL_LOOP>
118</select>
119Allow automatic allocation from private IP ranges:<input type="checkbox" name="allowpriv"></td>
120</tr>
121</TMPL_UNLESS>
122
123<tr class="<TMPL_VAR NAME=rowb>">
124<td>Circuit ID:</td>
125<td><input name="circid" size="40"></td>
126</tr>
127
128<tr class="<TMPL_VAR NAME=rowa>">
129<td>Description/Name:</td>
130<td><input name="desc" size="40"></td>
131</tr>
132
133<tr class="<TMPL_VAR NAME=rowb>">
134<td>Notes:&nbsp;</td>
135<td><textarea name="notes" rows="3" cols="40"></textarea></td>
136</tr>
137
138<TMPL_IF privdata>
139<tr class="<TMPL_VAR NAME=rowa>">
140<td>Restricted data:</td>
141<td><textarea rows="3" cols="64" name="privdata" class="regular"></textarea></td>
142</tr>
143</TMPL_IF>
144
145<tr class="<TMPL_IF privdata><TMPL_VAR NAME=rowb><TMPL_ELSE><TMPL_VAR NAME=rowa></TMPL_IF>">
146<td class="center" colspan="2"><input type="submit" value=" Assign "></td>
147</tr>
148
149</table>
150
151<input type="hidden" name="action" value="confirm">
152</fieldset>
153</form>
154
155</div>
Note: See TracBrowser for help on using the repository browser.