Ignore:
Timestamp:
05/15/13 17:26:55 (11 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Hand-backport pieces of the allocate-from-routed-freeblock from /trunk
post-r553. Cherrypick merge not possible due to intermingled changes
relating to the database structure updates.
Includes a handful of harmless references to the new structure.
Will likely cause merge conflicts when the structure update is merged.

Location:
branches/stable/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/templates/assign.tmpl

    r594 r595  
    11<div class="indent">
    2 <TMPL_IF block>
    3 <div class="tblsubtitle">
    4 Assign free <TMPL_IF iscontained><TMPL_VAR NAME=fbdisptype></TMPL_IF> block <TMPL_VAR NAME=block>
    5 </div>
    6 <TMPL_ELSE>
    7 <div class="tblsubtitle">Assign IPs</div>
    8 </TMPL_IF>
     2<div class="tblsubtitle">Assign IP<TMPL_UNLESS fbip>s</TMPL_UNLESS></div>
    93<br>
    104
     
    126<fieldset><legend class="noshow">&nbsp;</legend>
    137
    14 <TMPL_IF block>
    15 <input type="hidden" name="block" value="<TMPL_VAR NAME=block>">
     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>">
    1627<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>">
     33<input type="hidden" name="fbassign" value="y">
     34</td>
    1735</TMPL_IF>
    18 
    19 <table class="regular" cellspacing="1" cellpadding="1">
     36</tr>
     37</TMPL_IF>
    2038
    2139<tr class="row0">
     
    3452<td>Allocation type:</td>
    3553<td>
    36 <TMPL_IF iscontained>
     54<TMPL_IF fbip>
     55<TMPL_VAR NAME=fbdisptype><input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
     56<TMPL_ELSE>
     57<TMPL_IF fbrouted>
    3758<TMPL_VAR NAME=fbdisptype><input type="hidden" name="alloctype" value="<TMPL_VAR NAME=type>">
    3859<TMPL_ELSE>
     
    4364<input type="button" value=" ? " onclick="helpAllocTypes()" class="regular">
    4465</TMPL_IF>
     66</TMPL_IF>
    4567</td>
    4668</tr>
    4769
    48 <TMPL_UNLESS block>
     70<TMPL_UNLESS allocfrom>
    4971<tr class="row0">
    5072<td>Subnet CIDR mask length:</td>
     
    5981
    6082<tr class="<TMPL_VAR NAME=rowb>">
    61 <td>Wifi tower/Fibre demarc</td>
     83<td>Layer-2/demarc node</td>
    6284<td>
    6385<select name="node">
     
    6688        <option value="<TMPL_VAR NAME=node_id>"><TMPL_VAR NAME=node_name></option></TMPL_LOOP>
    6789</select>
    68 &nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newnode.cgi')">Add new location</a>
     90&nbsp;<a href="javascript:popNotes('<TMPL_VAR NAME=webpath>/cgi-bin/newnode.cgi')">Add new demarc node</a>
    6991</td>
    7092</tr>
    7193
    72 <TMPL_UNLESS block>
     94<TMPL_UNLESS allocfrom>
    7395<tr class="<TMPL_VAR NAME=rowa>">
    74 <td>Route from/through:</td>
     96<td>Limit to blocks in this location:</td>
    7597<td>
    7698<select name="pop">
     
    83105
    84106<tr class="<TMPL_VAR NAME=rowb>">
    85 <td>Route/allocate from this master:&nbsp;</td>
     107<td>Limit to blocks in this master:&nbsp;</td>
    86108<td>
    87109<select name="allocfrom">
    88110        <option selected="selected">-</option>
    89111<TMPL_LOOP NAME=masterlist>
    90         <option><TMPL_VAR NAME=master></option></TMPL_LOOP>
     112        <option value=<TMPL_VAR NAME=id>><TMPL_VAR NAME=master> (<TMPL_VAR NAME=vrf>)</option></TMPL_LOOP>
    91113</select>
    92114Allow automatic allocation from private IP ranges:<input type="checkbox" name="allowpriv"></td>
  • branches/stable/templates/showmaster.tmpl

    r594 r595  
    5454<TMPL_LOOP name=unrouted>
    5555<tr class="row<TMPL_IF __odd__>0<TMPL_ELSE>1</TMPL_IF>">
    56 <td><TMPL_VAR NAME=fblock></td>
     56<td><TMPL_IF mayadd><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=assign&block=<TMPL_VAR NAME=fblock>&fbtype=n"><TMPL_VAR NAME=fblock><TMPL_ELSE><TMPL_VAR NAME=fblock></TMPL_IF></td>
    5757<td><TMPL_VAR NAME=frange></td>
    5858</tr>
Note: See TracChangeset for help on using the changeset viewer.