forked from RafalWilinski/express-status-monitor
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathindex.html
132 lines (121 loc) · 3.1 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>{{title}} status</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.5.0/socket.io.min.js"></script>
<style>
* {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
h1 {
font-size: 3em;
color: #222222;
margin: 0;
}
h5 {
margin: 0;
color: #888888;
}
p {
font-size: 0.7em;
color: #888888;
}
span {
cursor: pointer;
font-size: 10px;
margin-left: 5px;
border: 1px solid #ddd;
padding: 3px 10px 4px 10px;
}
canvas {
width: 400px;
height: 100px;
}
.active {
background: #eeeeee;
}
.stats-column {
flex: 0 0 200px;
}
.container {
display: flex;
flex-direction: row;
margin-top: 20px;
height: 100px;
}
.chart-container {
width: 400px;
height: 100px;
}
.footer {
position: fixed;
margin: auto;
text-align: center;
left: 0;
right: 0;
bottom: 0;
}
.span-controls {
float: right;
}
</style>
</head>
<body>
<div style="width: 600px; margin: auto">
<div class="header">
<b>{{title}} Status</b>
<div id="span-controls" class="span-controls"></div>
</div>
<div class="container">
<div class="stats-column">
<h5>CPU Usage</h5>
<h1 id="cpuStat">- %</h1>
</div>
<div class="chart-container">
<canvas id="cpuChart" width="400" height="100"></canvas>
</div>
</div>
<div class="container">
<div class="stats-column">
<h5>Memory Usage</h5>
<h1 id="memStat">- %</h1>
</div>
<div class="chart-container">
<canvas id="memChart" width="200" height="100"></canvas>
</div>
</div>
<div class="container">
<div class="stats-column">
<h5>One Minute Load Avg</h5>
<h1 id="loadStat">-</h1>
</div>
<div class="chart-container">
<canvas id="loadChart" width="200" height="100"></canvas>
</div>
</div>
<div class="container">
<div class="stats-column">
<h5>Response Time</h5>
<h1 id="responseTimeStat">-</h1>
</div>
<div class="chart-container">
<canvas id="responseTimeChart" width="200" height="100"></canvas>
</div>
</div>
<div class="container">
<div class="stats-column">
<h5>Requests per Second</h5>
<h1 id="rpsStat">-</h1>
</div>
<div class="chart-container">
<canvas id="rpsChart" width="200" height="100"></canvas>
</div>
</div>
<div class="footer">
<p>Made with ♥ with Socket.io & Chart.js</p>
</div>
</div>
<script src="{{path}}/koa-monitor-frontend.js"></script>
</body>
</html>