<?php /** * Script to display all VRFs * */ /* verify that user is authenticated! */ isUserAuthenticated(); /* check if admin */ if (checkAdmin(false)) { $admin = true; } /* get all VLANs and subnet descriptions */ $vrfs = getAllVRFs(); /* title */ print "<h4>" . _('Available VRFs and belonging subnets') . "</h4>"; print "<hr>"; if ($admin) { print "<a class='btn btn-sm btn-default' href='administration/manageVRF/' data-action='add' data-switchid=''><i class='fa fa-pencil'></i> " . _('Manage') . "</a>"; } /* for each VRF check which subnet has it configured */ if (!$vrfs) { print "<div class='alert alert-info'>" . _('No VRFs configured') . "!</div>"; } else { # print table print "<table id='vrf' class='table table-striped table-condensed table-top'>"; foreach ($vrfs as $vrf) { # print table body print "<tbody>"; # section names print "<tr class='vrf-title'>";
<?php /** * Print all available VRFs and configurations ************************************************/ /* verify that user is admin */ checkAdmin(); /* get all available VRFs */ $allVRFs = getAllVRFs(); ?> <h4><?php print _('Manage VRF'); ?> </h4> <hr><br> <button class='btn btn-small vrfManagement' data-action='add' data-vrfid='' style='margin-bottom:10px;'><i class='icon-gray icon-plus'></i> <?php print _('Add VRF'); ?> </button> <!-- vrfs --> <?php /* first check if they exist! */ if (!$allVRFs) { print ' <div class="alert alert-warn alert-absolute">' . _('No VRFs configured') . '!</div>' . "\n"; } else { print '<table id="vrfManagement" class="table table-striped table-top table-hover table-auto">' . "\n"; # headers print '<tr>' . "\n";