mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
fix(status): 修复系统状态页面布局问题并添加刷新功能
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<link rel="stylesheet" href="__STATIC__/admin/css/welcome.css?v={:time()}" media="all">
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<div style="margin-bottom: 15px; text-align: right;">
|
||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" id="refresh-btn"><i class="layui-icon layui-icon-refresh"></i> 刷新</button>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
@@ -15,25 +18,25 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>框架名称</td>
|
||||
<td class="status-label">框架名称</td>
|
||||
<td>{$systemInfo.framework}</td>
|
||||
<td>框架版本</td>
|
||||
<td class="status-label">框架版本</td>
|
||||
<td>{$systemInfo.version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Layui版本</td>
|
||||
<td class="status-label">Layui版本</td>
|
||||
<td>{$systemInfo.layui_version}</td>
|
||||
<td>ThinkPHP版本</td>
|
||||
<td class="status-label">ThinkPHP版本</td>
|
||||
<td>{$systemInfo.thinkphp_version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PHP版本</td>
|
||||
<td class="status-label">PHP版本</td>
|
||||
<td>{$systemInfo.php_version}</td>
|
||||
<td>服务器时间</td>
|
||||
<td class="status-label">服务器时间</td>
|
||||
<td>{$systemInfo.server_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>时区</td>
|
||||
<td class="status-label">时区</td>
|
||||
<td colspan="3">{$systemInfo.timezone}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -42,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md6">
|
||||
<div class="status-grid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-server icon icon-blue"></i>服务器环境</div>
|
||||
<div class="layui-card-body">
|
||||
@@ -53,32 +56,30 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>服务器软件</td>
|
||||
<td class="status-label">服务器软件</td>
|
||||
<td data-toggle="copy-text" data-clipboard-text="{$serverInfo.server_software}">
|
||||
{$serverInfo.server_software} <i class="fa fa-copy"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>操作系统</td>
|
||||
<td class="status-label">操作系统</td>
|
||||
<td data-toggle="copy-text" data-clipboard-text="{$serverInfo.os}">
|
||||
{$serverInfo.os} <i class="fa fa-copy"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>运行模式</td>
|
||||
<td class="status-label">运行模式</td>
|
||||
<td>{$serverInfo.sapi}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>服务器IP</td>
|
||||
<td class="status-label">服务器IP</td>
|
||||
<td>{$serverInfo.ip}:{$serverInfo.port}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-database icon icon-green"></i>数据库状态</div>
|
||||
<div class="layui-card-body">
|
||||
@@ -89,11 +90,11 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>数据库类型</td>
|
||||
<td class="status-label">数据库类型</td>
|
||||
<td>{$databaseInfo.type}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>连接状态</td>
|
||||
<td class="status-label">连接状态</td>
|
||||
<td>
|
||||
{if $databaseInfo.status == 'connected'}
|
||||
<span class="layui-badge layui-bg-green">正常</span>
|
||||
@@ -105,24 +106,24 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据库版本</td>
|
||||
<td class="status-label">数据库版本</td>
|
||||
<td>{$databaseInfo.version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据库名称</td>
|
||||
<td class="status-label">数据库名称</td>
|
||||
<td>{$databaseInfo.database}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>表前缀</td>
|
||||
<td class="status-label">表前缀</td>
|
||||
<td>{$databaseInfo.prefix}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>数据表数量</td>
|
||||
<td class="status-label">数据表数量</td>
|
||||
<td>{$databaseInfo.table_count}</td>
|
||||
</tr>
|
||||
{if $databaseInfo.status == 'error'}
|
||||
<tr>
|
||||
<td>错误信息</td>
|
||||
<td class="status-label">错误信息</td>
|
||||
<td class="layui-text-red">{$databaseInfo.error}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
@@ -130,9 +131,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-hdd-o icon icon-orange"></i>存储状态</div>
|
||||
<div class="layui-card-body">
|
||||
@@ -143,25 +142,25 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>根目录</td>
|
||||
<td class="status-label">根目录</td>
|
||||
<td data-toggle="copy-text" data-clipboard-text="{$storageInfo.root_path}">
|
||||
{$storageInfo.root_path} <i class="fa fa-copy"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>总容量</td>
|
||||
<td class="status-label">总容量</td>
|
||||
<td>{$storageInfo.total}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>已用空间</td>
|
||||
<td class="status-label">已用空间</td>
|
||||
<td>{$storageInfo.used}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>可用空间</td>
|
||||
<td class="status-label">可用空间</td>
|
||||
<td>{$storageInfo.free}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>使用率</td>
|
||||
<td class="status-label">使用率</td>
|
||||
<td>
|
||||
<div class="layui-progress" lay-showpercent="true" lay-filter="storage">
|
||||
<div class="layui-progress-bar" lay-percent="{$storageInfo.usage_percent}%"></div>
|
||||
@@ -172,9 +171,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-bolt icon icon-yellow"></i>缓存配置</div>
|
||||
<div class="layui-card-body">
|
||||
@@ -185,27 +182,27 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>默认驱动</td>
|
||||
<td class="status-label">默认驱动</td>
|
||||
<td>{$cacheInfo.default_driver}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>驱动类型</td>
|
||||
<td class="status-label">驱动类型</td>
|
||||
<td>{$cacheInfo.type}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>缓存路径</td>
|
||||
<td class="status-label">缓存路径</td>
|
||||
<td>{$cacheInfo.path}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>缓存前缀</td>
|
||||
<td class="status-label">缓存前缀</td>
|
||||
<td>{$cacheInfo.prefix}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>有效期</td>
|
||||
<td class="status-label">有效期</td>
|
||||
<td>{$cacheInfo.expire == 0 ? '永久' : $cacheInfo.expire . '秒'}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>状态</td>
|
||||
<td class="status-label">状态</td>
|
||||
<td>
|
||||
{if $cacheInfo.status == 'available'}
|
||||
<span class="layui-badge layui-bg-green">可用</span>
|
||||
@@ -218,7 +215,7 @@
|
||||
</tr>
|
||||
{if $cacheInfo.status == 'error'}
|
||||
<tr>
|
||||
<td>错误信息</td>
|
||||
<td class="status-label">错误信息</td>
|
||||
<td class="layui-text-red">{$cacheInfo.error}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
@@ -226,9 +223,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-code icon icon-purple"></i>PHP配置</div>
|
||||
<div class="layui-card-body">
|
||||
@@ -239,35 +234,35 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>上传文件限制</td>
|
||||
<td class="status-label">上传文件限制</td>
|
||||
<td>{$phpConfigInfo.upload_max_filesize}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>POST最大限制</td>
|
||||
<td class="status-label">POST最大限制</td>
|
||||
<td>{$phpConfigInfo.post_max_size}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>内存限制</td>
|
||||
<td class="status-label">内存限制</td>
|
||||
<td>{$phpConfigInfo.memory_limit}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最大执行时间</td>
|
||||
<td class="status-label">最大执行时间</td>
|
||||
<td>{$phpConfigInfo.max_execution_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>最大输入时间</td>
|
||||
<td class="status-label">最大输入时间</td>
|
||||
<td>{$phpConfigInfo.max_input_time}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>文件上传</td>
|
||||
<td class="status-label">文件上传</td>
|
||||
<td>{$phpConfigInfo.file_uploads}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Allow URL Fopen</td>
|
||||
<td class="status-label">Allow URL Fopen</td>
|
||||
<td>{$phpConfigInfo.allow_url_fopen}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>禁用函数</td>
|
||||
<td class="status-label">禁用函数</td>
|
||||
<td class="layui-text-gray" title="{$phpConfigInfo.disabled_functions}">
|
||||
{php}echo mb_strlen($phpConfigInfo['disabled_functions']) > 50 ? mb_substr($phpConfigInfo['disabled_functions'], 0, 50) . '...' : $phpConfigInfo['disabled_functions'];{/php}
|
||||
</td>
|
||||
@@ -276,9 +271,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-tachometer icon icon-cyan"></i>性能指标</div>
|
||||
<div class="layui-card-body">
|
||||
@@ -289,15 +282,15 @@
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>内存使用</td>
|
||||
<td class="status-label">内存使用</td>
|
||||
<td>{$performanceInfo.memory_usage}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>内存限制</td>
|
||||
<td class="status-label">内存限制</td>
|
||||
<td>{$performanceInfo.memory_limit}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>内存使用率</td>
|
||||
<td class="status-label">内存使用率</td>
|
||||
<td>
|
||||
<div class="layui-progress" lay-showpercent="true" lay-filter="memory">
|
||||
<div class="layui-progress-bar" lay-percent="{$performanceInfo.memory_percent}%"></div>
|
||||
@@ -305,11 +298,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>峰值内存</td>
|
||||
<td class="status-label">峰值内存</td>
|
||||
<td>{$performanceInfo.peak_memory}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>系统负载</td>
|
||||
<td class="status-label">系统负载</td>
|
||||
<td>{$performanceInfo.load_average}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -34,6 +34,10 @@ $(function () {
|
||||
layer.msg('复制失败,请手动复制', {icon: 2});
|
||||
});
|
||||
}
|
||||
|
||||
$('#refresh-btn').on('click', function () {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
|
||||
ua.listen();
|
||||
|
||||
@@ -102,4 +102,25 @@
|
||||
|
||||
.osc_link_color {
|
||||
color: #9B9B9B !important
|
||||
}
|
||||
|
||||
.status-label {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 15px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.status-grid .layui-card {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.status-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user