| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- {// 引入标签库 }
- <tagLib name="html" />
- <include file="Public:header" />
- <div class="blank5"></div>
- <!--<script>-->
- <!--function equipment_info(id)-->
- <!--{-->
- <!--return "<a location.href = ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=equipment_info&id="+id></a>-->
- <!--}-->
- <!--</script>-->
- <div class="main">
- <div class="main_title">{$user.nick_name} {%EQUIPMENT_INFO}
- <a style="margin-left: 20px;" href="">刷新</a></div>
- <div class="blank5"></div>
- <div class='wrapper'>
- <input type="hidden" value="{$monitor_time}" name="monitor_time" id="monitor_time"/>
- <input type="hidden" value="{$appCPURate}" name="appCPURate" id="appCPURate"/>
- <input type="hidden" value="{$sysCPURate}" name="sysCPURate" id="sysCPURate"/>
- <input type="hidden" value="{$sendKBps}" name="sendKBps" id="sendKBps"/>
- <input type="hidden" value="{$recvKBps}" name="recvKBps" id="recvKBps"/>
- <input type="hidden" value="{$sendLossRate}" name="sendLossRate" id="sendLossRate"/>
- <input type="hidden" value="{$fps}" name="fps" id="fps"/>
- <input type="hidden" value="{$device}" name="device" id="device"/>
- <input type="hidden" value="{$vote_number}" name="vote_number" id="vote_number"/>
- <input type="hidden" value="{$watch_number}" name="watch_number" id="watch_number"/>
- <input type="hidden" value="<?php echo $_REQUEST['id'] ?>" name="id"/>
- <load href='__TMPL__Common/js/highcharts.js' />
- <load href='__TMPL__Common/js/exporting.js' />
- <script type="text/javascript">
- //appcpu占用率
- appCPURate=$("input[name='appCPURate']").val();
- var appCPURateobj = eval ("[" + appCPURate + "]");
- //系统cpu占用率
- sysCPURate=$("input[name='sysCPURate']").val();
- var sysCPURateobj = eval ("[" + sysCPURate + "]");
- //上行速率
- sendKBps=$("input[name='sendKBps']").val();
- var sendKBpsobj = eval ("[" + sendKBps + "]");
- //下行速率
- recvKBps=$("input[name='recvKBps']").val();
- var recvKBpsobj = eval ("[" + recvKBps + "]");
- //上行丢包率
- sendLossRate=$("input[name='sendLossRate']").val();
- var sendLossRateobj = eval ("[" + sendLossRate + "]");
- //视频帧率fps
- fps=$("input[name='fps']").val();
- var fpsobj = eval ("[" + fps + "]");
- //时间采集点
- monitor_time=$("input[name='monitor_time']").val();
- var timeobj = monitor_time.split(",");
- //设备类型
- model=$("input[name='device']").val();
- //当前观看人数
- watch_number=$("input[name='watch_number']").val();
- var watch_numberobj = eval ("[" + watch_number + "]");
- //当前印票数
- vote_number=$("input[name='vote_number']").val();
- var vote_numberobj = eval ("[" + vote_number + "]");
- //分成两部分显示,因为印票数和在线人数值过大,与其他数值显示起来不够美观
- //印票数和在线人数统计
- $(function () {
- $('#container').highcharts({
- chart: {
- },
- title: {
- text: '用户设备:'+model
- },
- //x轴
- xAxis: {
- //有数据才会显示X轴上的时间,没有则会隐藏,5分钟统计一次,监控两小时。
- categories: timeobj
- },
- //y轴
- yAxis:{
- title:{
- text:'设备信息'
- },
- allowDecimals: false,
- min:0
- },
- tooltip: {
- formatter: function() {
- var s;
- if (this.point.name) { // the pie chart
- s = ''+
- this.point.name +': '+ this.y +' fruits';
- } else {
- s = ''+
- this.x+':'+this.series.name +': '+ this.y;
- }
- return s;
- }
- },
- exporting:{
- enabled:false
- },
- credits: {
- enabled: false
- },
- series: [
- {
- type: 'spline',
- name: '当前观看人数',
- data: watch_numberobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- },
- {
- type: 'spline',
- name: '当前{%TICKET}',
- data: vote_numberobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- }]
- });
- });
- //其他设备信息
- $(function () {
- $('#container1').highcharts({
- chart: {
- },
- title: {
- text: ''
- },
- //x轴
- xAxis: {
- //有数据才会显示X轴上的时间,没有则会隐藏,5分钟统计一次,监控两小时。
- categories: timeobj
- },
- //y轴
- yAxis:{
- title:{
- text:'设备信息'
- },
- allowDecimals: false,
- min:0
- },
- tooltip: {
- formatter: function() {
- var s;
- if (this.point.name) { // the pie chart
- s = ''+
- this.point.name +': '+ this.y +' fruits';
- } else {
- s = ''+
- this.x+':'+this.series.name +': '+ this.y;
- }
- return s;
- }
- },
- exporting:{
- enabled:false
- },
- credits: {
- enabled: false
- },
- series: [
- {
- type: 'spline',
- name: 'APPCPU占用率(%)',
- data: appCPURateobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- },
- {
- type: 'spline',
- name: '系统CPU占用率(%)',
- data: sysCPURateobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- },
- {
- type: 'spline',
- name: '上行速率(KBps)',
- data: sendKBpsobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- },
- {
- type: 'spline',
- name: '下行速率(KBps)',
- data: recvKBpsobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- },
- {
- type: 'spline',
- name: '上行丢包率(%)',
- data: sendLossRateobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- },
- {
- type: 'spline',
- name: '视频帧率fps(fps)',
- data: fpsobj,
- marker: {
- lineWidth: 2,
- lineColor: Highcharts.getOptions().colors[3],
- fillColor: 'white'
- }
- }]
- });
- });
- new Chart(document.getElementById("canvas").getContext("2d")).Line(myData)
- </script>
- <div id="container" style="width:100%;height:400px;margin:0 auto"></div>
- <div id="container1" style="width:100%;height:400px;margin:0 auto"></div>
- <h1 style="text-align: center;font-size: 15px">温馨提示:↑上列设备信息可以点击,查看自己想了解的信息吧</h1>
- </div>
- <div class="blank5"></div>
- <include file="Public:footer" />
|