feat(source2): lock dark mode, sans-serif typography, and all recent updates

This commit is contained in:
rafif committed 2026-08-20 23:02:00 +07:00
1 parent dd4c8f6876
commit 9f24b56e97
259 files changed
+15596 -8966

No files matched your search

@@ -0,0 +1,22 @@
// backend/routes/dashboard/telemetryHelper.js
// ─────────────────────────────────────────────────────────────────────────────
// Aggregation helpers for Telemetry routes (SNI, SSL, QUIC fallbacks)
// ─────────────────────────────────────────────────────────────────────────────
const SYSTEM_DOMAINS = ['agents.backone.ai', 'agents.backonedpi.ai'];
async function getSniFallbackData(Flow, matchBase, fieldName) {
const flowBase = { ...matchBase, domain: { $exists: true, $ne: null, $ne: '', $nin: SYSTEM_DOMAINS } };
const flowRaw = await Flow.aggregate([
{ $match: flowBase },
{ $group: { _id: '$domain', download: { $sum: '$download' }, upload: { $sum: '$upload' }, flows: { $sum: 1 } } },
{ $project: { [fieldName]: '$_id', total: { $add: ['$download', '$upload'] }, download: 1, upload: 1, flows: 1, _id: 0 } },
{ $sort: { total: -1 } }
]);
return flowRaw.filter(r => r[fieldName] && !String(r[fieldName]).startsWith('Port '));
}
module.exports = {
SYSTEM_DOMAINS,
getSniFallbackData
};