-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
330 lines (266 loc) · 11.7 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/png" href="https://flolon.cc/assets/images/logo.png">
<title>Flolon Server Info</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-webkit-font-smoothing: antialiased;
}
*,
*:before,
*:after {
-webkit-box-sizing: inherit;
box-sizing: inherit;
}
body {
margin: 0;
padding: 0;
background-color: #131a26;
color: #fff;
}
img {
max-width: 100%;
border: 0;
}
/* hr */
hr {
display: block;
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
hr.md {
margin: 25px 0;
}
hr.lg {
margin: 50px 0;
}
/*
// include //
Containers, rows, flow-text, and other useful stuff.
Credit to: materializecss.com
*/
.container {
margin: 0 auto;
max-width: 1280px;
width: calc(100% - 20px);
}
/* clear fix */
.clearfix::after {
content: "";
clear: both;
display: table;
}
@media only screen and (min-width: 601px) {
.container {
width: 95%;
}
}
@media only screen and (min-width: 993px) {
.container {
width: 85%;
}
}
/* ulility */
.hide {
display: none !important;
}
.left-align {
text-align: left;
}
.right-align {
text-align: right;
}
.center,
.center-align {
text-align: center;
}
.left {
float: left !important;
}
.right {
float: right !important;
}
.truncate {
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.flex-grow {
display: inline-block;
flex-grow: 1;
}
/* -------- new styles -------- */
/* links */
a.link {
color: inherit;
font-family: inherit;
}
a.link:hover {
color: #ffffff;
}
a.link:active {
color: #eeeeee;
}
a.noUnderline {
text-decoration: none;
}
/* topBar */
.topBar {
display: flex;
align-items: center;
margin: 0 0 2rem 0;
}
.topBar a {
display: flex;
align-items: center;
text-decoration: none;
color: inherit;
}
.topBar .logo {
display: block;
margin: auto;
max-height: 75px;
}
.topBar .title {
margin: 0 4px;
font-size: 1.5rem;
font-weight: 700;
color: rgba(255, 255, 255, 0.92);
}
@media only screen and (max-width: 400px) {
.topBar {
display: block;
text-align: center;
}
.topBar a {
display: block;
}
.topBar .logo {
margin: auto auto .5rem auto;
}
}
/* card */
.card {
padding: 1rem;
background-color: #212937;
border-radius: 5px;
color: rgba(255, 255, 255, 0.8);
}
.card hr {
margin: 12px auto;
}
.card .a {
font-weight: 600;
}
.card .i {
font-family: monospace;
}
.card .s {
font-family: monospace;
}
/* bottomInfo */
.bottomInfo {
display: flex;
align-items: center;
margin-top: .5rem;
color: rgba(255, 255, 255, 0.75);
}
.bottomInfo a:hover {
color: rgba(255, 255, 255, 0.65);
}
.bottomInfo a:active {
color: rgba(255, 255, 255, 0.85);
}
</style>
</head>
<body>
<div class="container" style="margin-top: 2.5rem;">
<div class="topBar">
<a href="https://server.flolon.cc">
<img class="logo"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAInUlEQVR4Xu2d2W8TRxzHJ6pQ+wSCB0hiZ+M4bhSFI+WG2AmUch+hFaqqCqkHbdVC+9I7PdWWY7mhF/d9tPSkx1sFQb6CnYu85Kn/ARL8AZWYqWZ27V2vx97ZzRjt2r9IeQjMjmfns7/v7zu/mU3qEHx5agbqPDUaGAwCIB57CAAIAPHYDHhsOBAhAMRjM+Cx4UCE1AKQwLLA0oZFDfPy9/qAc9cYIYxw4X+YfzRfY2nGLrL0iTGnkf5PD8yNrWPh9W0eG2/sCKHxa+PHEEJENs+KREjH1g619enWPkKINmT9m/1Mv8w/526JNjW3p82s19MLRfrLfYyb/sTGQ+JfxScVPxYTx1MxIOHecJ/Q5OuAXE8+73oeTNGHQWw8JL7TR0Dat7arkd5In1AksIde8MmfyOSLRqbYeEhiV8I/EdL+fLsa2awBMT/5VsnSOHBgiMkGk68JwXR/PUns9hmQ1t7WfITkwfCeUp7eu5+ofJoVyl/uo4Yk9vgNyCYDiONk7f2oIUk16S/Jat3QypK6Yxg5ZySaL2TnH7GHgST3+gnIc+1q6yaO7RW72bw1rrjzEoVZLKskuc9nQMIbw2I5RMCils1BAusVO/NgjWKrGSmKdIJIcr/fgGzQgEiTLLH1gfZ5oslaAGZ+/IWfT1IHUj7KIc+2qzRCKi45D2fyeRJKUgd9BqRlQ4uwZBVFkqjtfVg2ung8JHXIT0C2tKstGw0gJcJeaGHndA0z0cWndaFZIv+Q9OG0jySLAtnQIleyeFEj6trkLz5J+oiPgLRtaVPD68VdFif5PxDKP05LLFTiaLk9ZzZ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5MWuwpW6qO0VyF/DV2sAiNJlY3tL2FYqWQNHB6x7H5Omz5zeW1T5FtnFEGhz99+71/VXeSpcXLfvviLl99DykKq4cVm67R34ugiI/Z1USYvKAekyuSxeWbzMSn3gGwAi9fmiEdK01FRcFF2p6xFy+9vbldyulXqvsjurWIQ0LXFhe3NAvgMgUkGHerQIsbOo3PUBQfj29wBEOpDgkqCxH+LAotJaVuZYBiRLJhEaIcHFBhC7sok5khiQ4wBEJg/EgCzSgDgtczAgJwCIXCAxLULscgh3jxwjnDkJQKQDCSwKaDlE1PLm2mKCs6eykENkElFiitq0ULO9biQrexqAyOSBGJAFuu0VKO4VnCTBCGfPABC5QKKKGlzg0PbqxUaa1AfPDoJkySSiUCDzdSCWHGK7P0KBnAMgMnkgBmSee5c1eB6ASAcSmKu7LIeH16hkDV0YAsmSSURZqqiBeWVsb5kzVQzIRQAikwdiQPQIEX5tILdnQoFcAiDSgTQ+0ZhfGFqrumUXixjhocsARD6QTgNIUYmE9wuQTREyfGUYcohMIspiRc1FiJNKL4skTPDwVQAikwcKLg6qwU7d9rpYqQ//AECkAwnMceiyTJI18uMISJZMIsGFQTXQqQFxI1kj1wCITB6IAZkT0PZDeJKViwbe3xnECI/8BECkA2mc7dD2moqLoz+PgmTJJEIjpHGWBsROsqx7JtRljf4CQGTyQMH5QZVGiFvJGv0VgEgH0jCrgf+nV21+swKNkDu/3QHJkkkkODeoNsxuKL2nXuadDQbkdwAikwdiQPQIMZdNrKdQuC/gUCDXAYh0IPUz650VF3NRgxG+8wcAkQ+kwwBi+9utTesVKlljf45BDpFJJNgZVFmEODyTlSsujv0FQGTyQI2djWpjRwnba1dsxAiP/Q1ApAKpn1W/fcbjM16gf4CLIKZHdQjr5xgLF4t1BYtHrT0e/2c8KnVAPuqsIi/s+Oj+PTdUAOIxJAAEgHhsBjw2HIgQAOKxGfDYcCBCPAbkf7Z2SijUG85IAAAAAElFTkSuQmCC">
<span class="title">Flolon Server Info</span>
</a>
</div>
<div id="error" class="card" style="display: none; margin-bottom: .5rem;">
<span>Loading....</span>
</div>
<div class="card">
<div><span class="a">Server status: </span><span class="i" id="server_status">-</span></div>
<div><span class="a">Status: </span><span class="i" id="status">-</span></div>
<div><span class="a">Power status: </span><span class="i" id="power_status">-</span></div>
<hr>
<div><span class="a">OS: </span><span class="i" id="os">-</span></div>
<div><span class="a">Specs: </span><span class="i" id="specs">-</span></div>
<div><span class="a">Location: </span><span class="i" id="location">-</span></div>
<hr>
<div><span class="a">Main IPv4: </span><span class="i" id="main_ip">-</span></div>
<div><span class="a">IPv4 netmask: </span><span class="i" id="netmask_v4">-</span></div>
<div><span class="a">IPv4 gateway: </span><span class="i" id="gateway_v4">-</span></div>
<div><span class="a">Main IPv6: </span><span class="i" id="v6_main_ip">-</span></div>
<div><span class="a">IPv6 network: </span><span class="i" id="v6_network">-</span></div>
<div><span class="a">IPv6 size: </span><span class="i" id="v6_network_size">-</span></div>
</div>
<div class="bottomInfo">
<span class="flex-grow"></span>
<a class="link" id="apiLink" href="#">API</a>
<span style="margin: 0 4px; color: #aaa;">|</span>
<a class="link" onclick="loadInfo()" href="#">Refresh</a>
</div>
</div><!-- /container -->
<script>
function $(id) { //less typing
if (id.startsWith(".")) {
return document.getElementsByClassName(id.substring(1));
} else {
return document.getElementById(id);
}
}
function loadInfo() {
$('error').innerHTML = 'Loading...';
$('error').style.display = '';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
// request for data is done
var data = JSON.parse(xhttp.responseText);
$('error').style.display = 'none';
$('server_status').innerHTML = data['server_status'];
$('status').innerHTML = data['status'];
$('power_status').innerHTML = data['power_status'];
$('os').innerHTML = data['os'];
$('specs').innerHTML = 'RAM: ' + data['ram'] + ', vCPUs: ' + data['vcpu_count'] + ', Disk: ' + data['disk'];
$('location').innerHTML = data['region'];
$('main_ip').innerHTML = '<a class="link" target="_blank" href="http://' + data['main_ip'] + '">' + data['main_ip'] + '</a>';;
$('gateway_v4').innerHTML = data['gateway_v4'];
$('netmask_v4').innerHTML = data['netmask_v4'];
$('v6_main_ip').innerHTML = data['v6_main_ip'];
$('v6_network').innerHTML = data['v6_network'];
$('v6_network_size').innerHTML = data['v6_network_size'];
}
xhttp.onerror = function () {
$('error').innerHTML = '<span style="color: rgba(240, 100, 100, 1);">Error (' + this.status + ')</span>';
$('error').style.display = '';
}
};
//send request for all data
var apiUrl = 'https://fenserv1.fenpaws.com/api/info.php';
$('apiLink').href = apiUrl;
xhttp.open("GET", apiUrl, true);
xhttp.send();
}
loadInfo();
</script>
</body>
</html>