mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Add system time to System > Basic tab
This commit is contained in:
parent
47cbd520d0
commit
da091b9142
@ -40,6 +40,12 @@ class Sysinfo
|
|||||||
return $uptime;
|
return $uptime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function systime()
|
||||||
|
{
|
||||||
|
$systime = exec("date");
|
||||||
|
return $systime;
|
||||||
|
}
|
||||||
|
|
||||||
public function usedMemory()
|
public function usedMemory()
|
||||||
{
|
{
|
||||||
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
|
$used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
|
||||||
|
@ -138,6 +138,7 @@ function DisplaySystem(&$extraFooterScripts)
|
|||||||
$cores = $system->processorCount();
|
$cores = $system->processorCount();
|
||||||
$os = $system->operatingSystem();
|
$os = $system->operatingSystem();
|
||||||
$kernel = $system->kernelVersion();
|
$kernel = $system->kernelVersion();
|
||||||
|
$systime = $system->systime();
|
||||||
|
|
||||||
// mem used
|
// mem used
|
||||||
$memused = $system->usedMemory();
|
$memused = $system->usedMemory();
|
||||||
@ -207,6 +208,7 @@ function DisplaySystem(&$extraFooterScripts)
|
|||||||
"serverBind",
|
"serverBind",
|
||||||
"hostname",
|
"hostname",
|
||||||
"uptime",
|
"uptime",
|
||||||
|
"systime",
|
||||||
"cores",
|
"cores",
|
||||||
"os",
|
"os",
|
||||||
"kernel",
|
"kernel",
|
||||||
|
Binary file not shown.
@ -737,6 +737,9 @@ msgstr "Pi Revision"
|
|||||||
msgid "Uptime"
|
msgid "Uptime"
|
||||||
msgstr "Uptime"
|
msgstr "Uptime"
|
||||||
|
|
||||||
|
msgid "System Time"
|
||||||
|
msgstr "System Time"
|
||||||
|
|
||||||
msgid "Memory Used"
|
msgid "Memory Used"
|
||||||
msgstr "Memory Used"
|
msgstr "Memory Used"
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ include('includes/sysstats.php');
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<div class="info-item col-xs-3"><?php echo _("Uptime"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div>
|
<div class="info-item col-xs-3"><?php echo _("Uptime"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($uptime, ENT_QUOTES); ?></div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1">
|
||||||
|
<div class="info-item col-xs-3"><?php echo _("System Time"); ?></div><div class="info-value col-xs-3"><?php echo htmlspecialchars($systime, ENT_QUOTES); ?></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user