2026-04-27 19:45:25 +07:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en" data-bs-theme="dark">
|
2026-04-27 21:23:50 +07:00
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2026-04-27 21:27:32 +07:00
|
|
|
<title>Log Viewer // Grafana Style</title>
|
2026-04-27 21:23:50 +07:00
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
<link href="css/dataTables.bootstrap5.min.css" rel="stylesheet">
|
|
|
|
|
<script src="js/lucide.min.js"></script>
|
2026-04-27 21:23:50 +07:00
|
|
|
<script src="js/chart.js"></script>
|
2026-04-27 21:27:32 +07:00
|
|
|
<script src="js/chartjs-plugin-zoom.min.js"></script>
|
2026-04-27 21:23:50 +07:00
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
<style>
|
|
|
|
|
:root {
|
2026-04-27 21:23:50 +07:00
|
|
|
--sidebar-width: 260px;
|
2026-04-27 19:45:25 +07:00
|
|
|
--brand-color: #4ade80;
|
|
|
|
|
--bg-dark: #0f172a;
|
|
|
|
|
--card-dark: #1e293b;
|
|
|
|
|
--border-color: #334155;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-27 21:23:50 +07:00
|
|
|
body {
|
|
|
|
|
background-color: var(--bg-dark);
|
|
|
|
|
color: #f1f5f9;
|
|
|
|
|
font-family: 'Inter', sans-serif;
|
2026-04-27 21:27:32 +07:00
|
|
|
font-size: 0.82rem;
|
2026-04-27 19:45:25 +07:00
|
|
|
height: 100vh;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-27 21:23:50 +07:00
|
|
|
.wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
/* Sidebar */
|
|
|
|
|
aside {
|
|
|
|
|
width: var(--sidebar-width);
|
2026-04-27 21:23:50 +07:00
|
|
|
background: var(--card-dark);
|
2026-04-27 19:45:25 +07:00
|
|
|
border-right: 1px solid var(--border-color);
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
2026-04-27 21:23:50 +07:00
|
|
|
|
|
|
|
|
.sidebar-header {
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.file-list {
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
padding: 0.5rem;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
.file-item {
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 2px;
|
2026-04-27 21:27:32 +07:00
|
|
|
font-size: 0.75rem;
|
|
|
|
|
transition: 0.2s;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.file-item:hover {
|
|
|
|
|
background: rgba(255, 255, 255, 0.05);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.file-item.active {
|
|
|
|
|
background: rgba(74, 222, 128, 0.15);
|
|
|
|
|
color: var(--brand-color);
|
2026-04-27 19:45:25 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Main Content */
|
2026-04-27 21:23:50 +07:00
|
|
|
main {
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.top-bar {
|
2026-04-27 21:27:32 +07:00
|
|
|
padding: 0.6rem 1.5rem;
|
2026-04-27 21:23:50 +07:00
|
|
|
background: var(--card-dark);
|
2026-04-27 19:45:25 +07:00
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
2026-04-27 21:27:32 +07:00
|
|
|
z-index: 10;
|
2026-04-27 19:45:25 +07:00
|
|
|
}
|
|
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
/* Chart Area - Styled like Grafana */
|
|
|
|
|
.chart-section {
|
|
|
|
|
height: 200px;
|
|
|
|
|
background: #0b0e14;
|
2026-04-27 21:23:50 +07:00
|
|
|
padding: 10px 20px;
|
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
2026-04-27 21:27:32 +07:00
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-hint {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 5px;
|
|
|
|
|
right: 20px;
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
color: #64748b;
|
|
|
|
|
pointer-events: none;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
|
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
/* Toggles */
|
2026-04-27 19:45:25 +07:00
|
|
|
.level-toggles .btn {
|
|
|
|
|
border: none;
|
2026-04-27 21:23:50 +07:00
|
|
|
font-size: 0.7rem;
|
2026-04-27 21:27:32 +07:00
|
|
|
font-weight: 700;
|
|
|
|
|
padding: 4px 12px;
|
2026-04-27 21:23:50 +07:00
|
|
|
margin-right: 4px;
|
2026-04-27 21:27:32 +07:00
|
|
|
border-radius: 4px;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-check:not(:checked)+.btn {
|
2026-04-27 21:27:32 +07:00
|
|
|
opacity: 0.15;
|
2026-04-27 21:23:50 +07:00
|
|
|
filter: grayscale(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-dbg {
|
2026-04-27 21:27:32 +07:00
|
|
|
background: #38bdf8;
|
|
|
|
|
color: #000;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-inf {
|
2026-04-27 21:27:32 +07:00
|
|
|
background: #4ade80;
|
|
|
|
|
color: #000;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btn-wrn {
|
2026-04-27 21:27:32 +07:00
|
|
|
background: #fbbf24;
|
|
|
|
|
color: #000;
|
2026-04-27 19:45:25 +07:00
|
|
|
}
|
2026-04-27 21:23:50 +07:00
|
|
|
|
|
|
|
|
.btn-err {
|
2026-04-27 21:27:32 +07:00
|
|
|
background: #f87171;
|
|
|
|
|
color: #000;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Table */
|
|
|
|
|
.content-area {
|
|
|
|
|
flex-grow: 1;
|
2026-04-27 21:27:32 +07:00
|
|
|
padding: 1rem;
|
2026-04-27 21:23:50 +07:00
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.table-container {
|
|
|
|
|
background: var(--card-dark);
|
2026-04-27 21:27:32 +07:00
|
|
|
border-radius: 6px;
|
2026-04-27 19:45:25 +07:00
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
}
|
2026-04-27 21:23:50 +07:00
|
|
|
|
|
|
|
|
table.dataTable thead th {
|
2026-04-27 21:27:32 +07:00
|
|
|
background: #111827;
|
2026-04-27 21:23:50 +07:00
|
|
|
font-size: 0.7rem;
|
|
|
|
|
text-transform: uppercase;
|
2026-04-27 21:27:32 +07:00
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
color: #94a3b8;
|
2026-04-27 19:45:25 +07:00
|
|
|
border-bottom: 1px solid var(--border-color) !important;
|
|
|
|
|
}
|
2026-04-27 21:23:50 +07:00
|
|
|
|
|
|
|
|
.search-input {
|
2026-04-27 21:27:32 +07:00
|
|
|
background: #0f172a;
|
2026-04-27 21:23:50 +07:00
|
|
|
border: 1px solid var(--border-color);
|
|
|
|
|
color: white;
|
|
|
|
|
border-radius: 4px;
|
2026-04-27 21:27:32 +07:00
|
|
|
padding: 4px 12px;
|
2026-04-27 21:23:50 +07:00
|
|
|
font-size: 0.8rem;
|
2026-04-27 21:27:32 +07:00
|
|
|
width: 280px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.range-info {
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
color: var(--brand-color);
|
|
|
|
|
font-weight: 600;
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
2026-04-27 19:45:25 +07:00
|
|
|
</style>
|
|
|
|
|
</head>
|
2026-04-27 21:23:50 +07:00
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
<body>
|
|
|
|
|
|
2026-04-27 21:23:50 +07:00
|
|
|
<div class="wrapper">
|
|
|
|
|
<aside>
|
2026-04-27 21:27:32 +07:00
|
|
|
<div class="sidebar-header text-center">
|
|
|
|
|
<h6 class="mb-3 d-flex align-items-center justify-content-center gap-2">
|
|
|
|
|
<i data-lucide="bar-chart-3" class="text-success"></i> LOG EXPLORER
|
|
|
|
|
</h6>
|
|
|
|
|
<button class="btn btn-sm btn-outline-primary w-100 mb-2"
|
2026-04-27 21:23:50 +07:00
|
|
|
onclick="document.getElementById('dir-input').click()">
|
2026-04-27 21:27:32 +07:00
|
|
|
<i data-lucide="plus" size="14"></i> Select Project Folder
|
2026-04-27 21:23:50 +07:00
|
|
|
</button>
|
|
|
|
|
<input type="file" id="dir-input" webkitdirectory hidden>
|
2026-04-27 19:45:25 +07:00
|
|
|
</div>
|
2026-04-27 21:23:50 +07:00
|
|
|
<div class="file-list" id="file-list"></div>
|
|
|
|
|
</aside>
|
2026-04-27 19:45:25 +07:00
|
|
|
|
2026-04-27 21:23:50 +07:00
|
|
|
<main>
|
|
|
|
|
<div class="top-bar">
|
2026-04-27 21:27:32 +07:00
|
|
|
<div class="level-toggles">
|
2026-04-27 21:23:50 +07:00
|
|
|
<input type="checkbox" class="btn-check" id="toggle-DBG" checked value="DBG">
|
2026-04-27 21:27:32 +07:00
|
|
|
<label class="btn btn-dbg" for="toggle-DBG">DBG</label>
|
2026-04-27 21:23:50 +07:00
|
|
|
<input type="checkbox" class="btn-check" id="toggle-INF" checked value="INF">
|
2026-04-27 21:27:32 +07:00
|
|
|
<label class="btn btn-inf" for="toggle-INF">INF</label>
|
2026-04-27 21:23:50 +07:00
|
|
|
<input type="checkbox" class="btn-check" id="toggle-WRN" checked value="WRN">
|
2026-04-27 21:27:32 +07:00
|
|
|
<label class="btn btn-wrn" for="toggle-WRN">WRN</label>
|
2026-04-27 21:23:50 +07:00
|
|
|
<input type="checkbox" class="btn-check" id="toggle-ERR" checked value="ERR">
|
2026-04-27 21:27:32 +07:00
|
|
|
<label class="btn btn-err" for="toggle-ERR">ERR</label>
|
|
|
|
|
<span id="range-display" class="range-info ms-3"></span>
|
2026-04-27 19:45:25 +07:00
|
|
|
</div>
|
2026-04-27 21:23:50 +07:00
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
<div class="d-flex align-items-center gap-2">
|
|
|
|
|
<input type="text" id="global-search" class="search-input" placeholder="Regex Search...">
|
|
|
|
|
<button class="btn btn-sm btn-dark border-secondary" id="reset-all" title="Reset Range & Filters">
|
|
|
|
|
<i data-lucide="refresh-cw" size="14"></i>
|
2026-04-27 19:45:25 +07:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
<div class="chart-section">
|
|
|
|
|
<span class="chart-hint"><i data-lucide="mouse-pointer-2" size="10"></i> Drag to select time
|
|
|
|
|
range</span>
|
2026-04-27 21:23:50 +07:00
|
|
|
<canvas id="intensityChart"></canvas>
|
2026-04-27 19:45:25 +07:00
|
|
|
</div>
|
2026-04-27 21:23:50 +07:00
|
|
|
|
|
|
|
|
<div class="content-area">
|
2026-04-27 21:27:32 +07:00
|
|
|
<div class="table-container shadow-lg">
|
2026-04-27 21:23:50 +07:00
|
|
|
<table id="log-table" class="table table-dark table-hover table-sm w-100">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th width="30"></th>
|
2026-04-27 21:27:32 +07:00
|
|
|
<th width="80">Level</th>
|
2026-04-27 21:23:50 +07:00
|
|
|
<th width="120">Time</th>
|
2026-04-27 21:27:32 +07:00
|
|
|
<th>Description</th>
|
2026-04-27 21:23:50 +07:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody></tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2026-04-27 19:45:25 +07:00
|
|
|
</div>
|
2026-04-27 21:23:50 +07:00
|
|
|
</main>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script src="js/jquery-3.7.0.min.js"></script>
|
|
|
|
|
<script src="js/jquery.dataTables.min.js"></script>
|
|
|
|
|
<script src="js/dataTables.bootstrap5.min.js"></script>
|
|
|
|
|
<script src="js/bootstrap.bundle.min.js"></script>
|
2026-04-27 19:45:25 +07:00
|
|
|
|
2026-04-27 21:23:50 +07:00
|
|
|
<script>
|
|
|
|
|
lucide.createIcons();
|
|
|
|
|
let chart;
|
2026-04-27 21:27:32 +07:00
|
|
|
let selectedTimeRange = null; // {start: 'HH:mm', end: 'HH:mm'}
|
2026-04-27 19:45:25 +07:00
|
|
|
|
2026-04-27 21:23:50 +07:00
|
|
|
$(document).ready(function () {
|
|
|
|
|
const table = $('#log-table').DataTable({
|
|
|
|
|
dom: 'rtip',
|
2026-04-27 21:27:32 +07:00
|
|
|
pageLength: 50,
|
2026-04-27 21:23:50 +07:00
|
|
|
order: [[2, 'desc']],
|
|
|
|
|
columns: [
|
2026-04-27 21:27:32 +07:00
|
|
|
{ data: null, orderable: false, render: () => `<i data-lucide="more-horizontal" size="14" style="opacity:0.3"></i>` },
|
2026-04-27 21:23:50 +07:00
|
|
|
{
|
|
|
|
|
data: 'level',
|
2026-04-27 21:27:32 +07:00
|
|
|
render: l => `<span class="badge w-100 btn-${l.toLowerCase()}">${l}</span>`
|
2026-04-27 21:23:50 +07:00
|
|
|
},
|
|
|
|
|
{ data: 'time' },
|
2026-04-27 21:27:32 +07:00
|
|
|
{ data: 'message', render: m => `<span class="text-truncate d-block" style="max-width: 900px">${m}</span>` }
|
2026-04-27 21:23:50 +07:00
|
|
|
],
|
|
|
|
|
drawCallback: () => lucide.createIcons()
|
|
|
|
|
});
|
2026-04-27 19:45:25 +07:00
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
// Chart.js Configuration
|
2026-04-27 21:23:50 +07:00
|
|
|
const ctx = document.getElementById('intensityChart').getContext('2d');
|
|
|
|
|
chart = new Chart(ctx, {
|
|
|
|
|
type: 'bar',
|
2026-04-27 21:27:32 +07:00
|
|
|
data: { labels: [], datasets: [{ data: [], backgroundColor: '#4ade80', borderRadius: 2, barPercentage: 0.8 }] },
|
2026-04-27 21:23:50 +07:00
|
|
|
options: {
|
|
|
|
|
responsive: true,
|
|
|
|
|
maintainAspectRatio: false,
|
|
|
|
|
scales: {
|
|
|
|
|
x: { ticks: { color: '#64748b', font: { size: 10 } }, grid: { display: false } },
|
2026-04-27 21:27:32 +07:00
|
|
|
y: { beginAtZero: true, ticks: { color: '#475569' }, grid: { color: '#1e293b' } }
|
2026-04-27 21:23:50 +07:00
|
|
|
},
|
2026-04-27 21:27:32 +07:00
|
|
|
plugins: {
|
|
|
|
|
legend: { display: false },
|
|
|
|
|
zoom: {
|
|
|
|
|
zoom: {
|
|
|
|
|
drag: { enabled: true, backgroundColor: 'rgba(74, 222, 128, 0.2)', borderColor: '#4ade80', borderWidth: 1 },
|
|
|
|
|
mode: 'x',
|
|
|
|
|
onZoomComplete: ({ chart }) => {
|
|
|
|
|
const { min, max } = chart.scales.x;
|
|
|
|
|
const labels = chart.data.labels;
|
|
|
|
|
const start = labels[Math.max(0, Math.floor(min))];
|
|
|
|
|
const end = labels[Math.min(labels.length - 1, Math.ceil(max))];
|
|
|
|
|
|
|
|
|
|
selectedTimeRange = { start, end };
|
|
|
|
|
$('#range-display').text(`Range: ${start} - ${end}`);
|
|
|
|
|
table.draw();
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-27 21:23:50 +07:00
|
|
|
}
|
2026-04-27 19:45:25 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
// Custom Table Filter for Levels + Time Range
|
2026-04-27 21:23:50 +07:00
|
|
|
$.fn.dataTable.ext.search.push((settings, data, dataIndex) => {
|
|
|
|
|
const level = data[1];
|
2026-04-27 21:27:32 +07:00
|
|
|
const timeStr = data[2]; // HH:mm:ss.SSS
|
|
|
|
|
const timeShort = timeStr.substring(0, 5); // HH:mm
|
|
|
|
|
|
|
|
|
|
// 1. Filter by Level
|
|
|
|
|
const checkedLevels = $('.btn-check:checked').map((i, el) => $(el).val()).get();
|
|
|
|
|
if (!checkedLevels.includes(level)) return false;
|
|
|
|
|
|
|
|
|
|
// 2. Filter by Time Range (if zoomed)
|
|
|
|
|
if (selectedTimeRange) {
|
|
|
|
|
return timeShort >= selectedTimeRange.start && timeShort <= selectedTimeRange.end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
2026-04-27 19:45:25 +07:00
|
|
|
});
|
|
|
|
|
|
2026-04-27 21:27:32 +07:00
|
|
|
// Search & Reset
|
|
|
|
|
$('#global-search').on('keyup', function () { table.search(this.value, true, false).draw(); });
|
|
|
|
|
$('#reset-all').on('click', () => {
|
|
|
|
|
chart.resetZoom();
|
|
|
|
|
selectedTimeRange = null;
|
|
|
|
|
$('#range-display').text('');
|
|
|
|
|
$('#global-search').val('');
|
|
|
|
|
table.search('').draw();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.btn-check').on('change', () => table.draw());
|
|
|
|
|
|
|
|
|
|
// File/Directory Loading
|
2026-04-27 21:23:50 +07:00
|
|
|
$('#dir-input').on('change', function (e) {
|
|
|
|
|
const files = Array.from(e.target.files).filter(f => f.name.endsWith('.log'));
|
|
|
|
|
const list = $('#file-list').empty();
|
2026-04-27 21:27:32 +07:00
|
|
|
files.forEach((f, i) => list.append(`<div class="file-item" onclick="loadLog(${i})"><span>${f.name}</span></div>`));
|
2026-04-27 21:23:50 +07:00
|
|
|
window.loadedFiles = files;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.loadLog = function (idx) {
|
|
|
|
|
$('.file-item').removeClass('active').eq(idx).addClass('active');
|
|
|
|
|
const reader = new FileReader();
|
2026-04-27 21:27:32 +07:00
|
|
|
reader.onload = e => {
|
2026-04-27 21:23:50 +07:00
|
|
|
const logs = parseLogs(e.target.result);
|
|
|
|
|
table.clear().rows.add(logs).draw();
|
|
|
|
|
updateChart(logs);
|
|
|
|
|
};
|
|
|
|
|
reader.readAsText(window.loadedFiles[idx]);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function parseLogs(text) {
|
|
|
|
|
const lines = text.split(/\r?\n/);
|
|
|
|
|
const logs = [];
|
2026-04-27 21:27:32 +07:00
|
|
|
const regex = /^(\d{2}:\d{2}:\d{2}\.\d{3})\s\[(\w+)\]\s(.*)$/;
|
2026-04-27 21:23:50 +07:00
|
|
|
lines.forEach(line => {
|
2026-04-27 21:27:32 +07:00
|
|
|
const match = line.match(regex);
|
|
|
|
|
if (match) logs.push({ time: match[1], level: match[2], message: match[3] });
|
2026-04-27 21:23:50 +07:00
|
|
|
});
|
|
|
|
|
return logs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateChart(logs) {
|
|
|
|
|
const bins = {};
|
|
|
|
|
logs.forEach(l => {
|
2026-04-27 21:27:32 +07:00
|
|
|
const m = l.time.substring(0, 5);
|
|
|
|
|
bins[m] = (bins[m] || 0) + 1;
|
2026-04-27 21:23:50 +07:00
|
|
|
});
|
|
|
|
|
const labels = Object.keys(bins).sort();
|
|
|
|
|
chart.data.labels = labels;
|
2026-04-27 21:27:32 +07:00
|
|
|
chart.data.datasets[0].data = labels.map(l => bins[l]);
|
|
|
|
|
chart.resetZoom();
|
2026-04-27 21:23:50 +07:00
|
|
|
chart.update();
|
|
|
|
|
}
|
2026-04-27 19:45:25 +07:00
|
|
|
});
|
2026-04-27 21:23:50 +07:00
|
|
|
</script>
|
2026-04-27 19:45:25 +07:00
|
|
|
</body>
|
2026-04-27 21:23:50 +07:00
|
|
|
|
2026-04-27 19:45:25 +07:00
|
|
|
</html>
|