Changeset 806 for trunk/cgi-bin
- Timestamp:
- 03/07/16 18:05:24 (9 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r799 r806 29 29 &initIPDBGlobals &connectDB &finish &checkDBSanity 30 30 &addMaster &touchMaster 31 &list Summary &listSubs &listContainers &listAllocations &listForMerge &listFree &listPool31 &listVRF &listSummary &listSubs &listContainers &listAllocations &listForMerge &listFree &listPool 32 32 &getMasterList &getTypeList &getPoolSelect &findAllocateFrom 33 33 &ipParent &subParent &blockParent &getBreadCrumbs &getRoutedCity … … 45 45 &initIPDBGlobals &connectDB &finish &checkDBSanity 46 46 &addMaster &touchMaster 47 &list Summary &listSubs &listContainers &listAllocations &listForMerge &listFree &listPool47 &listVRF &listSummary &listSubs &listContainers &listAllocations &listForMerge &listFree &listPool 48 48 &getMasterList &getTypeList &getPoolSelect &findAllocateFrom 49 49 &ipParent &subParent &blockParent &getBreadCrumbs &getRoutedCity … … 843 843 return ('OK','OK'); 844 844 } # end touchMaster() 845 846 847 ## IPDB::listVRF() 848 # Get summary list of all VRFs 849 # Returns an arrayref to a list of hashrefs with the VRF name, comment 850 sub listVRF { 851 my $dbh = shift; 852 my $vrflist = $dbh->selectall_arrayref("SELECT vrf,comment FROM vrfs ORDER BY vrf", { Slice => {} }); 853 return $vrflist; 854 } # end listVRF() 845 855 846 856 -
trunk/cgi-bin/main.cgi
r800 r806 259 259 260 260 261 # Initial display: Show master blocks with total allocated subnets, total free subnets261 # Initial display: Show list of VRFs 262 262 sub showSummary { 263 my $masterlist = listSummary($ip_dbh); 264 $page->param(masterlist => $masterlist); 265 266 $page->param(addmaster => ($IPDBacl{$authuser} =~ /a/) ); 263 my $vrflist = listVRF($ip_dbh); 264 $page->param(vrflist => $vrflist); 265 266 # Only systems/network should be allowed to add VRFs - or maybe higher? 267 $page->param(addvrf => ($IPDBacl{$authuser} =~ /s/) ); 267 268 } # showSummary 268 269
Note:
See TracChangeset
for help on using the changeset viewer.