forked from guohongze/adminset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPU MEM数据获取函数变更 新增按时间维度查询监控数据 将获取监控数据拆分为独立文件
- Loading branch information
Showing
10 changed files
with
449 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% extends 'base.html' %} | ||
{% block self_head_css_js %} | ||
<script src="/static/js/echarts.js"></script> | ||
{% endblock %} | ||
{% block content %} | ||
<script> | ||
window.onload=init; | ||
function init() { | ||
showhide(1); | ||
} | ||
function showhide(n) { | ||
var box = document.getElementById("monitor"); | ||
box.className="active"; | ||
} | ||
</script> | ||
<div class="content-wrapper"> | ||
<!-- Content Header (Page header) --> | ||
<section class="content-header"> | ||
</section> | ||
<!-- Main content --> | ||
<section class="content"> | ||
<div class="box box-info"> | ||
<div class="box-header with-border"> | ||
<h3 class="box-title">{{ hostname }} 监控信息</h3> | ||
</div> | ||
<div class="box-body"> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 0 %}"><li class="btn btn-default .btn-flat active">一小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 1 %}"><li class="btn btn-default .btn-flat">三小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 2 %}"><li class="btn btn-default .btn-flat">五小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 3 %}"><li class="btn btn-default .btn-flat">一天</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 4 %}"><li class="btn btn-default .btn-flat">三天</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 5 %}"><li class="btn btn-default .btn-flat">一周</li></a> | ||
</div> | ||
<div id="cpu" style="width: 800px;height:300px;"></div> | ||
<div id="memory" style="width: 800px;height:300px;"></div> | ||
|
||
</div> | ||
<!-- /.row --> | ||
<!-- /.box-body --> | ||
<div class="box-footer"> | ||
</div> | ||
<!-- /.box-footer--> | ||
</div> | ||
<script type="text/javascript"> | ||
var timing=0; //通过URL传递元组数值调用7天数据 | ||
</script> | ||
{% include 'monitor/get_data.html' %} | ||
</section> | ||
<!-- /.content --> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% extends 'base.html' %} | ||
{% block self_head_css_js %} | ||
<script src="/static/js/echarts.js"></script> | ||
{% endblock %} | ||
{% block content %} | ||
<script> | ||
window.onload=init; | ||
function init() { | ||
showhide(1); | ||
} | ||
function showhide(n) { | ||
var box = document.getElementById("monitor"); | ||
box.className="active"; | ||
} | ||
</script> | ||
<div class="content-wrapper"> | ||
<!-- Content Header (Page header) --> | ||
<section class="content-header"> | ||
</section> | ||
<!-- Main content --> | ||
<section class="content"> | ||
<div class="box box-info"> | ||
<div class="box-header with-border"> | ||
<h3 class="box-title">{{ hostname }} 监控信息</h3> | ||
</div> | ||
<div class="box-body"> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 0 %}"><li class="btn btn-default .btn-flat">一小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 1 %}"><li class="btn btn-default .btn-flat active">三小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 2 %}"><li class="btn btn-default .btn-flat">五小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 3 %}"><li class="btn btn-default .btn-flat">一天</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 4 %}"><li class="btn btn-default .btn-flat">三天</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 5 %}"><li class="btn btn-default .btn-flat">一周</li></a> | ||
</div> | ||
<div id="cpu" style="width: 800px;height:300px;"></div> | ||
<div id="memory" style="width: 800px;height:300px;"></div> | ||
|
||
</div> | ||
<!-- /.row --> | ||
<!-- /.box-body --> | ||
<div class="box-footer"> | ||
</div> | ||
<!-- /.box-footer--> | ||
</div> | ||
<script type="text/javascript"> | ||
var timing=1; //通过URL传递元组数值调用7天数据 | ||
</script> | ||
{% include 'monitor/get_data.html' %} | ||
</section> | ||
<!-- /.content --> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% extends 'base.html' %} | ||
{% block self_head_css_js %} | ||
<script src="/static/js/echarts.js"></script> | ||
{% endblock %} | ||
{% block content %} | ||
<script> | ||
window.onload=init; | ||
function init() { | ||
showhide(1); | ||
} | ||
function showhide(n) { | ||
var box = document.getElementById("monitor"); | ||
box.className="active"; | ||
} | ||
</script> | ||
<div class="content-wrapper"> | ||
<!-- Content Header (Page header) --> | ||
<section class="content-header"> | ||
</section> | ||
<!-- Main content --> | ||
<section class="content"> | ||
<div class="box box-info"> | ||
<div class="box-header with-border"> | ||
<h3 class="box-title">{{ hostname }} 监控信息</h3> | ||
</div> | ||
<div class="box-body"> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 0 %}"><li class="btn btn-default .btn-flat">一小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 1 %}"><li class="btn btn-default .btn-flat">三小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 2 %}"><li class="btn btn-default .btn-flat active">五小时</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 3 %}"><li class="btn btn-default .btn-flat">一天</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 4 %}"><li class="btn btn-default .btn-flat">三天</li></a> | ||
</div> | ||
<div class="btn-group btn-group-lg"> | ||
<a href="{% url 'host_info' hostname 5 %}"><li class="btn btn-default .btn-flat">一周</li></a> | ||
</div> | ||
<div id="cpu" style="width: 800px;height:300px;"></div> | ||
<div id="memory" style="width: 800px;height:300px;"></div> | ||
|
||
</div> | ||
<!-- /.row --> | ||
<!-- /.box-body --> | ||
<div class="box-footer"> | ||
</div> | ||
<!-- /.box-footer--> | ||
</div> | ||
<script type="text/javascript"> | ||
var timing=2; //通过URL传递元组数值调用7天数据 | ||
</script> | ||
{% include 'monitor/get_data.html' %} | ||
</section> | ||
<!-- /.content --> | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.