function build_rbpi($response) { $response['rbpi']['hostname'] = Rbpi::hostname(true); $response['rbpi']['distribution'] = Rbpi::distribution(); $response['rbpi']['kernel'] = Rbpi::kernel(); $response['rbpi']['firmware'] = Rbpi::firmware(); $response['rbpi']['ip']['internal'] = Rbpi::internalIp(); $response['rbpi']['ip']['external'] = Rbpi::externalIp(); return $response; }
} ?> <tr id="check-network"> <td class="check"><i class="icon-globe"></i> Network</td> <td class="icon"><?php echo icon_alert($net_connections['alert']); ?> </td> <td class="infos"> IP: <span class="text-info"><?php echo Rbpi::internalIp(); ?> </span> [internal] · <span class="text-info"><?php echo Rbpi::externalIp(); ?> </span> [external] <br />received: <strong><?php echo $net_eth['down']; ?> Mb</strong> · sent: <strong><?php echo $net_eth['up']; ?> Mb</strong> · total: <?php echo $net_eth['total']; ?> Mb <br />connections: <?php echo $net_connections['connections']; ?>
$uptime = Uptime::uptime(); $ram = Memory::ram(); $swap = Memory::swap(); $cpu = CPU::cpu(); $cpu_heat = CPU::heat(); $hdd = Storage::hdd(); $hdd_alert = 'success'; for ($i = 0; $i < sizeof($hdd); $i++) { if ($hdd[$i]['alert'] == 'warning') { $hdd_alert = 'warning'; } } $network = Network::connections(); $users = sizeof(Users::connected()); $temp = Temp::temp(); $external_ip = Rbpi::externalIp(); function icon_alert($alert) { echo '<i class="icon-'; switch ($alert) { case 'success': echo 'ok'; break; case 'warning': echo 'warning-sign'; break; default: echo 'exclamation-sign'; } echo ' pull-right"></i>'; }