yii2-netdisk/views/admin/sysinfo.php

242 lines
6.9 KiB
PHP
Raw Normal View History

2024-04-09 19:01:34 +08:00
<?php
/* @var $this yii\web\View */
/* @var $systemInfo SystemInfoHelper */
2024-04-09 19:01:34 +08:00
use app\assets\FontAwesomeAsset;
use app\utils\SystemInfoHelper;
2024-04-09 19:01:34 +08:00
use yii\bootstrap5\Html;
FontAwesomeAsset::register($this);
$this->title = '系统信息';
?>
<div class="system-info">
<h1><?= Html::encode($this->title) ?></h1>
<?php if ($systemInfo->EnableTimeRecords): ?>
<div>
<p>Time Records Helper</p>
<?php
print_r($systemInfo->timeRecords);
?>
</div>
<?php endif; ?>
2024-04-09 19:01:34 +08:00
<div>
<div>
<h2>
<i class="fa-solid fa-server"></i>
<?= $systemInfo->hostname ?>
2024-04-09 19:01:34 +08:00
</h2>
<p>
OS:
<strong><?= $systemInfo->os ?></strong>
2024-04-09 19:01:34 +08:00
</p>
<p>
CPU:
<strong><?= $systemInfo->cpu ?></strong>
2024-04-09 19:01:34 +08:00
</p>
<p>
RAM:
<strong><?= $systemInfo->ram ?></strong>
2024-04-09 19:01:34 +08:00
</p>
<p>
Server Time:
<strong><?= $systemInfo->serverTime ?></strong>
2024-04-09 19:01:34 +08:00
</p>
<p>
Server Up Time:
<strong><?= $systemInfo->serverUpTime ?></strong>
2024-04-09 19:01:34 +08:00
</p>
</div>
<hr>
<div>
<?php if ($systemInfo->osType === 2): ?>
<div>
<h2>
<i class="fa-solid fa-bars-progress"></i>
Load
</h2>
<!-- Load Graph -->
<p>
Load Average: <?= $systemInfo->load ?> (Last 1 min)
</p>
</div>
<?php endif; ?>
2024-04-09 19:01:34 +08:00
<div>
<h2>
<i class="fa-solid fa-microchip"></i>
CPU
</h2>
<!-- CPU Graph -->
<p>
CPU Usage: <?= $systemInfo->cpuUsage ?>%
2024-04-09 19:01:34 +08:00
</p>
</div>
<div>
<h2>
<i class="fa-solid fa-memory"></i>
Memory
2024-04-09 19:01:34 +08:00
</h2>
<!-- Memory Graph -->
2024-04-09 19:01:34 +08:00
<p>
<!-- RAM value -->
</p>
<p>
<!-- SWAP value -->
</p>
</div>
</div>
<hr>
<div>
<div>
<h2>
<i class="fa-solid fa-hard-drive"></i>
Disk
</h2>
</div>
<div>
<div>
<!-- disk chart -->
</div>
<div>
<h3>Data</h3>
Mount:
<span><?= $systemInfo->dataMountPoint ?></span>
2024-04-09 19:01:34 +08:00
<br>
File System:
<span><?= $systemInfo->mp_fs ?></span>
2024-04-09 19:01:34 +08:00
<br>
Size:
<span><?= $systemInfo->mp_size ?></span>
2024-04-09 19:01:34 +08:00
<br>
Free:
<span><?= $systemInfo->mp_avail ?></span>
2024-04-09 19:01:34 +08:00
<br>
Used:
<span><?= $systemInfo->mp_used ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
</div>
<hr>
<div>
<h2>
<i class="fa-solid fa-ethernet"></i>
Network
</h2>
<p>
Hostname:
<?= $systemInfo->hostname ?>
2024-04-09 19:01:34 +08:00
</p>
<p>
DNS:
<?= $systemInfo->dns ?>
2024-04-09 19:01:34 +08:00
</p>
<p>
Gateway:
<?= $systemInfo->gateway ?>
2024-04-09 19:01:34 +08:00
</p>
<div>
<div>
<div>
<h3><?= $systemInfo->nic['interfaceName'] ?></h3>
MAC:
<span><?= $systemInfo->nic['mac'] ?></span>
2024-04-09 19:01:34 +08:00
<br>
Speed:
<span><?= $systemInfo->nic['speed'] ?></span>
2024-04-09 19:01:34 +08:00
<br>
IPv4:
<span><?= $systemInfo->nic['ipv4'] ?></span>
2024-04-09 19:01:34 +08:00
<br>
IPv6:
<span><?= $systemInfo->nic['ipv6'] ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
</div>
</div>
<hr>
<div>
<h2>
<i class="fa-solid fa-users"></i>
Active Users
</h2>
<div>
All:
<span><?= $systemInfo->users ?></span>
2024-04-09 19:01:34 +08:00
<br>
Active (within 24h):
<span><?= $systemInfo->activeUsers ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
<hr>
<div>
<div>
<h2>
<i class="fa-solid fa-share-nodes"></i>
Share
</h2>
<div>
Link:
<span><?= $systemInfo->shares ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
<div>
<h2>
<i class="fa-solid fa-paper-plane"></i>
Collection
</h2>
<div>
Collection:
<span><?= $systemInfo->collections ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
</div>
<hr>
<div>
<div>
<h2>
<i class="fa-brands fa-php"></i>
PHP
</h2>
<div>
Version:
<span><?= $systemInfo->phpVersion ?></span>
2024-04-09 19:01:34 +08:00
<br>
Memory Limit:
<span><?= $systemInfo->memoryLimit ?></span>
2024-04-09 19:01:34 +08:00
<br>
Max Execution Time:
<span><?= $systemInfo->maxExecutionTime ?></span>
2024-04-09 19:01:34 +08:00
<br>
Upload Max Filesize:
<span><?= $systemInfo->uploadMaxFilesize ?></span>
2024-04-09 19:01:34 +08:00
<br>
Post Max Size:
<span><?= $systemInfo->postMaxSize ?></span>
2024-04-09 19:01:34 +08:00
<br>
Extension:
<span><?= $systemInfo->extensions ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
<div>
<h2>
<i class="fa-solid fa-database"></i>
Database
</h2>
<div>
Type:
<span><?= $systemInfo->dbType ?></span>
2024-04-09 19:01:34 +08:00
<br>
Version:
<span><?= $systemInfo->dbVersion ?></span>
2024-04-09 19:01:34 +08:00
<br>
Size:
<span><?= $systemInfo->dbSize ?></span>
2024-04-09 19:01:34 +08:00
</div>
</div>
</div>
</div>
</div>