Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
4a245341
Commit
4a245341
authored
Oct 01, 2014
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
www: update fields with new wrs_version
parent
fb3b56be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
contact.php
userspace/rootfs_override/var/www/contact.php
+4
-4
functions.php
userspace/rootfs_override/var/www/functions.php
+4
-3
No files found.
userspace/rootfs_override/var/www/contact.php
View file @
4a245341
...
...
@@ -19,15 +19,15 @@
<h1
class=
"title"
>
About
</h1>
<?php
$_SESSION
[
'advance'
]
=
""
;
?>
<div>
<?php
$msg
=
shell_exec
(
"/wr/bin/wrs_version -
g
"
);
$msg
=
shell_exec
(
"/wr/bin/wrs_version -
t
"
);
$msg
=
explode
(
"
\n
"
,
$msg
);
$message
.=
"<ul>"
;
$message
.=
"<li>
WRSW OS:
"
.
shell_exec
(
"uname -r"
)
.
"</li>"
;
for
(
$i
=
0
;
$i
<
5
;
$i
++
){
$message
.=
"<li>
wr-switch-os:
"
.
shell_exec
(
"uname -r"
)
.
"</li>"
;
for
(
$i
=
0
;
$i
<
count
(
$msg
)
-
1
;
$i
++
){
$message
.=
"<li>"
.
$msg
[
$i
]
.
"</li>"
;
}
...
...
userspace/rootfs_override/var/www/functions.php
View file @
4a245341
...
...
@@ -151,15 +151,16 @@ function wrs_main_info(){
echo
'<a href="showfile.php?help_id=gateware&name=GateWare Info" onClick="showPopup(this.href);return(false);">'
;
echo
$str
;
echo
'</a></td></tr>'
;
echo
'<tr><td>
PCB Version</td><td>'
;
$str
=
shell_exec
(
"/wr/bin/wrs_version -p"
);
echo
$str
;
echo
'</td></tr>'
;
echo
'<tr><td>
HW Version</td><td>'
;
$str
=
shell_exec
(
"/wr/bin/wrs_version -t | grep 'scb\|back' | sort -r | sed 's/-version: /: v/'"
);
echo
str_replace
(
"
\n
"
,
" / "
,
rtrim
(
$str
))
;
echo
'</td></tr>'
;
echo
'<tr><td>FPGA</td><td>'
;
$str
=
shell_exec
(
"/wr/bin/wrs_version -f"
);
echo
$str
;
echo
'</td></tr>'
;
echo
'<tr><td>Manufacturer</td><td>'
;
$str
=
shell_exec
(
"/wr/bin/wrs_version -t | grep 'manufacturer' | sed 's/[^:]*: //'"
);
echo
str_replace
(
"
\n
"
,
""
,
$str
);
echo
'</td></tr>'
;
echo
'<tr><td>Serial Number</td><td>'
;
$str
=
shell_exec
(
"/wr/bin/wrs_version -t | grep 'serial' | sed 's/[^:]*: //'"
);
echo
str_replace
(
"
\n
"
,
""
,
$str
);
echo
'</td></tr>'
;
echo
'<tr><td>Compiling Date</td><td>'
;
$str
=
shell_exec
(
"/wr/bin/wrs_version -c"
);
echo
$str
;
echo
'</td></tr>'
;
echo
'<tr><td>White-Rabbit Date</td><td>'
;
$str
=
shell_exec
(
"export TZ="
.
$_SESSION
[
'utc'
]
.
" /wr/bin/wr_date -n get"
);
echo
str_replace
(
"
\n
"
,
"<br>"
,
$str
);
echo
'</td></tr>'
;
echo
'<tr><td>White-Rabbit Date</td><td>'
;
$str
=
shell_exec
(
"export TZ="
.
$_SESSION
[
'utc'
]
.
"
;
/wr/bin/wr_date -n get"
);
echo
str_replace
(
"
\n
"
,
"<br>"
,
$str
);
echo
'</td></tr>'
;
echo
'<tr><td>PPSi</td><td>'
;
echo
wrs_check_ptp_status
()
?
'[<a href="ptp.php">on</A>]'
:
'[<a href="ptp.php">off</A>]'
;
echo
'</td></tr>'
;
echo
'<tr><td>Net-SNMP Server</td><td>'
;
echo
check_snmp_status
()
?
'[on] '
:
'[off] '
;
echo
' ver. '
;
echo
shell_exec
(
"snmpd -v | grep version | awk '{print $3}'"
);
echo
'( port '
;
$str
=
shell_exec
(
"cat "
.
$GLOBALS
[
'etcdir'
]
.
"snmpd.conf | grep agent | cut -d: -f3 | awk '{print $1}'"
);
echo
$str
;
echo
')'
;
echo
/*" <a href='help.php?help_id=snmp' onClick='showPopup(this.href);return(false);'> [OIDs]</a>*/
"</td></tr>"
;
echo
'<tr><td>NTP Server</td><td> <a href="management.php">'
;
$str
=
check_ntp_server
();
echo
$str
;
echo
'</A> '
.
$_SESSION
[
'utc'
]
.
'</td></tr>'
;
echo
'<tr><td>Max. Filesize Upload</td><td>'
;
echo
shell_exec
(
"cat "
.
$GLOBALS
[
'phpinifile'
]
.
" | grep upload_max_filesize | awk '{print $3}'"
);
echo
'</td></tr>'
;
echo
'</table>'
;
...
...
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