<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh">
<head>
<base href="<%=basePath%>">
<!-- jsp文件头和头部 -->
<%@ include file="../admin/top.jsp"%>
<script type="text/javascript">
$(top.hangge());
</script>
<style type="text/css">
#resourch_bar select {
border: solid 1px #C0C0C0;
appearance: none;
-moz-appearance: none;
font-size: 13px;
font-family: Arial, "Microsoft YaHei", 黑体, 宋体, sans-serif;
padding: 1px 5px;
height: 22px;
width: 130px;
margin-top: 7px;
} select::-ms-expand {
display: none;
} #top_bar_left {
font-weight: bold;
float: left;
font-size: 16px;
margin: 10px 20px;
} #resourch_bar {
margin: 0 20px;
text-align: right;
float: right;
}
</style>
</head>
<body>
<div id="top_bar_left" style="">CPU占用率统计</div> <div id="resourch_bar" style="">
IP地址:<select name="ip" id="ip" onchange="changeIp()" title="IP">
<option value="0">10.62.256.156</option>
<option value="1">10.62.256.12</option>
<%-- <c:forEach items="" var="menu">
<option value="">${menu.MENU_NAME }</option>
</c:forEach> --%>
</select>&nbsp;&nbsp;&nbsp;&nbsp; 进程名称:<select name="processName"
id="processName" onchange="changeProcessName()" title="进程名称">
<option value="0">zte_cloud1</option>
<option value="1">zte_cloud1_main1</option>
<%-- <c:forEach items="" var="menu">
<option value="">${menu.MENU_NAME }</option>
</c:forEach> --%>
</select>
</div> <div id="container"
style="min-width: 700px; min-height: 500px; margin: 0 10px;"></div> <!-- 引入 -->
<script type="text/javascript">
window.jQuery
|| document
.write("_$tag_______________________________________\x3C/script>");
</script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/ace-elements.min.js"></script>
<script src="static/js/ace.min.js"></script>
<!-- 引入 --> <script type="text/javascript">
$(function() {
$
.getJSON(
'http://www.hcharts.cn/datas/jsonp.php?filename=usdeur.json&callback=?',
function(data) {
var startDate = new Date(
data[data.length - 1][0]), // Get year of last data point
minRate = 1, maxRate = 0, startPeriod, date, rate, index;
startDate.setMonth(startDate.getMonth() - 3); // a quarter of a year before last data point
startPeriod = Date.UTC(startDate.getFullYear(),
startDate.getMonth(), startDate
.getDate());
for (index = data.length - 1; index >= 0; index = index - 1) {
date = data[index][0]; // data[i][0] is date
rate = data[index][1]; // data[i][1] is exchange rate
if (date < startPeriod) {
break; // stop measuring highs and lows
}
if (rate > maxRate) {
maxRate = rate;
}
if (rate < minRate) {
minRate = rate;
}
}
// Create the chart
$('#container').highcharts('StockChart', {
rangeSelector : {
selected : 1
},
title : {
/* text : 'CPU占用率统计(样板)' */
},
yAxis : {
title : {
text : 'CPU占用率(%)'
},
plotLines : [ {
value : minRate,
color : 'green',
dashStyle : 'shortdash',
width : 2,
label : {
text : '最近半小时最小值'
}
}, {
value : maxRate,
color : 'red',
dashStyle : 'shortdash',
width : 2,
label : {
text : '最近半小时最大值'
}
} ]
},
series : [ {
name : 'CPU占用率',
data : data,
tooltip : {
valueDecimals : 4
}
} ]
});
});
});
</script>
<script type="text/javascript">
var taskId = 1470211358843;
function changeIp() {
$.ajax({
type : "post",
async : false, //同步执行
url : "resource/getReourceIP?taskId=" + taskId,
//data:{taskId:taskId},
dataType : "json", //返回数据形式为json
success : function(data) {
console.log("1111");
var selectid = document.getElementById("ip");
for (var i = 0; i < data.length; i++) {
selectid[i] = new Option(data[i].TAGS, data[i].TAGS);
}
},
error : function(errorMsg) {
console.log("2222");
var selectid = document.getElementById("processName");
selectid[0] = new Option("---- 设置显示0 ----", 0);
selectid[1] = new Option("---- 设置显示1 ----", 1);
selectid[2] = new Option("---- 设置显示2 ----", 2);
}
});
}
</script>
<style type="text/css">
li {
list-style-type: none;
}
</style>
<script type="text/javascript" src="static/js/hcharts/highstock.js"></script>
<ul class="navigationTabs">
<li><a></a></li>
<li></li>
</ul>
</body>
</html>

最新文章

  1. 20145215&amp;20145307《信息安全系统设计基础》实验五 网络通信
  2. 英语语法 It all started the summer before second grade when our moving van pulled into her neighborhood
  3. JS高级程序设计2nd部分知识要点5
  4. Apache CXFjar包目录(转)
  5. Linux简单的常用命令——纯手打(慢慢积累)
  6. J2EE常用包:
  7. SQL Server 添加登录账户配置权限
  8. Python中TKinter模块中的Label组件
  9. NEC遥控信号解码(包含完整代码)
  10. 主题:Java WebService 简单实例
  11. iOS基础 - 控制器管理
  12. static 还是readonly 还是static readonly
  13. python之12306自动查票
  14. 常用LINQ关键字用法汇总
  15. 细说shiro之自定义filter
  16. SQL Server 2016新特性:Live Query Statistics
  17. C#使用 System.Net.Mail发送邮件功能
  18. Android--activity切换时的动画
  19. C#学习笔记(17)——C#中接口的作用
  20. 峰Spring4学习(5)bean之间的关系和bean的作用范围

热门文章

  1. POJ 2482 Stars in Your Window 线段树
  2. [转] Android 命名规范 (提高代码可以读性)
  3. Shell基础学习(六) 流程控制
  4. Android 应用程序的图标 (Icon) 应该设计成多大?
  5. SLVA299A : Load Disconnect ( Input to Output Isolation ) for the TPS61040
  6. setTimeout你知多少
  7. MySQL在windows系统的安装
  8. SharePoint 在中国为什么吃不开?
  9. 一个 forceLayout() 和 requestLayout() 的测试
  10. 描述 Machine.Config 和 Web.Config(转载)