mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Update w/ hostapd svc indicator
This commit is contained in:
parent
f0e94780b8
commit
49cb572069
@ -12,38 +12,40 @@ $cores = $system->processorCount();
|
|||||||
$memused = $system->usedMemory();
|
$memused = $system->usedMemory();
|
||||||
$memused_status = "primary";
|
$memused_status = "primary";
|
||||||
if ($memused > 90) {
|
if ($memused > 90) {
|
||||||
$memused_status = "danger";
|
$memused_status = "danger";
|
||||||
} elseif ($memused > 75) {
|
} elseif ($memused > 75) {
|
||||||
$memused_status = "warning";
|
$memused_status = "warning";
|
||||||
} elseif ($memused > 0) {
|
} elseif ($memused > 0) {
|
||||||
$memused_status = "success";
|
$memused_status = "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
// cpu load
|
// cpu load
|
||||||
$cpuload = $system->systemLoadPercentage();
|
$cpuload = $system->systemLoadPercentage();
|
||||||
if ($cpuload > 90) {
|
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";
|
||||||
}
|
}
|
||||||
|
|
||||||
// cpu temp
|
// cpu temp
|
||||||
$cputemp = $system->systemTemperature();
|
$cputemp = $system->systemTemperature();
|
||||||
if ($cputemp > 70) {
|
if ($cputemp > 70) {
|
||||||
$cputemp_status = "danger";
|
$cputemp_status = "danger";
|
||||||
} elseif ($cputemp > 50) {
|
} elseif ($cputemp > 50) {
|
||||||
$cputemp_status = "warning";
|
$cputemp_status = "warning";
|
||||||
} else {
|
} else {
|
||||||
$cputemp_status = "success";
|
$cputemp_status = "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
// hostapd status
|
// hostapd status
|
||||||
$hostapd = $system->hostapdStatus();
|
$hostapd = $system->hostapdStatus();
|
||||||
if ($hostapd) {
|
if ($hostapd[0] ==1) {
|
||||||
$hostapd_status = "success";
|
$hostapd_status = "active";
|
||||||
|
$hostapd_led = "service-status-up";
|
||||||
} else {
|
} else {
|
||||||
$hostapd_status = "danger";
|
$hostapd_status = "inactive";
|
||||||
|
$hostapd_led = "service-status-down";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user