nodeMonitor.blade.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. @extends('admin.layouts')
  2. @section('css')
  3. @endsection
  4. @section('title', '控制面板')
  5. @section('content')
  6. <!-- BEGIN CONTENT BODY -->
  7. <div class="page-content" style="padding-top:0;">
  8. <!-- BEGIN PAGE BASE CONTENT -->
  9. <div class="row">
  10. <div class="col-md-12">
  11. <div class="note note-info">
  12. <h3 class="block">{{$nodeName}}<small style="padding-left:10px;">{{$nodeServer}}</small></h3>
  13. <p> 提示:30日内流量统计不会统计当天,24小时内流量统计不会统计当前小时;如果无统计数据,请检查定时任务是否正常。 </p>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="row">
  18. <div class="col-md-12">
  19. <div class="portlet light bordered">
  20. <div class="portlet-body">
  21. <div id="chart1" style="width: auto;height:450px;"></div>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="row">
  27. <div class="col-md-12">
  28. <div class="portlet light bordered">
  29. <div class="portlet-body">
  30. <div id="chart2" style="width: auto;height:450px;"></div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. <!-- END PAGE BASE CONTENT -->
  36. </div>
  37. <!-- END CONTENT BODY -->
  38. @endsection
  39. @section('script')
  40. <script src="/assets/global/plugins/echarts/echarts.min.js" type="text/javascript"></script>
  41. <script type="text/javascript">
  42. var myChart = echarts.init(document.getElementById('chart1'));
  43. option = {
  44. title: {
  45. text: '24小时内流量',
  46. subtext: '单位M'
  47. },
  48. tooltip: {
  49. trigger: 'axis'
  50. },
  51. toolbox: {
  52. show: true,
  53. feature: {
  54. saveAsImage: {}
  55. }
  56. },
  57. xAxis: {
  58. type: 'category',
  59. boundaryGap: false,
  60. data: ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24']
  61. },
  62. yAxis: {
  63. type: 'value',
  64. axisLabel: {
  65. formatter: '{value} M'
  66. }
  67. },
  68. series: [
  69. @if(!empty($trafficHourly))
  70. {
  71. name:'{{$trafficHourly['nodeName']}}',
  72. type:'line',
  73. data:[{!! $trafficHourly['hourlyData'] !!}],
  74. markPoint: {
  75. data: [
  76. {type: 'max', name: '最大值'}
  77. ]
  78. }
  79. }
  80. @endif
  81. ]
  82. };
  83. myChart.setOption(option);
  84. </script>
  85. <script type="text/javascript">
  86. var myChart = echarts.init(document.getElementById('chart2'));
  87. option = {
  88. title: {
  89. text: '30日内流量',
  90. subtext: '单位M'
  91. },
  92. tooltip: {
  93. trigger: 'axis'
  94. },
  95. toolbox: {
  96. show: true,
  97. feature: {
  98. saveAsImage: {}
  99. }
  100. },
  101. xAxis: {
  102. type: 'category',
  103. boundaryGap: false,
  104. data: ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30']
  105. },
  106. yAxis: {
  107. type: 'value',
  108. axisLabel: {
  109. formatter: '{value} M'
  110. }
  111. },
  112. series: [
  113. @if(!empty($trafficDaily))
  114. {
  115. name:'{{$trafficDaily['nodeName']}}',
  116. type:'line',
  117. data:[{!! $trafficDaily['dailyData'] !!}],
  118. markPoint: {
  119. data: [
  120. {type: 'max', name: '最大值'}
  121. ]
  122. }
  123. }
  124. @endif
  125. ]
  126. };
  127. myChart.setOption(option);
  128. </script>
  129. @endsection