Додан моніторінг застосунку

Додани веб компоненти карточок територій та повідомлень
This commit is contained in:
2025-12-08 00:14:56 +02:00
parent e41590546c
commit 85483b85bb
206 changed files with 2370 additions and 595 deletions

View File

@@ -0,0 +1,13 @@
async function pushToMetrics(metric) {
if (!metric || !metric.type) return;
const payload = { ...metric, timestamp: Date.now() };
fetch("http://metrics:4005/push", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}).catch(err => console.error("Metrics push error:", err));
}
module.exports = { pushToMetrics };