Address system information and license review suggestions
This commit is contained in:
+10
-11
@@ -6,26 +6,23 @@ $e = View::escape(...);
|
||||
?>
|
||||
<header class="admin-heading"><h1><?= $e($title) ?></h1></header>
|
||||
<div class="admin-about">
|
||||
<section class="admin-panel admin-system-info" aria-labelledby="system-info-title" data-about-metrics
|
||||
data-cpu-total="<?= $e($metrics['cpu']['total'] ?? '') ?>" data-cpu-idle="<?= $e($metrics['cpu']['idle'] ?? '') ?>">
|
||||
<section class="admin-panel admin-system-info" aria-labelledby="system-info-title">
|
||||
<h2 id="system-info-title">版本与运行环境</h2>
|
||||
<dl>
|
||||
<div><dt>LaySite</dt><dd><?= $e($laysiteVersion) ?></dd></div>
|
||||
<div><dt>CPU 占用</dt><dd data-about-cpu>暂不可用</dd></div>
|
||||
<div><dt>内存占用</dt><dd data-about-memory><?= $e($metrics['memory'] ?? '暂不可用') ?></dd></div>
|
||||
<div><dt>媒体库占用</dt><dd><?= $e($mediaUsage['size']) ?><small>已登记文件,含归档资源</small></dd></div>
|
||||
<?php if ($mediaUsage['free'] !== null): ?>
|
||||
<div><dt>媒体磁盘可用</dt><dd><?= $e($mediaUsage['free']) ?></dd></div>
|
||||
<?php endif ?>
|
||||
</dl>
|
||||
<p class="field-note">CPU 和内存显示当前 Linux 系统可见的用量,页面可见时自动更新。</p>
|
||||
<details class="admin-options admin-about-details">
|
||||
<details class="admin-options admin-about-details" data-about-metrics>
|
||||
<summary>运行环境详情</summary>
|
||||
<dl>
|
||||
<?php foreach ($systemInfo as $name => $value): ?>
|
||||
<div><dt><?= $e($name) ?></dt><dd><?= $e($value) ?></dd></div>
|
||||
<?php endforeach ?>
|
||||
<div><dt>CPU 占用</dt><dd data-about-cpu>暂不可用</dd></div>
|
||||
<div><dt>内存占用</dt><dd data-about-memory><?= $e($memory ?? '暂不可用') ?></dd></div>
|
||||
<div><dt>媒体库占用</dt><dd><?= $e($mediaUsage['size']) ?><small>已登记文件,含归档资源</small></dd></div>
|
||||
<div><dt>媒体磁盘可用</dt><dd><?= $e($mediaUsage['free'] ?? '暂不可用') ?></dd></div>
|
||||
</dl>
|
||||
<p class="field-note">CPU 和内存显示 Linux 系统可见的用量,在详情展开且页面可见时自动更新。</p>
|
||||
</details>
|
||||
</section>
|
||||
<section class="admin-panel admin-licenses" aria-labelledby="system-licenses-title">
|
||||
@@ -42,12 +39,14 @@ $e = View::escape(...);
|
||||
<div>
|
||||
<?php if ($project['url'] !== ''): ?><a href="<?= $e($project['url']) ?>" target="_blank" rel="noopener noreferrer"><?= $e($project['name']) ?></a>
|
||||
<?php else: ?><?= $e($project['name']) ?><?php endif ?>
|
||||
<?php if ($project['version'] !== ''): ?><small><?= $e($project['version']) ?></small><?php endif ?>
|
||||
<?php if (!empty($project['version'])): ?><small><?= $e($project['version']) ?></small><?php endif ?>
|
||||
</div>
|
||||
<div>
|
||||
<span><?= $e($project['license']) ?></span>
|
||||
<?php if ($project['file'] !== null): ?>
|
||||
<a href="/admin/about/license/<?= $e($key) ?>" target="_blank" rel="noopener noreferrer" aria-label="<?= $e('查看 ' . $project['name'] . ' 的许可证全文') ?>">许可全文</a>
|
||||
<?php elseif ($project['url'] !== ''): ?>
|
||||
<a href="<?= $e($project['url']) ?>" target="_blank" rel="noopener noreferrer" aria-label="<?= $e('前往 ' . $project['name'] . ' 项目主页查看许可证') ?>">见项目主页</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user