Repository navigation
Expand file tree
/
Copy pathuserMonitor.blade.php
More file actions
138 lines (132 loc) · 4.43 KB
/
Copy pathuserMonitor.blade.php
File metadata and controls
138 lines (132 loc) · 4.43 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
@extends('admin.layouts')
@section('css')
@endsection
@section('content')
<!-- BEGIN CONTENT BODY -->
<div class="page-content" style="padding-top:0;">
<!-- BEGIN PAGE BASE CONTENT -->
<div class="row">
<div class="col-md-12">
<div class="note note-info">
<h3 class="block">{{$username}}</h3>
<p> 提示:月流量统计不会统计当天,日流量统计不会统计当前小时;如果无统计数据,请检查定时任务是否正常。(每月1日和每日0时因为没有统计流量,不显示流量) </p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered">
<div class="portlet-body">
<div id="chart1" style="width: auto;height:450px;"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light bordered">
<div class="portlet-body">
<div id="chart2" style="width: auto;height:450px;"></div>
</div>
</div>
</div>
</div>
<!-- END PAGE BASE CONTENT -->
</div>
<!-- END CONTENT BODY -->
@endsection
@section('script')
<script src="/assets/global/plugins/echarts/echarts.min.js" type="text/javascript"></script>
<script type="text/javascript">
var myChart = echarts.init(document.getElementById('chart1'));
option = {
title: {
text: '今日流量',
subtext: '单位 / G'
},
tooltip: {
trigger: 'axis'
},
toolbox: {
show: true,
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} G'
}
},
series: [
@if(!empty($trafficHourly))
@foreach($trafficHourly as $traffic)
{
name:'{{$traffic['nodeName']}}',
type:'line',
data:[{!! $traffic['hourlyData'] !!}],
markPoint: {
data: [
{type: 'max', name: '最大值'}
]
}
},
@endforeach
@endif
]
};
myChart.setOption(option);
</script>
<script type="text/javascript">
var myChart = echarts.init(document.getElementById('chart2'));
option = {
title: {
text: '本月流量',
subtext: '单位 / G'
},
tooltip: {
trigger: 'axis'
},
toolbox: {
show: true,
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [{!! $monthDays !!}]
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} G'
}
},
series: [
@if(!empty($trafficDaily))
@foreach($trafficDaily as $traffic)
{
name:'{{$traffic['nodeName']}}',
type:'line',
data:[{!! $traffic['dailyData'] !!}],
markPoint: {
data: [
{type: 'max', name: '最大值'}
]
}
},
@endforeach
@endif
]
};
myChart.setOption(option);
</script>
@endsection