Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opentrafficshaper
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
23
Issues
23
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
opentrafficshaper
opentrafficshaper
Commits
01b9cbe0
Commit
01b9cbe0
authored
Mar 06, 2018
by
Nigel Kukard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed display of overridden pool icon in list
parent
0796a91f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
opentrafficshaper/plugins/configmanager.pm
opentrafficshaper/plugins/configmanager.pm
+21
-0
opentrafficshaper/plugins/webserver/pages/limits.pm
opentrafficshaper/plugins/webserver/pages/limits.pm
+4
-3
No files found.
opentrafficshaper/plugins/configmanager.pm
View file @
01b9cbe0
...
...
@@ -93,6 +93,7 @@ our (@ISA,@EXPORT,@EXPORT_OK);
setPoolShaperState
unsetPoolShaperState
isPoolIDValid
isPoolOverridden
isPoolReady
getEffectivePool
...
...
@@ -2805,6 +2806,26 @@ sub isPoolReady
# Function to check if pool is being overridden or not
sub
isPoolOverridden
{
my
$pid
=
shift
;
if
(
!
isPoolIDValid
(
$pid
))
{
return
;
}
# Set a property based on if this pool is overridden or not
if
(
defined
(
$globals
->
{'
Pools
'}
->
{
$pid
}
->
{'
.applied_overrides
'})
&&
(
keys
%
{
$globals
->
{'
Pools
'}
->
{
$pid
}
->
{'
.applied_overrides
'}})
>
0
)
{
return
1
;
}
return
0
;
}
# Function to return a pool with any items changed as per pool overrides
sub
getEffectivePool
{
...
...
opentrafficshaper/plugins/webserver/pages/limits.pm
View file @
01b9cbe0
...
...
@@ -59,6 +59,7 @@ use opentrafficshaper::plugins::configmanager qw(
getPool
getPoolByName
getPoolShaperState
isPoolOverridden
isPoolReady
getPoolMembers
...
...
@@ -213,9 +214,9 @@ EOF
# if ($pool->{'Status'} eq 'conflict') {
# $icons .= '<span class="glyphicon glyphicon-random" />';
# }
# if ($pool->{'Status'} eq 'conflict'
) {
#
$icons .= '<span class="glyphicon glyphicon-edit" />';
#
}
if
(
isPoolOverridden
(
$pool
->
{'
ID
'})
)
{
$icons
.=
'
<span class="glyphicon glyphicon-edit" />
';
}
my
$urlStatsPool
=
sprintf
('
/statistics/by-pool?pool=%s
',
uri_escape
("
$pool
->{'InterfaceGroupID'}:
$pool
->{'Name'}
"));
my
$urlPoolEdit
=
sprintf
('
/limits/pool-edit?pid=%s
',
uri_escape
(
$pool
->
{'
ID
'}));
...
...
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