source: trunk/templates/merge.tmpl@ 937

Last change on this file since 937 was 733, checked in by Kris Deugau, 9 years ago

/trunk

Cleanup while rechecking merge-to-container in UI:

  • Move descriptive strings for merge scopes into a hash in IPDB.pm, so we don't have to update them everywhere every time they might change... now that most of the changes are done, of course.
  • Refiddle listForMerge's freeblock branch to show only direct children, or all free blocks depending on another optional argument.
  • Render previous point pointless due to dropping freeblocks from the return list of merged blocks anyway, because Confusion.
  • Force scope as well as type when merging a master block. Merging any other type in a way that happens to intersect a master remains undefined.
  • Make sure to capture the blocks merged/deleted for return.
  • Fix up some variable names for consistency.
  • Fix stupid typo missed in r732.

See #8.

File size: 2.4 KB
Line 
1<TMPL_IF err>
2<div class="regular err">
3<p><TMPL_VAR NAME=err></p>
4<input type="button" value="Back" onclick="history.go(-1)">
5</div>
6<TMPL_ELSE>
7
8<div class="indent">
9<form method="POST" action="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi">
10<fieldset><legend class="noshow">&nbsp;</legend>
11<input type="hidden" name="action" value="confmerge">
12<input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
13<TMPL_IF ismaster>
14<input type="hidden" name="alloctype" value="mm">
15<input type="hidden" name="scope" value="mergepeer">
16</TMPL_IF>
17
18<table class="regular altrows" cellspacing="1" cellpadding="1">
19<tr class="heading">
20<td colspan="2">Merge/extend allocation(s)
21<TMPL_IF ispool>
22<div style="float:right;"><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&pool=<TMPL_VAR NAME=block>">List IPs</a></div>
23</TMPL_IF>
24</td>
25</tr>
26<tr>
27<td>Current netblock:</td>
28<td><TMPL_VAR NAME=oldblock> (<TMPL_VAR NAME=oldtype>)</td>
29</tr>
30<tr>
31<td>Enter new netmask:</td>
32<td>/<input name="newmask" size="5"></td>
33</tr>
34
35<TMPL_UNLESS ismaster>
36<tr>
37<td>Select type for new merged allocation:</td>
38<td>
39<select name="alloctype">
40<TMPL_LOOP name=typelist>
41 <option value="<TMPL_VAR NAME=type>"<TMPL_IF sel> selected</TMPL_IF>><TMPL_VAR NAME=listname></option></TMPL_LOOP>
42</select>
43</td>
44</tr>
45<tr>
46<td colspan="2" class="warning">
47Warning: Selecting "Customer netblock", "End-use netblock", or "Internal netblock"<br>
48as the target type will result in the loss of suballocation entries from the current allocations.<br>
49Selecting an IP pool type will attempt to retain suballocation data by<br>
50flagging consecutive IPs as "used" to match usage allocations.
51</td>
52</tr>
53<tr>
54<td>Merge scope:<br>(new or existing container types only)</td>
55<td>
56<input type="radio" name="scope" value="keepall"><TMPL_VAR NAME=vis_keepall><br>
57<input type="radio" name="scope" value="mergepeer" checked="checked"><TMPL_VAR NAME=vis_mergepeer><br>
58<input type="radio" name="scope" value="clearpeer"><TMPL_VAR NAME=vis_clearpeer><br>
59<input type="radio" name="scope" value="clearall"><TMPL_VAR NAME=vis_clearall>
60</td>
61</tr>
62
63<TMPL_ELSE>
64<tr>
65<td colspan="2" class="warning">All suballocations will be preserved when merging master blocks</td>
66</tr>
67</TMPL_UNLESS>
68
69<tr>
70<td class="center" colspan="2"><input type="submit" value=" Show merge details "></td>
71</tr>
72</table>
73</fieldset>
74</form>
75</div>
76
77</TMPL_IF>
Note: See TracBrowser for help on using the repository browser.