Добавил фронтенд
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
function InitSummaryChart() {
|
||||
// Summary чарт
|
||||
window.summary_chart = new Chart(
|
||||
document.getElementById('summary-chart'), {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: [],
|
||||
datasets: []
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: "Категория"
|
||||
}
|
||||
},
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
title: {
|
||||
display: true,
|
||||
text: "Количество"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
window.summary_chart.render();
|
||||
}
|
||||
|
||||
// Инициализация документа
|
||||
document.addEventListener("DOMContentLoaded", async function() {
|
||||
InitLogsClusters();
|
||||
await UpdateClusters();
|
||||
|
||||
InitAnomalyLogs();
|
||||
UpdateAnomalyLogs();
|
||||
|
||||
InitStatistics();
|
||||
UpdateStatistics();
|
||||
|
||||
let intervalId = setInterval(function() {
|
||||
UpdateAnomalyLogs();
|
||||
UpdateStatistics();
|
||||
}, 2000);
|
||||
});
|
||||
Reference in New Issue
Block a user