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

+4 -4
View File
@@ -1,22 +1,22 @@
// proxy/dataRetention.js
// ─────────────────────────────────────────────────────────────────────────────
// Pruning process for BackOne MongoDB data retention.
// Removes telemetry records older than 7 days to conserve database space.
// Removes telemetry records older than 30 days to conserve database space.
// ─────────────────────────────────────────────────────────────────────────────
const mongoose = require('mongoose');
const Schemas = require('./models/Schemas');
/**
* Prune all time-series documents older than 7 days.
* Prune all time-series documents older than 30 days.
*/
async function pruneOldData() {
const thirtyDaysAgo = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000);
const timeString = thirtyDaysAgo.toLocaleString('id-ID', { timeZone: 'Asia/Jakarta' }) + ' WIB';
console.log(`[Collector] [Retention] Checking for telemetry data older than 30 days (before ${timeString})...`);
// Prune from all collections in Schemas except CustomDeviceLabel
const collections = Object.keys(Schemas).filter(name => name !== 'CustomDeviceLabel');
// Prune from all collections in Schemas except CustomDeviceLabel, AgentRegistry, TenantConfig
const collections = Object.keys(Schemas).filter(name => name !== 'CustomDeviceLabel' && name !== 'AgentRegistry' && name !== 'TenantConfig');
for (const name of collections) {
try {