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
85
Issues
85
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
52320cfa
Commit
52320cfa
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: add the display of temperatures in the dashboard
parent
2bdd15bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
functions.php
userspace/rootfs_override/var/www/functions.php
+4
-0
wr_mon.c
userspace/tools/wr_mon.c
+1
-0
No files found.
userspace/rootfs_override/var/www/functions.php
View file @
52320cfa
...
...
@@ -180,6 +180,9 @@ function wrs_main_info(){
$WRSmode
=
"Free-Running Master"
;
else
$WRSmode
=
"Unknown"
;
#Obtain the temperatures using the last line of (wr-mon -w)
$temperatures
=
shell_exec
(
"cat /tmp/ports.conf 2>/dev/null | tail -1"
);
// Print services table
echo
'<br><table class="'
.
$class
.
'" id="'
.
$formatID
.
'" width="100%">'
;
...
...
@@ -191,6 +194,7 @@ function wrs_main_info(){
echo
'<tr><td>System Monitor</td><td> <a href="management.php">'
.
$Monitor
.
'</td></tr>'
;
echo
'<tr><td>Net-SNMP Server</td><td>'
.
$SNMP
.
'( port '
.
$SNMP_port
.
")</td></tr>"
;
echo
'<tr><td>NTP Server</td><td> <a href="management.php">'
.
$NTP
.
'</td></tr>'
;
if
(
!
empty
(
$temperatures
))
echo
'<tr><td>Temperature (ºC)</td><td>'
.
$temperatures
.
'</td></tr>'
;
echo
'</table>'
;
}
...
...
userspace/tools/wr_mon.c
View file @
52320cfa
...
...
@@ -516,6 +516,7 @@ int main(int argc, char *argv[])
case
'w'
:
/* for the web interface */
read_hal
();
show_unadorned_ports
();
show_temperatures
();
exit
(
0
);
case
'q'
:
break
;
/* done in wrs_msg_init() */
case
'v'
:
break
;
/* done in wrs_msg_init() */
...
...
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