Overview
The Servicios (Provider Services) module represents the bandwidth contracts you purchase from upstream providers. A single provider (e.g. TELEFÓNICA) can supply multiple services — for example, a 1 Gbps dedicated link in Lima and a 500 Mbps shared link in Arequipa. EachServicioProveedor record tracks the full capacity lifecycle: how much you bought, how much you have sold onward to clients, how much is actively utilized, and how much headroom remains.
capacidad_disponible = capacidad_comprada − capacidad_vendida. This field is managed by the system and updated via the capacity adjustment endpoint. You should not set it directly when creating or editing a service.Data Model
Services List Page
The Enlaces por proveedor page lists all provider services in a paginated table (10 per page by default).Filters
- Búsqueda — debounced free-text search across
proveedor_nombre,cid_proveedor,modalidad, andubicacion_servicio. Activates when the input reaches 2 or more characters. - Proveedor — dropdown of providers found in the current result set.
- CID — dropdown filtered to
cid_proveedorvalues of visible services.
KPI strip
Inside the filter card, four mini-KPI tiles show the totals for the currently visible (filtered) services:| Tile | Field |
|---|---|
| Comprada | capacidad_comprada |
| Vendida | capacidad_vendida |
| Utilizada | capacidad_utilizada |
| Disponible | capacidad_disponible |
Table columns
| Column | Field(s) | Notes |
|---|---|---|
| CID | cid_interno | Monospace internal circuit ID. |
| Proveedor + Destino | proveedor_nombre, ubicacion_servicio | Provider name and service location. |
| Modalidad | modalidad | Badge: DEDICADO, COMPARTIDO, etc. |
| Capacidades | capacidad_comprada, capacidad_disponible | Shows “Contratada” and “Actual” Mbps. |
| Estado | condicion | Colored pill: ACTIVO (green), STANDBY/RESERVA (blue), INACTIVO/BAJA (red). |
| Acciones | — | View detail, edit, increase capacity, decrease capacity. |
Create Service
Click Nuevo servicio to navigate to/servicios/crear.
Select a provider
Choose a
proveedor_id from the provider dropdown. The dropdown is populated by GET /v1/proveedores/listar/select and shows each provider with its existing services.Fill in service details
| Field | Required | Notes |
|---|---|---|
proveedor_id | Yes | Must reference an existing active provider. |
nodo_id | No | Optional FK to a network node. |
modalidad | Yes | Service modality string, e.g. DEDICADO or COMPARTIDO. |
capacidad_comprada | No | Purchased bandwidth in Mbps. |
ubicacion_servicio | No | Free-text location, e.g. “Lima - San Isidro”. |
condicion | No | Initial status: ACTIVO, STANDBY, RESERVA, INACTIVO, or BAJA. |
observacion | No | Internal notes. |
cid_interno | No | Assigned automatically via GET /v1/servicios-proveedor/next-cid if left blank. |
Auto-increment CID
Before the creation form renders, the dashboard fetches the next available internal circuit ID:cid_interno.
Create API call
Capacity Adjustment
You can increase or decrease thecapacidad_disponible of a service at any time without editing the full service record. This is used when you sell more capacity to a client (decreasing available headroom) or when a client terminates their contract (returning capacity to the pool).
Increase available capacity (AUMENTAR)
Increase available capacity (AUMENTAR)
Click the ↑ button on a service row and enter a positive The response returns the updated capacity fields:
delta_disponible.Decrease available capacity (DISMINUIR)
Decrease available capacity (DISMINUIR)
Click the ↓ button and enter a negative
delta_disponible (or the modal may accept a positive value and negate it internally).Service Detail Page
Navigate to/servicios/detalle/{servicio_id} (or click the eye icon on a row) to open the full detail view.
Sections
Identificación del servicio
Identificación del servicio
Displays
proveedor_nombre, modalidad, ubicacion_servicio, condicion, capacidad_disponible, and observacion in a two-column grid.Capacidad del servicio
Capacidad del servicio
Four KPI cards for
capacidad_comprada, capacidad_vendida, capacidad_utilizada, and capacidad_disponible, plus a usage progress bar (capacidad_utilizada / capacidad_comprada). An alert pill appears when usage exceeds 75 % (ALTO) or 90 % (CRÍTICO).Tráfico (chart)
Tráfico (chart)
An SVG area chart showing simulated usage over time. In production this will be replaced by live Zabbix data.
Clientes del enlace (EnlaceRed)
Clientes del enlace (EnlaceRed)
A searchable table of all network connections (
EnlaceRed) that consume bandwidth from this service. Columns: Cliente (razon_social), Plan contratado (bw_contratado), Uso actual (bw_disponible), % enlace.The top-consuming client is highlighted with a pill above the table.EnlaceRed type
API Reference
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/servicios-proveedor/listar | Paginated list with optional search, limit, offset. |
GET | /v1/servicios-proveedor/{servicio_id}/conexiones | Service detail + all linked EnlaceRed connections. |
GET | /v1/servicios-proveedor/proveedor/{proveedor_id} | All services belonging to a specific provider. |
GET | /v1/servicios-proveedor/next-cid | Returns the next auto-increment CID value. |
POST | /v1/servicios-proveedor/crear | Create a new service. |
POST | /v1/servicios-proveedor/{servicio_id}/ajustar-capacidad | Adjust capacidad_disponible by delta_disponible. |
PUT | /v1/servicios-proveedor/servicios-proveedor/{servicio_id} | Full service edit. |