Changeset 786


Ignore:
Timestamp:
10/08/15 17:25:44 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Update edit page to show backup fields. See #52.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r782 r786  
    982982  } # rDNS availability check
    983983
     984  # backup data
     985  if ($blockinfo->{hasbk}) {
     986    $page->param(hasbackup => $blockinfo->{hasbk});
     987    for my $bkfield (qw(brand model src user vpass epass port)) {
     988      $page->param("bk$bkfield" => $blockinfo->{"bk$bkfield"});
     989    }
     990    $page->param(bktelnet => 1) if $blockinfo->{bktype} eq 'telnet';
     991    $page->param(bkssh => 1) if $blockinfo->{bktype} eq 'SSH';
     992  }
     993
    984994  # consider extending this to show time as well as date
    985995  my ($lastmod,undef) = split /\s+/, $blockinfo->{lastmod};
  • trunk/templates/edit.tmpl

    r781 r786  
    1818<td colspan="2">Edit the information below
    1919<TMPL_IF ispool>
    20 <div style="float:right;"><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&pool=<TMPL_VAR NAME=id>">List IPs</a></div></TMPL_IF>
     20<div style="float:right;"><a href="<TMPL_VAR NAME=webpath>/cgi-bin/main.cgi?action=listpool&amp;pool=<TMPL_VAR NAME=id>">List IPs</a></div></TMPL_IF>
    2121</td></tr>
    2222
     
    4949<TMPL_IF r_iplist>
    5050<div class="rdns revdata">
    51 <ul class="collapsible notalist">
     51<ul class="collapsible nocheckbox notalist">
    5252<li>
    5353<label for="per-iplist">Per-IP reverse entries (click to show) <img src="<TMPL_VAR NAME=webpath>/images/tree_open.png"></label>
     
    213213</td>
    214214</tr>
     215
     216<tr>
     217<td class="heading">Configuration backup:</td>
     218<td>
     219<TMPL_IF maychange>
     220<ul class="collapsible notalist"><li>
     221<label for="backupfields">Device/assignment requires backup?</label>
     222<input type="checkbox" id="backupfields" name="backupfields" <TMPL_IF hasbackup>checked="checked" </TMPL_IF>/>
     223<ul class="notalist"><li>
     224
     225<table><tr><td>Brand:</td><td><input name="bkbrand" value="<TMPL_VAR NAME=bkbrand>"></td></tr>
     226<tr><td>Model:</td><td><input name="bkmodel" value="<TMPL_VAR NAME=bkmodel>"></td></tr>
     227<tr><td colspan="2">Optional settings if different from standard ones for the device type above</td></tr>
     228<tr><td>Access method:</td><td><select name="bktype">
     229<option<TMPL_IF bktelnet> selected="selected"</TMPL_IF>>telnet</option>
     230<option<TMPL_IF bkssh> selected="selected"</TMPL_IF>>SSH</option>
     231</select></td></tr>
     232<tr><td>Connect from:</td><td><input name="bksrc" value="<TMPL_VAR NAME=bksrc>"></td></tr>
     233<tr><td>Username:</td><td><input name="bkuser" value="<TMPL_VAR NAME=bkuser>"></td></tr>
     234<tr><td>VTY password:</td><td><input name="bkvpass" value="<TMPL_VAR NAME=bkvpass>"></td></tr>
     235<tr><td>Enable password:</td><td><input name="bkepass" value="<TMPL_VAR NAME=bkepass>"></td></tr>
     236<tr><td>Alternate port (if required):</td><td><input name="bkport" value="<TMPL_VAR NAME=bkport>"></td></tr>
     237</table>
     238
     239</li></ul>
     240</li></ul>
     241<TMPL_ELSE>
     242<td>Configuration backup:</td>
     243<td>
     244<TMPL_IF backupfields>
     245Device will be backed up as below
     246<table><tr><td>Brand:</td><td><TMPL_VAR NAME=bkbrand></td></tr>
     247<tr><td>Model:</td><td><TMPL_VAR NAME=bkmodel></td></tr>
     248<tr><td>Access method:</td><td><TMPL_VAR NAME=bktype></td></tr>
     249<tr><td>Connect from:</td><td><TMPL_VAR NAME=bksrc></td></tr>
     250<tr><td>Username:</td><td><TMPL_VAR NAME=bkuser></td></tr>
     251<tr><td>VTY password:</td><td><TMPL_VAR NAME=bkvpass></td></tr>
     252<tr><td>Enable password:</td><td><TMPL_VAR NAME=bkepass></td></tr>
     253<tr><td>Port:</td><td><TMPL_VAR NAME=bkport></td></tr>
     254</table>
     255<TMPL_ELSE>
     256Device/assignment not flagged for backup
     257</TMPL_IF>
     258
     259</TMPL_IF>
     260</td>
     261</tr>
     262
    215263</TMPL_IF>
    216264
Note: See TracChangeset for help on using the changeset viewer.