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