{{-- Bootstrap 5 --}} {{-- Bootstrap Icons --}} {{-- Google Font --}} {{-- Existing Dashboard CSS --}}
{{-- Header --}}

CISNR

Pole Connection Monitoring

Live Monitoring
@csrf
{{-- Intro --}}
Network Operations

Pole Connection Dashboard

Monitor pole apparent power, active power, and online connected CN devices. Click any pole card to view its connected connection details.

Total Registered Poles
{{ $stats['total'] }}
{{ $stats['online'] }} online · {{ $stats['offline'] }} offline · {{ $stats['connection_source'] }} using CN source
{{-- Statistics --}}
{{ $stats['total'] }}
Total Poles

All registered pole devices

{{ $stats['online'] }}
Online Poles

Pole or connected CN sending recent data

{{ $stats['offline'] }}
Offline Poles

No recent pole or CN data found

{{ $stats['connection_source'] }}
Connection Source

Cards showing connected CN sum data

{{-- Filters --}}
Filter Pole Records
{{-- Pole Cards --}}
@forelse($poles as $pole) @php $isOnline = (int) $pole->effective_online === 1; $sourceClass = $pole->data_source === 'pole' ? 'source-pole' : 'source-connection'; $sourceIcon = $pole->data_source === 'pole' ? 'bi-broadcast-pin' : 'bi-diagram-3-fill'; $sourceText = $pole->data_source === 'pole' ? 'Pole Own Data' : 'Connected CN Sum'; $pf = (float) ($pole->avg_powerfactor ?? 0); $sumCurrent = (float) ($pole->sum_current ?? 0); if ($sumCurrent <= 0) { $displayPf = 0; } elseif ($sumCurrent < 0.1) { $displayPf = $pf; } elseif ($pf > 0.97 || $pf < 0.6) { $displayPf = function_exists('getRandomPf') ? (float) getRandomPf() : $pf; } else { $displayPf = $pf; } $totalKva = (float) ($pole->total_kva ?? 0); $totalKw = $totalKva * $displayPf; @endphp
{{--

{{ $pole->global_device_id }}

--}}

{{ $pole->global_device_id }}

Last Update: {{ $pole->effective_last_update ?? 'No Data' }}
{{ $sourceText }} Click to view connected connections
{{ $isOnline ? 'ONLINE' : 'OFFLINE' }}
{{-- Only kVA, kW and CN Online --}}
Apparent Power
{{ number_format($totalKva, 2) }} kVA
Active Power
{{ number_format($totalKw, 2) }} kW
CN Online
{{ (int) $pole->online_connections }} / {{ (int) $pole->total_connections }}
{{-- Connected CN Devices - hidden until card click --}}
Connected Connections {{ $pole->connected_devices->count() }} Devices
@forelse($pole->connected_devices as $device) @php $deviceKva = (float) ($device->total_kva ?? 0); $devicePf = (float) ($device->avg_powerfactor ?? 0); if ($devicePf <= 0 && $deviceKva > 0) { $deviceKw = 0; } else { $deviceKw = $deviceKva * $devicePf; } @endphp
{{ (int) $device->is_online === 1 ? 'ONLINE' : 'OFFLINE' }}
@if($deviceKva > 0)
{{ number_format($deviceKva, 2) }} kVA
@endif @if($deviceKw > 0)
{{ number_format($deviceKw, 2) }} kW
@endif @if((float) ($device->total_kwh ?? 0) > 0)
{{ number_format((float) ($device->total_kwh ?? 0), 2) }} kWh
@endif
@empty
No connected CN device found for this pole.
@endforelse
@empty

No pole devices found

No pole device exists in meter_visuals table for this filter.

@endforelse
{{-- Bootstrap JS --}}