v1.1: Add CIDR subnet filtering and Agent filter in Devices page

This commit is contained in:
ypratama committed 2026-08-27 12:02:01 +07:00
commit 966058e2fe
422 files changed
+54656

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
const mongoose = require('mongoose');
const path = require('path');
require('dotenv').config({ path: path.join(__dirname, '..', '.env.local') });
async function checkDb() {
await mongoose.connect(process.env.MONGODB_URI);
const db = mongoose.connection.db;
const apps = await db.collection('app_stats').countDocuments();
console.log('Apps records:', apps);
const protos = await db.collection('protocol_stats').countDocuments();
console.log('Protocols records:', protos);
const countries = await db.collection('country_stats').countDocuments();
console.log('Country records:', countries);
const agents = await db.collection('agent_registry').find().toArray();
console.log('Agents:', agents.map(a => ({uuid: a.uuid, label: a.label, activated: a.activated, last_seen_at: a.last_seen_at})));
process.exit(0);
}
checkDb().catch(console.error);