mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
vlan: more refactoring
This commit is contained in:
parent
189ae8982d
commit
f6014c36bd
@ -135,6 +135,20 @@ function interfaces_loopback_configure($verbose = false)
|
||||
}
|
||||
}
|
||||
|
||||
function interfaces_vlan_priorities()
|
||||
{
|
||||
return array(
|
||||
1 => gettext('Background (1, lowest)'),
|
||||
0 => gettext('Best Effort (0, default)'),
|
||||
2 => gettext('Excellent Effort (2)'),
|
||||
3 => gettext('Critical Applications (3)'),
|
||||
4 => gettext('Video (4)'),
|
||||
5 => gettext('Voice (5)'),
|
||||
6 => gettext('Internetwork Control (6)'),
|
||||
7 => gettext('Network Control (7, highest)'),
|
||||
);
|
||||
}
|
||||
|
||||
function interfaces_vlan_configure($realif = '', $verbose = false)
|
||||
{
|
||||
global $config;
|
||||
|
||||
@ -122,7 +122,8 @@ $main_buttons = array(
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=gettext("Interface");?></th>
|
||||
<th><?=gettext("VLAN tag");?></th>
|
||||
<th><?=gettext("Tag");?></th>
|
||||
<th><?=gettext("PCP");?></th>
|
||||
<th><?=gettext("Description");?></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
@ -134,6 +135,7 @@ $main_buttons = array(
|
||||
<tr>
|
||||
<td><?=$vlan['if'];?></td>
|
||||
<td><?=$vlan['tag'];?></td>
|
||||
<td><?= isset($vlan['pcp']) ? $vlan['pcp'] : 0 ?></td>
|
||||
<td><?=$vlan['descr'];?></td>
|
||||
<td>
|
||||
<a href="interfaces_vlan_edit.php?id=<?=$i;?>" class="btn btn-xs btn-default" data-toggle="tooltip" title="<?=gettext("edit interface");?>">
|
||||
|
||||
@ -206,23 +206,11 @@ include("head.inc");
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
$priorities = array(
|
||||
1 => gettext('Background (1, lowest)'),
|
||||
0 => gettext('Best Effort (0, default)'),
|
||||
2 => gettext('Excellent Effort (2)'),
|
||||
3 => gettext('Critical Applications (3)'),
|
||||
4 => gettext('Video (4)'),
|
||||
5 => gettext('Voice (5)'),
|
||||
6 => gettext('Internetwork Control (6)'),
|
||||
7 => gettext('Network Control (7, highest)'),
|
||||
);
|
||||
?>
|
||||
<tr>
|
||||
<td><a id="help_for_pcp" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("VLAN priority");?></td>
|
||||
<td>
|
||||
<select name="pcp">
|
||||
<? foreach ($priorities as $pcp => $priority): ?>
|
||||
<? foreach (interfaces_vlan_priorities() as $pcp => $priority): ?>
|
||||
<option value="<?=$pcp;?>"<?=($pconfig['pcp'] == $pcp ? ' selected="selected"' : '');?>><?=htmlspecialchars($priority);?></option>
|
||||
<? endforeach ?>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user