Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
f6014c36
Commit
f6014c36
authored
Feb 12, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlan: more refactoring
parent
189ae898
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
interfaces.inc
src/etc/inc/interfaces.inc
+14
-0
interfaces_vlan.php
src/www/interfaces_vlan.php
+3
-1
interfaces_vlan_edit.php
src/www/interfaces_vlan_edit.php
+1
-13
No files found.
src/etc/inc/interfaces.inc
View file @
f6014c36
...
...
@@ -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
;
...
...
src/www/interfaces_vlan.php
View file @
f6014c36
...
...
@@ -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"
);
?>
"
>
...
...
src/www/interfaces_vlan_edit.php
View file @
f6014c36
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment