Create index.html
Browse files- index.html +115 -0
index.html
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<title>Custom Dstat By @Vano_Ganzzz</title>
|
6 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
|
7 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.css" rel="stylesheet">
|
8 |
+
<style>
|
9 |
+
body {
|
10 |
+
background-color: black;
|
11 |
+
color: white;
|
12 |
+
}
|
13 |
+
</style>
|
14 |
+
</head>
|
15 |
+
<body>
|
16 |
+
<div class="container">
|
17 |
+
<div class="row">
|
18 |
+
<div class="col-12">
|
19 |
+
<div class="card" style="border-radius: 50px; background-color: black;">
|
20 |
+
<div class="card-body">
|
21 |
+
<canvas id="canvas"></canvas>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
<!--suppress JSUnresolvedLibraryURL -->
|
28 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
29 |
+
<!--suppress JSUnresolvedLibraryURL -->
|
30 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
31 |
+
<!--suppress JSUnresolvedLibraryURL -->
|
32 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"></script>
|
33 |
+
<script>
|
34 |
+
$(document).ready(function () {
|
35 |
+
const config = {
|
36 |
+
type: 'line',
|
37 |
+
data: {
|
38 |
+
labels: [],
|
39 |
+
datasets: [{
|
40 |
+
label: "requests",
|
41 |
+
backgroundColor: 'rgb(0, 255, 0)', // Warna merah jadi hijau
|
42 |
+
borderColor: 'rgb(0, 255, 0)', // Warna merah jadi hijau
|
43 |
+
data: [],
|
44 |
+
fill: false,
|
45 |
+
}],
|
46 |
+
},
|
47 |
+
options: {
|
48 |
+
responsive: true,
|
49 |
+
title: {
|
50 |
+
display: true,
|
51 |
+
text: 'TELEGRAM @CANTDOWN + DSTAT-V2.SKYLINEX.EU.ORG/ATTACK + CACHED + Chaptha DSTAT + MAX RPS 1K',
|
52 |
+
fontColor: 'white' // Warna teks judul jadi putih
|
53 |
+
},
|
54 |
+
tooltips: {
|
55 |
+
mode: 'index',
|
56 |
+
intersect: false,
|
57 |
+
},
|
58 |
+
hover: {
|
59 |
+
mode: 'nearest',
|
60 |
+
intersect: true
|
61 |
+
},
|
62 |
+
scales: {
|
63 |
+
xAxes: [{
|
64 |
+
display: true,
|
65 |
+
scaleLabel: {
|
66 |
+
display: true,
|
67 |
+
fontColor: 'white' // Warna teks label sumbu x jadi putih
|
68 |
+
},
|
69 |
+
ticks: {
|
70 |
+
fontColor: 'white' // Warna teks nilai sumbu x jadi putih
|
71 |
+
}
|
72 |
+
}],
|
73 |
+
yAxes: [{
|
74 |
+
display: true,
|
75 |
+
scaleLabel: {
|
76 |
+
display: true,
|
77 |
+
fontColor: 'white' // Warna teks label sumbu y jadi putih
|
78 |
+
},
|
79 |
+
ticks: {
|
80 |
+
fontColor: 'white' // Warna teks nilai sumbu y jadi putih
|
81 |
+
}
|
82 |
+
}]
|
83 |
+
}
|
84 |
+
}
|
85 |
+
};
|
86 |
+
|
87 |
+
const context = document.getElementById('canvas').getContext('2d');
|
88 |
+
|
89 |
+
const lineChart = new Chart(context, config);
|
90 |
+
|
91 |
+
const source = new EventSource("/chart-data");
|
92 |
+
|
93 |
+
source.onmessage = function (event) {
|
94 |
+
const data = JSON.parse(event.data);
|
95 |
+
if (config.data.labels.length === 20) {
|
96 |
+
config.data.labels.shift();
|
97 |
+
config.data.datasets[0].data.shift();
|
98 |
+
}
|
99 |
+
config.data.labels.push(data.time);
|
100 |
+
config.data.datasets[0].data.push(data.value);
|
101 |
+
lineChart.update();
|
102 |
+
}
|
103 |
+
|
104 |
+
// Kenapa tuh kira²? wkwkwk
|
105 |
+
let titleIndex = 0;
|
106 |
+
const titles = ["Custom Dstat By @Vano_Ganzzz", "TELEGRAM @CANTDOWN", "CACHED", "Chaptha DSTAT", "MAX RPS 1K", "CUSTOM HTML BY @VANO_GANZZZ"];
|
107 |
+
|
108 |
+
setInterval(() => {
|
109 |
+
document.title = titles[titleIndex];
|
110 |
+
titleIndex = (titleIndex + 1) % titles.length;
|
111 |
+
}, 2500);
|
112 |
+
});
|
113 |
+
</script>
|
114 |
+
</body>
|
115 |
+
</html>
|