Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
2bdd15bf
Commit
2bdd15bf
authored
Aug 06, 2015
by
Benoit Rat
Committed by
Adam Wujek
Aug 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www: correct bad display when WRS in GM without PPS/10MHz
parent
c452df1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
functions.php
userspace/rootfs_override/var/www/functions.php
+9
-5
No files found.
userspace/rootfs_override/var/www/functions.php
View file @
2bdd15bf
...
...
@@ -104,14 +104,14 @@ function wrs_header_ports(){
echo
'<tr class="status">'
;
for
(
$i
=
1
;
$i
<
18
*
3
;
$i
=
$i
+
3
){
if
(
!
strstr
(
$ports
[(
$i
+
1
)],
"NoLock
"
)){
if
(
strstr
(
$ports
[(
$i
+
1
)],
"Locked
"
)){
$mode
=
"locked"
;
}
else
{
$mode
=
"unlocked"
;
}
echo
'<th>'
.
"<img class='syntonization "
.
$mode
.
"' SRC='img/"
.
$mode
.
".png' alt='syntonization: "
.
$mode
.
"', title = 'syntonization: "
.
$mode
.
"'>"
;
if
(
!
strstr
(
$ports
[(
$i
+
2
)],
"Unc
alibrated"
)){
if
(
strstr
(
$ports
[(
$i
+
2
)],
"C
alibrated"
)){
$mode
=
"calibrated"
;
$img
=
"check.png"
;
}
else
{
...
...
@@ -168,20 +168,24 @@ function wrs_main_info(){
$Monitor
=
check_monit_status
()
?
'[on] '
:
'[off] '
;
$WRSmode
=
check_switch_mode
();
if
(
!
strcmp
(
$WRSmode
,
"GM"
))
$WRSmode_xtra
=
""
;
if
(
!
strcmp
(
$WRSmode
,
"GM"
))
{
$WRSmode
=
"GrandMaster"
;
$ports
=
shell_exec
(
"cat /tmp/ports.conf"
);
if
(
empty
(
$ports
))
$WRSmode_xtra
=
"<br>Waiting PPS/10MHz ..."
;
}
else
if
(
!
strcmp
(
$WRSmode
,
"BC"
))
$WRSmode
=
"Boundary Clock"
;
else
if
(
!
strcmp
(
$WRSmode
,
"FM"
))
$WRSmode
=
"Free-Running Master"
;
else
$WRSmode
=
"
GrandMaster
"
;
$WRSmode
=
"
Unknown
"
;
// Print services table
echo
'<br><table class="'
.
$class
.
'" id="'
.
$formatID
.
'" width="100%">'
;
echo
'<tr><th>'
.
$infoname
.
'</th></tr>'
;
echo
'<tr><td>PTP Mode</td><td> <a href="ptp.php">'
.
$WRSmode
.
'</td></tr>'
;
echo
'<tr><td>PTP Mode</td><td> <a href="ptp.php">'
.
$WRSmode
.
'</
a>'
.
$WRSmode_xtra
.
'</
td></tr>'
;
echo
'<tr><td>White-Rabbit Date</td><td>'
.
$wr_date
.
'</td></tr>'
;
echo
'<tr><td>PPSi</td><td>'
.
$PPSi
.
'</td></tr>'
;
echo
'<tr><td>System Monitor</td><td> <a href="management.php">'
.
$Monitor
.
'</td></tr>'
;
...
...
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