Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
opentrafficshaper
opentrafficshaper
Commits
01b9cbe0
Commit
01b9cbe0
authored
Mar 06, 2018
by
Nigel Kukard
Browse files
Fixed display of overridden pool icon in list
parent
0796a91f
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
Try again
or
attach a new 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