feat: version 2.15.0 -- menu Equipos (inventario de TI con agente GLPI)
Ingesta POST /api/inventory (JSON/XML, token de instalacion), upsert por deviceid, historial de cambios, pestañas Resumen/Equipos/Software/Agentes, detalle con buscador por pestaña y casilla para ocultar actualizaciones/drivers/componentes del software. Migraciones 023 y 024. Diseño en docs/ARQUITECTURA-INVENTARIO.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { api } from './api.js';
|
||||
|
||||
export const listDevices = (params = {}) => {
|
||||
const qs = new URLSearchParams(Object.entries(params).filter(([, v]) => v)).toString();
|
||||
return api.get(`/devices${qs ? `?${qs}` : ''}`);
|
||||
};
|
||||
export const getDevice = (id) => api.get(`/devices/${id}`);
|
||||
export const updateDevice = (id, data) => api.put(`/devices/${id}`, data);
|
||||
export const getDevicesDashboard = () => api.get('/devices/dashboard');
|
||||
export const listSoftware = (all) => api.get(`/devices/software${all ? '?all=1' : ''}`);
|
||||
export const listSoftwareDevices = (name) => api.get(`/devices/software/devices?name=${encodeURIComponent(name)}`);
|
||||
|
||||
export const listInventoryTokens = () => api.get('/devices/tokens');
|
||||
export const createInventoryToken = (label) => api.post('/devices/tokens', { label });
|
||||
export const setInventoryTokenActive = (id, isActive) => api.patch(`/devices/tokens/${id}`, { isActive });
|
||||
export const deleteInventoryToken = (id) => api.delete(`/devices/tokens/${id}`);
|
||||
Reference in New Issue
Block a user