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
d1c84653
Commit
d1c84653
authored
Mar 04, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small style fix
parent
922dfa5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
54 deletions
+52
-54
status_lb_vs.php
src/www/status_lb_vs.php
+52
-54
No files found.
src/www/status_lb_vs.php
View file @
d1c84653
...
...
@@ -75,66 +75,64 @@ include("head.inc");
<?php
endif
;
?>
<section
class=
"col-xs-12"
>
<div
class=
"tab-content content-box col-xs-12"
>
<div
class=
"container-fluid"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<td>
<?=
gettext
(
"Name"
);
?>
</td>
<td>
<?=
gettext
(
"Address"
);
?>
</td>
<td>
<?=
gettext
(
"Servers"
);
?>
</td>
<td>
<?=
gettext
(
"Status"
);
?>
</td>
<td>
<?=
gettext
(
"Description"
);
?>
</td>
</tr>
</thead>
<tbody>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<td>
<?=
gettext
(
"Name"
);
?>
</td>
<td>
<?=
gettext
(
"Address"
);
?>
</td>
<td>
<?=
gettext
(
"Servers"
);
?>
</td>
<td>
<?=
gettext
(
"Status"
);
?>
</td>
<td>
<?=
gettext
(
"Description"
);
?>
</td>
</tr>
</thead>
<tbody>
<?php
$i
=
0
;
foreach
(
$a_vs
as
$vsent
)
:
?>
<tr>
<td>
<?=
$vsent
[
'name'
];
?>
</td>
<td>
<?=
$vsent
[
'ipaddr'
]
.
" : "
.
$vsent
[
'port'
];
?>
</td>
<td>
$i
=
0
;
foreach
(
$a_vs
as
$vsent
)
:
?>
<tr>
<td>
<?=
$vsent
[
'name'
];
?>
</td>
<td>
<?=
$vsent
[
'ipaddr'
]
.
" : "
.
$vsent
[
'port'
];
?>
</td>
<td>
<?php
foreach
(
$a_pool
as
$vipent
)
:
if
(
$vipent
[
'name'
]
==
$vsent
[
'poolname'
])
:?>
foreach
(
$a_pool
as
$vipent
)
:
if
(
$vipent
[
'name'
]
==
$vsent
[
'poolname'
])
:?>
<?=
implode
(
'<br/>'
,
$vipent
[
'servers'
]);
?>
<?=
implode
(
'<br/>'
,
$vipent
[
'servers'
]);
?>
<?php
endif
;
endforeach
;
?>
</td>
endif
;
endforeach
;
?>
</td>
<?php
switch
(
trim
(
$rdr_a
[
$vsent
[
'name'
]][
'status'
]))
{
case
'active'
:
$bgcolor
=
"#90EE90"
;
// lightgreen
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
=
"Active"
;
break
;
case
'down'
:
$bgcolor
=
"#F08080"
;
// lightcoral
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
=
"Down"
;
break
;
default
:
$bgcolor
=
"#D3D3D3"
;
// lightgray
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
=
'Unknown - relayd not running?'
;
}
?>
<td>
<table
border=
"0"
cellpadding=
"3"
cellspacing=
"2"
summary=
"status"
>
<tr><td
bgcolor=
"
<?=
$bgcolor
?>
"
>
<?=
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
?>
</td></tr>
</table>
<?=
!
empty
(
$rdr_a
[
$vsent
[
'name'
]][
'total'
])
?
"Total Sessions:
{
$rdr_a
[
$vsent
[
'name'
]][
'total'
]
}
"
:
""
;
?>
<?=
!
empty
(
$rdr_a
[
$vsent
[
'name'
]][
'last'
])
?
"<br />Last:
{
$rdr_a
[
$vsent
[
'name'
]][
'last'
]
}
"
:
""
;
?>
<?=
!
empty
(
$rdr_a
[
$vsent
[
'name'
]][
'average'
])
?
"<br />Average:
{
$rdr_a
[
$vsent
[
'name'
]][
'average'
]
}
"
:
""
;
?>
</td>
<td>
<?=
$vsent
[
'descr'
];
?>
</td>
</tr>
switch
(
trim
(
$rdr_a
[
$vsent
[
'name'
]][
'status'
]))
{
case
'active'
:
$bgcolor
=
"#90EE90"
;
// lightgreen
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
=
"Active"
;
break
;
case
'down'
:
$bgcolor
=
"#F08080"
;
// lightcoral
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
=
"Down"
;
break
;
default
:
$bgcolor
=
"#D3D3D3"
;
// lightgray
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
=
'Unknown - relayd not running?'
;
}
?>
<td>
<table
border=
"0"
cellpadding=
"3"
cellspacing=
"2"
summary=
"status"
>
<tr><td
bgcolor=
"
<?=
$bgcolor
?>
"
>
<?=
$rdr_a
[
$vsent
[
'name'
]][
'status'
]
?>
</td></tr>
</table>
<?=
!
empty
(
$rdr_a
[
$vsent
[
'name'
]][
'total'
])
?
"Total Sessions:
{
$rdr_a
[
$vsent
[
'name'
]][
'total'
]
}
"
:
""
;
?>
<?=
!
empty
(
$rdr_a
[
$vsent
[
'name'
]][
'last'
])
?
"<br />Last:
{
$rdr_a
[
$vsent
[
'name'
]][
'last'
]
}
"
:
""
;
?>
<?=
!
empty
(
$rdr_a
[
$vsent
[
'name'
]][
'average'
])
?
"<br />Average:
{
$rdr_a
[
$vsent
[
'name'
]][
'average'
]
}
"
:
""
;
?>
</td>
<td>
<?=
$vsent
[
'descr'
];
?>
</td>
</tr>
<?php
$i
++
;
endforeach
;
?>
</tbody>
</table>
</div>
$i
++
;
endforeach
;
?>
</tbody>
</table>
</div>
</div>
</section>
...
...
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