source: trunk/templates/confmerge.tmpl@ 733

Last change on this file since 733 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.5 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="domerge">
12<input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
13<input type="hidden" name="scope" value="<TMPL_VAR NAME=scope>">
14<TMPL_IF ismaster>
15<input type="hidden" name="typelist" value="mm">
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></td>
24</tr>
25<tr>
26<td>Current netblock:</td>
27<td><TMPL_VAR NAME=oldblock> (<TMPL_VAR NAME=oldtype>)</td>
28</tr>
29<tr>
30<td>Netblock to be created based on netmask of /<TMPL_VAR NAME=newmask>:</td>
31<td><TMPL_VAR NAME=newblock><input type="hidden" name="newmask" value="<TMPL_VAR NAME=newmask>"></td>
32</tr>
33<tr><td>New allocation type:</td>
34<td><TMPL_VAR NAME=newdisptype><input type="hidden" name="newtype" value="<TMPL_VAR NAME=newtype>"></td>
35</tr>
36<tr>
37<td>Existing allocations to merge into new allocation:</td>
38<td>
39<TMPL_LOOP NAME=mergealloc>
40<a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=edit&amp;id=<TMPL_VAR NAME=id>&amp;basetype=b"><TMPL_VAR NAME=cidr></a> (<TMPL_VAR NAME=dispname>)
41<input type="hidden" name="mid<TMPL_VAR NAME=__counter__>" value="<TMPL_VAR NAME=id>"><br>
42</TMPL_LOOP>
43</td>
44</tr>
45
46<TMPL_IF iscontainer>
47<tr>
48<td>Merge scope:</td>
49<td><TMPL_VAR NAME=vis_scope></td>
50</tr>
51</TMPL_IF>
52
53<TMPL_IF ispool>
54<tr>
55<td colspan="2" class="warning">
56Warning: Any end-use suballocations within <TMPL_VAR NAME=newblock> will be converted<br>
57to clusters of "used" IPs on a best-effort basis in this merge.<br>
58Use the Back button and select a container type if you wish to keep these.
59</td>
60</tr>
61</TMPL_IF>
62
63<TMPL_IF isleaf>
64<tr>
65<td colspan="2" class="warning">
66Warning: Any suballocations or pool IPs from the<br>
67allocations above will be REMOVED in this merge!<br>
68Use the Back button and select a container type if you wish to keep these.
69</td>
70</tr>
71</TMPL_IF>
72
73
74<tr>
75<td class="center" colspan="2"><input type="submit" value=" Do merge "></td>
76</tr>
77</table>
78<TMPL_IF ismaster>
79<input type="hidden" name="alloctype" value="mm">
80</TMPL_IF>
81</fieldset>
82</form>
83</div>
84
85</TMPL_IF>
Note: See TracBrowser for help on using the repository browser.