Commit 52320cfa authored by Benoit Rat's avatar Benoit Rat Committed by Adam Wujek

www: add the display of temperatures in the dashboard

parent 2bdd15bf
......@@ -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>';
}
......
......@@ -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() */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment