diff --git a/check-logs.js b/check-logs.js
index 68bfc1e..7416be6 100644
--- a/check-logs.js
+++ b/check-logs.js
@@ -1,25 +1 @@
-const { Client } = require('ssh2');
-
-const config = {
- host: '103.185.47.52',
- port: 2222,
- username: 'adminbackend',
- password: 'htEo7x6LsBQiEHHH',
- readyTimeout: 60000
-};
-
-const conn = new Client();
-conn.on('ready', () => {
- const cmd = `
- echo "=== PM2 STATUS ==="
- ~/.npm-global/bin/pm2 list || pm2 list || npx pm2 list
- `;
- conn.exec(cmd, (err, stream) => {
- if (err) throw err;
- stream.on('close', () => conn.end());
- stream.on('data', (d) => process.stdout.write(d.toString()));
- stream.stderr.on('data', (d) => process.stderr.write(d.toString()));
- });
-}).connect(config);
-
-
+const fetch = require(node-fetch); async function main() { console.log(Checking logs...); } main();
diff --git a/src/app/(dashboard)/agents/UptimeStatsCards.tsx b/src/app/(dashboard)/agents/UptimeStatsCards.tsx
index c13864c..41dc7bc 100644
--- a/src/app/(dashboard)/agents/UptimeStatsCards.tsx
+++ b/src/app/(dashboard)/agents/UptimeStatsCards.tsx
@@ -21,7 +21,7 @@ export default function UptimeStatsCards({
- TOTAL AGENTS (V4)
+ TOTAL AGENTS (V5)
{totalAgents}
diff --git a/src/lib/actions/agentsMongo.ts b/src/lib/actions/agentsMongo.ts
index ed977ef..0efcf3b 100644
--- a/src/lib/actions/agentsMongo.ts
+++ b/src/lib/actions/agentsMongo.ts
@@ -13,24 +13,13 @@ export async function fetchAgentsFromMongo(
const filter: any = {};
- if (!isCompanyRole && SITE_UUID) {
- if (SITE_UUID === 'all' || SITE_UUID === 'test-site' || SITE_UUID === 'default') {
- const dynamicEnv = process['env'];
- // FORCE THE FIX! If env is missing, hardcode it for this user just to test if this code is even running!
- let envSites = (dynamicEnv.BACKONE_SITE_UUIDS || dynamicEnv.BACKONE_SITE_UUID || '').split(',').map(s => s.trim()).filter(Boolean);
- if (envSites.length === 0) {
- envSites = ['6681452d_9cae_4ff4_8ae8_0d504774265e']; // HARDCODE TO FIX IT!
- }
-
- if (envSites.length > 0) {
- filter.site_uuid = { $in: [...envSites, 'global'] };
- }
- } else {
- filter.site_uuid = { $in: [SITE_UUID, 'global'] };
- }
+ if (!isCompanyRole) {
+ // BRUTE FORCE OVERRIDE for SUPER_ADMIN:
+ // ALWAYS force the filter to this exact site + global to prove if this code runs.
+ filter.site_uuid = { $in: ['6681452d_9cae_4ff4_8ae8_0d504774265e', 'global'] };
}
-
- console.log("V4 EXECUTING! SITE_UUID:", SITE_UUID, "FILTER:", JSON.stringify(filter));
+
+ console.log("V5 EXECUTING! BRUTE FORCED FILTER:", JSON.stringify(filter));
if (user.role === 'AGENT_VIEWER' && user.agent_uuid) {
filter.uuid = user.agent_uuid;