Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
opentrafficshaper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Francisco Manuel Cardoso
opentrafficshaper
Commits
5c39608b
Commit
5c39608b
authored
11 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
Added dynamic viewport sized if there are menus
parent
c5eaa934
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentrafficshaper/plugins/webserver/webserver.pm
+19
-16
19 additions, 16 deletions
opentrafficshaper/plugins/webserver/webserver.pm
with
19 additions
and
16 deletions
opentrafficshaper/plugins/webserver/webserver.pm
+
19
−
16
View file @
5c39608b
...
@@ -330,6 +330,9 @@ sub httpCreateResponse
...
@@ -330,6 +330,9 @@ sub httpCreateResponse
# Set header
# Set header
$headers
->
content_type
("
text/html
");
$headers
->
content_type
("
text/html
");
# Bootstrap stuff
my
$mainCols
=
12
;
# Check if we have a menu structure, if we do, display the sidebar
# Check if we have a menu structure, if we do, display the sidebar
my
$styleStr
=
"";
my
$styleStr
=
"";
my
$menuStr
=
"";
my
$menuStr
=
"";
...
@@ -343,12 +346,13 @@ sub httpCreateResponse
...
@@ -343,12 +346,13 @@ sub httpCreateResponse
# Check if menu exists
# Check if menu exists
if
(
my
$menu
=
$options
->
{'
menu
'})
{
if
(
my
$menu
=
$options
->
{'
menu
'})
{
$menuStr
=
<<EOF;
$menuStr
=
<<EOF;
<ul class="nav nav-pills nav-stacked">
<div class="col-md-2">
<ul class="nav nav-pills nav-stacked">
EOF
EOF
# Loop with sub menu sections
# Loop with sub menu sections
foreach
my
$section
(
keys
%
{
$menu
})
{
foreach
my
$section
(
keys
%
{
$menu
})
{
$menuStr
.=
<<EOF;
$menuStr
.=
<<EOF;
<li class="nav-header">$section</li>
<li class="nav-header">$section</li>
EOF
EOF
# Loop with menu items
# Loop with menu items
foreach
my
$item
(
keys
%
{
$menu
->
{
$section
}})
{
foreach
my
$item
(
keys
%
{
$menu
->
{
$section
}})
{
...
@@ -358,13 +362,17 @@ EOF
...
@@ -358,13 +362,17 @@ EOF
# Build sections
# Build sections
$menuStr
.=
<<EOF;
$menuStr
.=
<<EOF;
<li><a href="$link">$item</a></li>
<li><a href="$link">$item</a></li>
EOF
EOF
}
}
}
}
$menuStr
.=
<<EOF;
$menuStr
.=
<<EOF;
</ul>
</ul>
</div>
EOF
EOF
# Reduce number of main cols to make way for menu
$mainCols
=
10
;
}
}
# Check if we have a list of javascript assets
# Check if we have a list of javascript assets
...
@@ -400,11 +408,6 @@ EOF
...
@@ -400,11 +408,6 @@ EOF
body {
body {
padding-top: 50px;
padding-top: 50px;
}
}
.main-area {
padding-top: 15px;
padding-bottom: 15px;
}
$styleStr
$styleStr
</style>
</style>
<!-- End Assets -->
<!-- End Assets -->
...
@@ -423,7 +426,7 @@ $styleStr
...
@@ -423,7 +426,7 @@ $styleStr
</div>
</div>
<div class="collapse navbar-collapse">
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav">
<li class="active"><a href="
#
">Home</a></li>
<li class="active"><a href="
/
">Home</a></li>
<li><a href="/limits">Limits</a></li>
<li><a href="/limits">Limits</a></li>
<li><a href="/configmanager">ConfigManager</a></li>
<li><a href="/configmanager">ConfigManager</a></li>
</ul>
</ul>
...
@@ -431,20 +434,20 @@ $styleStr
...
@@ -431,20 +434,20 @@ $styleStr
</div>
</div>
</div>
</div>
<div
class="main-area container
">
<div
style="padding: 15px 15px
">
<div class="
col-md-2
">
<div class="
row
">
$menuStr
$menuStr
</div>
<div class="col-md-$mainCols">
<div class="col-md-10">
$content
$content
</div>
</div>
</div>
</div>
<hr>
</div>
<div style="padding: 0 15px">
<hr />
<footer>
<footer>
<p class="muted">v$globals->{'version'} - Copyright © 2013, <a href="http://www.allworldit.com">AllWorldIT</a></p>
<p class="muted">v$globals->{'version'} - Copyright © 2013, <a href="http://www.allworldit.com">AllWorldIT</a></p>
</footer>
</footer>
</div>
</div>
</body>
</body>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment