服务器监控
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
};
|
||||
|
||||
// 如果当前不在对应页面,则跳转
|
||||
|
||||
53
admin/dashboard/templates/system_status.html
Normal file
53
admin/dashboard/templates/system_status.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user