File size: 4,104 Bytes
c8f269c
adc96fd
 
 
 
 
 
47a2cc1
 
 
 
 
 
adc96fd
 
 
 
 
47a2cc1
adc96fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63a2951
 
adc96fd
 
 
 
 
 
 
 
e55334c
47a2cc1
adc96fd
 
 
 
 
 
 
 
 
 
 
 
 
47a2cc1
 
 
 
 
adc96fd
 
 
 
 
47a2cc1
 
 
 
 
adc96fd
 
 
 
 
cf30288
adc96fd
cf30288
adc96fd
cf30288
adc96fd
47492bb
adc96fd
 
 
 
 
 
 
 
 
 
47492bb
adc96fd
 
47a2cc1
f1f9b55
adc96fd
 
 
47a2cc1
adc96fd
 
 
cf30288
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Custom Dstat By @Vano_Ganzzz</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.css" rel="stylesheet">
    <style>
        body {
            background-color: black;
            color: white;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-12">
            <div class="card" style="border-radius: 50px; background-color: black;">
                <div class="card-body">
                    <canvas id="canvas"></canvas>
                </div>
            </div>
        </div>
    </div>
</div>
<!--suppress JSUnresolvedLibraryURL -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<!--suppress JSUnresolvedLibraryURL -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!--suppress JSUnresolvedLibraryURL -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"></script>
<script>
    $(document).ready(function () {
        const config = {
            type: 'line',
            data: {
                labels: [],
                datasets: [{
                    label: "requests",
                    backgroundColor: 'rgb(255, 0, 0)', // Warna merah jadi hijau
                    borderColor: 'rgb(255, 0, 0)', // Warna merah jadi hijau
                    data: [],
                    fill: false,
                }],
            },
            options: {
                responsive: true,
                title: {
                    display: true,
                    text: 'TELEGRAM @CANTDOWN + SKYLINEX.EU.ORG/ATTACK + MAX RPS 1K',
                    fontColor: 'white' // Warna teks judul jadi putih
                },
                tooltips: {
                    mode: 'index',
                    intersect: false,
                },
                hover: {
                    mode: 'nearest',
                    intersect: true
                },
                scales: {
                    xAxes: [{
                        display: true,
                        scaleLabel: {
                            display: true,
                            fontColor: 'white' // Warna teks label sumbu x jadi putih
                        },
                        ticks: {
                            fontColor: 'white' // Warna teks nilai sumbu x jadi putih
                        }
                    }],
                    yAxes: [{
                        display: true,
                        scaleLabel: {
                            display: true,
                            fontColor: 'white' // Warna teks label sumbu y jadi putih
                        },
                        ticks: {
                            fontColor: 'white' // Warna teks nilai sumbu y jadi putih
                        }
                    }]
                }
            }
        };

        const context = document.getElementById('canvas').getContext('2d');

        const lineChart = new Chart(context, config);

        const source = new EventSource("/chart-data");

        source.onmessage = function (event) {
            const data = JSON.parse(event.data);
            if (config.data.labels.length === 20) {
                config.data.labels.shift();
                config.data.datasets[0].data.shift();
            }
            config.data.labels.push(data.time);
            config.data.datasets[0].data.push(data.value);
            lineChart.update();
        }

        // Kenapa tuh kira²? wkwkwk
        let titleIndex = 0;
        const titles = ["Custom Dstat By @Vano_Ganzzz", "TELEGRAM @CANTDOWN", "MAX RPS 1K", "CUSTOM HTML BY @VANO_GANZZZ"];

        setInterval(() => {
            document.title = titles[titleIndex];
            titleIndex = (titleIndex + 1) % titles.length;
        }, 2500); 
    });
</script>
</body>
</html>