fix(nexxa): los eventos usan el texto de cada fila (sin carrera con /resumen) y los agotada previos a 2.0.0 se cuentan aparte, sin inflar la cuota; 2.0.1 (P337/F3)
Tests ADN / test (push) Canceled after 0s
Tests ADN / test (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: GEMMA <noreply@gemma.dtic>
This commit is contained in:
co-authored by
Claude Opus 5.5
GEMMA
parent
e193a496c1
commit
fab1859343
@@ -199,12 +199,13 @@
|
||||
// /resumen); acá solo el ícono, que es presentación.
|
||||
var EVENTO_ICONO = {
|
||||
dispensada: '🟢', liberada: '⚪', renovada: '🔄', pausada: '🟡', agotada: '🔴', revertida: '↩️',
|
||||
'liberada-admin': '🛠', alta: '➕', editada: '✏️', renombrada: '🏷', baja: '🗑'
|
||||
'liberada-admin': '🛠', alta: '➕', editada: '✏️', renombrada: '🏷', baja: '🗑', 'agotada-previa': '🟠'
|
||||
};
|
||||
var TEXTOS_EVENTO = {};
|
||||
|
||||
function eventoTexto(e) {
|
||||
return (EVENTO_ICONO[e] || '•') + ' ' + (TEXTOS_EVENTO[e] || e);
|
||||
// texto: el que manda el servidor en cada fila de /usos (no depende de que /resumen haya llegado antes)
|
||||
function eventoTexto(e, texto) {
|
||||
return (EVENTO_ICONO[e] || '•') + ' ' + (texto || TEXTOS_EVENTO[e] || e);
|
||||
}
|
||||
|
||||
function actionsHtml(k, keyId, activo, bloqueada) {
|
||||
@@ -988,7 +989,7 @@
|
||||
'<tr>' +
|
||||
'<td class="mono nowrap" title="' + esc(u.en) + '">' + fmtClock(u.en) + '<div class="timing-sub">' + fmtRelative(u.en) + '</div></td>' +
|
||||
'<td class="mono">' + esc(u.provider) + '/' + esc(u.identificador) + '</td>' +
|
||||
'<td>' + eventoTexto(u.evento) + '</td>' +
|
||||
'<td>' + eventoTexto(u.clase || u.evento, u.texto) + '</td>' +
|
||||
'<td class="mono">' + esc(u.individuo || '—') + '</td>' +
|
||||
'<td>' + esc(u.motivo || '') + '</td>' +
|
||||
'<td class="mono nowrap">' + (u.hasta ? cuando(u.hasta) : '') + '</td>' +
|
||||
@@ -1021,7 +1022,9 @@
|
||||
statHtml('Entregas', ev.dispensada, '', 'keys entregadas a un consumidor') +
|
||||
statHtml('Pausas por límite', ev.pausada, 'warn', 'el proveedor contestó límite por minuto: la key vuelve sola en minutos') +
|
||||
statHtml('Agotamientos de cuota', ev.agotada, 'warn', 'cuota del ciclo agotada: vuelve al reiniciarse la cuota') +
|
||||
statHtml('Cambios de admin', cambios, '', 'altas, ediciones, renombres, bajas y liberaciones por admin');
|
||||
statHtml('Cambios de admin', cambios, '', 'altas, ediciones, renombres, bajas y liberaciones por admin') +
|
||||
(ev['agotada-previa'] ? statHtml('Bloqueos sin clasificar', ev['agotada-previa'], '',
|
||||
'registros anteriores a NEXXA 2.0.0: no distinguen una pausa por límite de una cuota agotada') : '');
|
||||
renderPorKey(r.por_key);
|
||||
}).catch(function () { /* cargarKeys ya avisa los problemas de conexión */ });
|
||||
}
|
||||
@@ -1036,7 +1039,7 @@
|
||||
return '<tr><td class="mono">' + esc(k.provider) + '/' + esc(k.identificador) + '</td><td>' + estadoHtml(k) + '</td>' +
|
||||
'<td class="mono">' + k.eventos.dispensada + '</td><td class="mono">' + k.eventos.pausada + '</td>' +
|
||||
'<td class="mono">' + k.eventos.agotada + '</td>' +
|
||||
'<td>' + (ult ? eventoTexto(ult.evento) + '<div class="timing-sub">' + fmtRelative(ult.en) + '</div>' : '—') + '</td></tr>';
|
||||
'<td>' + (ult ? eventoTexto(ult.clase || ult.evento, ult.texto) + '<div class="timing-sub">' + fmtRelative(ult.en) + '</div>' : '—') + '</td></tr>';
|
||||
}).join('') + '</tbody></table>';
|
||||
}
|
||||
|
||||
@@ -1073,7 +1076,9 @@
|
||||
function opcionesRegistro() {
|
||||
var ev = document.getElementById('reg-evento');
|
||||
if (ev.options.length === 1 && Object.keys(TEXTOS_EVENTO).length) {
|
||||
Object.keys(TEXTOS_EVENTO).forEach(function (e) { ev.add(new Option(eventoTexto(e), e)); });
|
||||
// 'agotada-previa' es una clase calculada (agotada sin hasta), no un código guardado: no se filtra por él
|
||||
Object.keys(TEXTOS_EVENTO).filter(function (e) { return e !== 'agotada-previa'; })
|
||||
.forEach(function (e) { ev.add(new Option(eventoTexto(e), e)); });
|
||||
}
|
||||
var sel = document.getElementById('reg-key');
|
||||
var actual = sel.value;
|
||||
|
||||
Reference in New Issue
Block a user