mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Fix PHP notices
This commit is contained in:
parent
cb65a66ee3
commit
422a46e92c
@ -34,7 +34,7 @@ class System {
|
|||||||
|
|
||||||
public function processorCount() {
|
public function processorCount() {
|
||||||
$procs = shell_exec("nproc --all");
|
$procs = shell_exec("nproc --all");
|
||||||
return intval($proc);
|
return intval($procs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadAvg1Min() {
|
public function loadAvg1Min() {
|
||||||
@ -48,7 +48,7 @@ class System {
|
|||||||
|
|
||||||
public function systemTemperature() {
|
public function systemTemperature() {
|
||||||
$cpuTemp = file_get_contents("/sys/class/thermal/thermal_zone0/temp");
|
$cpuTemp = file_get_contents("/sys/class/thermal/thermal_zone0/temp");
|
||||||
return number_format($cpuTemp/1000, 1);
|
return number_format((float)$cpuTemp/1000, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hostapdStatus() {
|
public function hostapdStatus() {
|
||||||
|
@ -28,7 +28,7 @@ if ($cpuload > 90) {
|
|||||||
$cpuload_status = "danger";
|
$cpuload_status = "danger";
|
||||||
} elseif ($cpuload > 75) {
|
} elseif ($cpuload > 75) {
|
||||||
$cpuload_status = "warning";
|
$cpuload_status = "warning";
|
||||||
} elseif ($cpuload > 0) {
|
} elseif ($cpuload >= 0) {
|
||||||
$cpuload_status = "success";
|
$cpuload_status = "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable'];
|
|||||||
<!-- Page Wrapper -->
|
<!-- Page Wrapper -->
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo $toggleState; ?>" id="accordionSidebar">
|
<ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo (isset($toggleState)) ? $toggleState : null ; ?>" id="accordionSidebar">
|
||||||
<!-- Sidebar - Brand -->
|
<!-- Sidebar - Brand -->
|
||||||
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info">
|
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info">
|
||||||
<div class="sidebar-brand-text ml-1">RaspAP</div>
|
<div class="sidebar-brand-text ml-1">RaspAP</div>
|
||||||
|
@ -59,8 +59,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-8">
|
<div class="form-group col-md-8">
|
||||||
<?php
|
<?php
|
||||||
$log = file_get_contents('/tmp/openvpn.log');
|
echo '<textarea class="logoutput"></textarea>';
|
||||||
echo '<textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user