Overview
The Capacidad & Riesgos page is the home screen of the ICP System. It gives you a real-time executive view of every connection: how much bandwidth you purchased from each upstream provider (contratado), how much you have allocated to end clients (asignado), and how much headroom remains (disponible). Connections are automatically scored into four risk levels so you can act before clients experience degradation.
KPI Cards
The four summary cards at the top of the page aggregate values across all connections.Risk Classification
Every connection is assigned a risk level based on its usage percentage (usoPct). The classification is computed in the riesgo() function:
usoPct is capped at 100 before the risk function is applied (usoSeguro = Math.min(100, uso)), so a connection that is technically over-provisioned still appears as LLENO rather than a value above 100.Charts
Risk Donut Chart — Connections by Risk Level
The donut chart on the left shows how many of your connections fall into each risk bucket. Each slice represents a count of connections, color-coded by level:
Slices with zero connections are hidden automatically.
Bar Chart — Top 8 Clients at Highest Risk
The bar chart on the right shows the eight clients with the lowest available bandwidth (disponible), aggregated per client across all their connections. Each client renders three bars:
contratado— total bandwidth purchased on behalf of this clientasignado— total bandwidth currently allocateddisponible— remaining headroom (contratado − asignado)
contratado = 0 are excluded from this chart.
Data Grid
Below the charts, a full data grid lists every connection. The grid is sorted byusoPct descending by default so the most critical connections appear at the top.
Default sort
Data Source
In the current build, the dashboard reads from the mock dataset exported bysrc/shared/mock.ts (capacidad array). Each record has the shape:
disponible, usoPct, riesgoLabel, riesgoColor, riesgoKey) are computed in useMemo inside CapacidadPage.