equipment_info.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <div class="blank5"></div>
  5. <!--<script>-->
  6. <!--function equipment_info(id)-->
  7. <!--{-->
  8. <!--return "<a location.href = ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=equipment_info&id="+id></a>-->
  9. <!--}-->
  10. <!--</script>-->
  11. <div class="main">
  12. <div class="main_title">{$user.nick_name} {%EQUIPMENT_INFO}
  13. <a style="margin-left: 20px;" href="">刷新</a></div>
  14. <div class="blank5"></div>
  15. <div class='wrapper'>
  16. <input type="hidden" value="{$monitor_time}" name="monitor_time" id="monitor_time"/>
  17. <input type="hidden" value="{$appCPURate}" name="appCPURate" id="appCPURate"/>
  18. <input type="hidden" value="{$sysCPURate}" name="sysCPURate" id="sysCPURate"/>
  19. <input type="hidden" value="{$sendKBps}" name="sendKBps" id="sendKBps"/>
  20. <input type="hidden" value="{$recvKBps}" name="recvKBps" id="recvKBps"/>
  21. <input type="hidden" value="{$sendLossRate}" name="sendLossRate" id="sendLossRate"/>
  22. <input type="hidden" value="{$fps}" name="fps" id="fps"/>
  23. <input type="hidden" value="{$device}" name="device" id="device"/>
  24. <input type="hidden" value="{$vote_number}" name="vote_number" id="vote_number"/>
  25. <input type="hidden" value="{$watch_number}" name="watch_number" id="watch_number"/>
  26. <input type="hidden" value="<?php echo $_REQUEST['id'] ?>" name="id"/>
  27. <load href='__TMPL__Common/js/highcharts.js' />
  28. <load href='__TMPL__Common/js/exporting.js' />
  29. <script type="text/javascript">
  30. //appcpu占用率
  31. appCPURate=$("input[name='appCPURate']").val();
  32. var appCPURateobj = eval ("[" + appCPURate + "]");
  33. //系统cpu占用率
  34. sysCPURate=$("input[name='sysCPURate']").val();
  35. var sysCPURateobj = eval ("[" + sysCPURate + "]");
  36. //上行速率
  37. sendKBps=$("input[name='sendKBps']").val();
  38. var sendKBpsobj = eval ("[" + sendKBps + "]");
  39. //下行速率
  40. recvKBps=$("input[name='recvKBps']").val();
  41. var recvKBpsobj = eval ("[" + recvKBps + "]");
  42. //上行丢包率
  43. sendLossRate=$("input[name='sendLossRate']").val();
  44. var sendLossRateobj = eval ("[" + sendLossRate + "]");
  45. //视频帧率fps
  46. fps=$("input[name='fps']").val();
  47. var fpsobj = eval ("[" + fps + "]");
  48. //时间采集点
  49. monitor_time=$("input[name='monitor_time']").val();
  50. var timeobj = monitor_time.split(",");
  51. //设备类型
  52. model=$("input[name='device']").val();
  53. //当前观看人数
  54. watch_number=$("input[name='watch_number']").val();
  55. var watch_numberobj = eval ("[" + watch_number + "]");
  56. //当前印票数
  57. vote_number=$("input[name='vote_number']").val();
  58. var vote_numberobj = eval ("[" + vote_number + "]");
  59. //分成两部分显示,因为印票数和在线人数值过大,与其他数值显示起来不够美观
  60. //印票数和在线人数统计
  61. $(function () {
  62. $('#container').highcharts({
  63. chart: {
  64. },
  65. title: {
  66. text: '用户设备:'+model
  67. },
  68. //x轴
  69. xAxis: {
  70. //有数据才会显示X轴上的时间,没有则会隐藏,5分钟统计一次,监控两小时。
  71. categories: timeobj
  72. },
  73. //y轴
  74. yAxis:{
  75. title:{
  76. text:'设备信息'
  77. },
  78. allowDecimals: false,
  79. min:0
  80. },
  81. tooltip: {
  82. formatter: function() {
  83. var s;
  84. if (this.point.name) { // the pie chart
  85. s = ''+
  86. this.point.name +': '+ this.y +' fruits';
  87. } else {
  88. s = ''+
  89. this.x+':'+this.series.name +': '+ this.y;
  90. }
  91. return s;
  92. }
  93. },
  94. exporting:{
  95. enabled:false
  96. },
  97. credits: {
  98. enabled: false
  99. },
  100. series: [
  101. {
  102. type: 'spline',
  103. name: '当前观看人数',
  104. data: watch_numberobj,
  105. marker: {
  106. lineWidth: 2,
  107. lineColor: Highcharts.getOptions().colors[3],
  108. fillColor: 'white'
  109. }
  110. },
  111. {
  112. type: 'spline',
  113. name: '当前{%TICKET}',
  114. data: vote_numberobj,
  115. marker: {
  116. lineWidth: 2,
  117. lineColor: Highcharts.getOptions().colors[3],
  118. fillColor: 'white'
  119. }
  120. }]
  121. });
  122. });
  123. //其他设备信息
  124. $(function () {
  125. $('#container1').highcharts({
  126. chart: {
  127. },
  128. title: {
  129. text: ''
  130. },
  131. //x轴
  132. xAxis: {
  133. //有数据才会显示X轴上的时间,没有则会隐藏,5分钟统计一次,监控两小时。
  134. categories: timeobj
  135. },
  136. //y轴
  137. yAxis:{
  138. title:{
  139. text:'设备信息'
  140. },
  141. allowDecimals: false,
  142. min:0
  143. },
  144. tooltip: {
  145. formatter: function() {
  146. var s;
  147. if (this.point.name) { // the pie chart
  148. s = ''+
  149. this.point.name +': '+ this.y +' fruits';
  150. } else {
  151. s = ''+
  152. this.x+':'+this.series.name +': '+ this.y;
  153. }
  154. return s;
  155. }
  156. },
  157. exporting:{
  158. enabled:false
  159. },
  160. credits: {
  161. enabled: false
  162. },
  163. series: [
  164. {
  165. type: 'spline',
  166. name: 'APPCPU占用率(%)',
  167. data: appCPURateobj,
  168. marker: {
  169. lineWidth: 2,
  170. lineColor: Highcharts.getOptions().colors[3],
  171. fillColor: 'white'
  172. }
  173. },
  174. {
  175. type: 'spline',
  176. name: '系统CPU占用率(%)',
  177. data: sysCPURateobj,
  178. marker: {
  179. lineWidth: 2,
  180. lineColor: Highcharts.getOptions().colors[3],
  181. fillColor: 'white'
  182. }
  183. },
  184. {
  185. type: 'spline',
  186. name: '上行速率(KBps)',
  187. data: sendKBpsobj,
  188. marker: {
  189. lineWidth: 2,
  190. lineColor: Highcharts.getOptions().colors[3],
  191. fillColor: 'white'
  192. }
  193. },
  194. {
  195. type: 'spline',
  196. name: '下行速率(KBps)',
  197. data: recvKBpsobj,
  198. marker: {
  199. lineWidth: 2,
  200. lineColor: Highcharts.getOptions().colors[3],
  201. fillColor: 'white'
  202. }
  203. },
  204. {
  205. type: 'spline',
  206. name: '上行丢包率(%)',
  207. data: sendLossRateobj,
  208. marker: {
  209. lineWidth: 2,
  210. lineColor: Highcharts.getOptions().colors[3],
  211. fillColor: 'white'
  212. }
  213. },
  214. {
  215. type: 'spline',
  216. name: '视频帧率fps(fps)',
  217. data: fpsobj,
  218. marker: {
  219. lineWidth: 2,
  220. lineColor: Highcharts.getOptions().colors[3],
  221. fillColor: 'white'
  222. }
  223. }]
  224. });
  225. });
  226. new Chart(document.getElementById("canvas").getContext("2d")).Line(myData)
  227. </script>
  228. <div id="container" style="width:100%;height:400px;margin:0 auto"></div>
  229. <div id="container1" style="width:100%;height:400px;margin:0 auto"></div>
  230. <h1 style="text-align: center;font-size: 15px">温馨提示:↑上列设备信息可以点击,查看自己想了解的信息吧</h1>
  231. </div>
  232. <div class="blank5"></div>
  233. <include file="Public:footer" />