fix(monitoring): eliminate Math.random mock values from admin monitoring stats [FE-007]
This commit is contained in:
1 parent
d3aa10c769
commit
86eb0cfcae
1 file changed
+3
-3
@@ -80,7 +80,7 @@ export default function MonitoringPage() {
|
||||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||||
zibal: {
|
||||
status: !health || health.status === 'OFFLINE' ? 'OFFLINE' : health.status === 'DEGRADED' || health.latencyMs > 1500 ? 'DEGRADED' : 'ONLINE',
|
||||
latencyMs: health?.latencyMs || Math.floor(Math.random() * 80) + 120,
|
||||
latencyMs: health?.latencyMs ?? 0,
|
||||
merchantId: health?.activeMerchant || health?.merchantId || 'zibal-live-merchant',
|
||||
todayVolumeTomans: txStats?.todayVolume ? Math.floor(Number(txStats.todayVolume)) : 0,
|
||||
todayTxCount: txStats?.todayVerified || txStats?.verifiedCount || 0,
|
||||
@@ -89,14 +89,14 @@ export default function MonitoringPage() {
|
||||
melipayamak: {
|
||||
status: smsCreditVal !== undefined && smsCreditVal !== null ? 'ONLINE' : 'OFFLINE',
|
||||
credit: smsCreditVal !== undefined && smsCreditVal !== null ? `${Number(smsCreditVal).toLocaleString('fa-IR')} پیامک` : 'نامشخص',
|
||||
latencyMs: Math.floor(Math.random() * 60) + 95,
|
||||
latencyMs: 0,
|
||||
todaySmsSent: 48,
|
||||
patternActive: true,
|
||||
},
|
||||
|
||||
post: {
|
||||
status: 'ONLINE',
|
||||
latencyMs: Math.floor(Math.random() * 110) + 140,
|
||||
latencyMs: 0,
|
||||
trackingActive: true,
|
||||
},
|
||||
system: {
|
||||
|
||||
Reference in new issue
Block a user