zcv / index.html
Zhofang's picture
Create index.html
7bbb9c8 verified
<!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(0, 255, 0)', // Warna merah jadi hijau
borderColor: 'rgb(0, 255, 0)', // Warna merah jadi hijau
data: [],
fill: false,
}],
},
options: {
responsive: true,
title: {
display: true,
text: 'TELEGRAM @CANTDOWN + DSTAT-V2.SKYLINEX.EU.ORG/ATTACK + CACHED + Chaptha DSTAT + 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", "CACHED", "Chaptha DSTAT", "MAX RPS 1K", "CUSTOM HTML BY @VANO_GANZZZ"];
setInterval(() => {
document.title = titles[titleIndex];
titleIndex = (titleIndex + 1) % titles.length;
}, 2500);
});
</script>
</body>
</html>