服务器监控

This commit is contained in:
liuwei
2025-05-27 09:06:21 +08:00
parent 108735fdad
commit 60b6b9f491
6 changed files with 234 additions and 1 deletions

View File

@@ -17,6 +17,10 @@ APP_START_TIME = time.time()
@login_required
def api_docs():
return render_template('api_docs.html')
@system_bp.route('/system_status')
@login_required
def api_docs():
return render_template('system_status.html')
# 页面路由
@system_bp.route('/wx_logs')
@login_required

View File

@@ -176,6 +176,10 @@
<i class="el-icon-document"></i>
<span slot="title">接口文档</span>
</el-menu-item>
<el-menu-item index="14">
<i class="el-icon-document"></i>
<span slot="title">服务器监控</span>
</el-menu-item>
</el-menu>
</div>
@@ -241,7 +245,8 @@
'10': '/contacts',
'11': '/plugins_manage',
'12': '/virtual_group',
'13':'/api_docs'
'13':'/api_docs',
'14':'/system_status'
};
// 如果当前不在对应页面,则跳转

View File

@@ -0,0 +1,53 @@
{% extends "base.html" %}
{% block title %}服务器监控 - 机器人管理后台{% endblock %}
{% block content %}
<!-- 接口文档 -->
<div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover">
<div slot="header">
<span>服务器监控</span>
</div>
<div class="iframe-container">
<iframe src="http://localhost:61208/" frameborder="0" width="100%" height="800px"></iframe>
</div>
</el-card>
</el-col>
</el-row>
</div>
{% endblock %}
{% block scripts %}
<script>
new Vue({
el: '#app',
mixins: [baseApp],
data() {
return {
// 设置当前菜单项
currentView: '14' // 使用一个新的索引,确保在菜单中能正确高亮
}
},
mounted() {
// 页面加载时设置当前视图
this.currentView = '14';
}
});
</script>
<style>
.iframe-container {
width: 100%;
overflow: hidden;
}
.iframe-container iframe {
border: none;
width: 100%;
min-height: 800px;
}
</style>
{% endblock %}