Changeset 818 for trunk/cgi-bin
- Timestamp:
- 03/10/16 18:02:41 (9 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r817 r818 129 129 # UI layout for subblocks/containers 130 130 our $sublistlayout = 1; 131 132 # UI layout for VRF/master blocks 133 our $masterswithvrfs = 2; 131 134 132 135 # VLAN validation mode. Set to 0 to allow alphanumeric vlan names instead of using the vlan number. -
trunk/cgi-bin/MyIPDB.pm
r780 r818 78 78 # $IPDB::sublistlayout = 1; 79 79 80 ## UI layout for showing VRFs and master blocks 81 # 1 lists VRFs on the index page, and master blocks on a subpage to formally separate them 82 # 2 is a somehat "lazy" layout that brings sublists of master blocks in each VRF (as well 83 # as the "Add master" link and "Delete this VRF" button) onto the index page grouped by VRF 84 #$IPDB::masterswithvrfs = 2; 85 80 86 ## VLAN validation mode 81 87 # Set to 0 to allow alphanumerics and _ . - (VLAN name instead of number) -
trunk/cgi-bin/main.cgi
r816 r818 319 319 sub showSummary { 320 320 my $vrflist = listVRF($ip_dbh); 321 322 if ($IPDB::masterswithvrfs == 2) { 323 $page = HTML::Template->new(filename => "index2.tmpl", loop_context_vars => 1, global_vars => 1, 324 path => @templatepath); 325 # alternate layout; put master blocks on the front summary page instead of "out"/"down" a 326 # layer in the browse tree 327 my $vrfinfo = HTML::Template->new(filename => "showvrf.tmpl", path => @templatepath); 328 foreach my $vrf (@$vrflist) { 329 my $masterlist = listSummary($ip_dbh, $vrf->{vrf}); 330 $vrfinfo->param(vrf => $vrf->{vrf}); 331 $vrfinfo->param(masterlist => $masterlist); 332 $vrfinfo->param(addmaster => ($IPDBacl{$authuser} =~ /s/) ); 333 $vrfinfo->param(maydel => ($IPDBacl{$authuser} =~ /s/) ); 334 $vrfinfo->param(sub => 1); 335 $vrf->{vrfinfo} = $vrfinfo->output; 336 } 337 } 338 321 339 $page->param(vrflist => $vrflist); 322 340 323 341 # Only systems/network should be allowed to add VRFs - or maybe higher? 324 342 $page->param(addvrf => ($IPDBacl{$authuser} =~ /s/) ); 343 325 344 } # showSummary 326 345 … … 338 357 $utilbar->param(breadcrumb => \@rcrumbs); 339 358 359 $page->param(maydel => ($IPDBacl{$authuser} =~ /s/) ); 340 360 $page->param(addmaster => ($IPDBacl{$authuser} =~ /s/) ); 341 361 } # showVRF
Note:
See TracChangeset
for help on using the changeset viewer.