Merge branch 'perf/long-range-studies' into release/2.3.0

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Lucas Rayan committed 2026-11-23 09:13:32 -03:00
commit f9a6783a1f
16 files changed
+846 -83

No files matched your search

+11 -3
View File
@@ -301,9 +301,17 @@
if (r.status >= 500) { showError(t('error.load')); throw mkErr('HTTP ' + r.status, r.status); }
if (!r.ok) throw mkErr('HTTP ' + r.status, r.status);
hideError();
return r.json();
return r.json().then(function (j) { if (j && j.truncated === true) noteTruncated(); return j; });
}, function (e) { showError(t('error.load')); throw e; });
}
// A study that hit a real limit (event count, byte budget or time) says so; shown at most once per 20 s.
var truncAt = 0;
function noteTruncated() {
var now = Date.now();
if (now - truncAt < 20000) return;
truncAt = now;
toast(t('study.truncated'), 9000);
}
function qs(extra) {
var o = Object.assign({ host: state.host }, rangeParams());
for (var k in extra) o[k] = extra[k];
@@ -982,12 +990,12 @@
});
}
var toastBox = null;
function toast(msg) {
function toast(msg, ms) {
if (!toastBox) toastBox = $('#toasts');
if (!toastBox) return;
var n = h('div', 'toast', String(msg));
toastBox.appendChild(n);
setTimeout(function () { if (n.parentNode) n.parentNode.removeChild(n); }, 2600);
setTimeout(function () { if (n.parentNode) n.parentNode.removeChild(n); }, ms || 2600);
}
// POST/DELETE with a JSON body (same-origin cookie session); resolves with the parsed answer or rejects with its status.
+2
View File
@@ -43,6 +43,7 @@ window.URUTAU_I18N = {
'range.widen': 'Choose another period',
'timeline.bucket': '{n}-minute buckets',
'toast.copied': 'Copied',
'study.truncated': 'This period is too large to read in full: the figures cover only part of the events. Pick a shorter range for exact numbers.',
'unban.btn': 'Unban',
'unban.title': 'Unban {ip}',
'unban.explain': 'This lifts the block on this address in the server firewall (fail2ban) right away. Use it when the block was a mistake or when you are testing your own system.',
@@ -595,6 +596,7 @@ window.URUTAU_I18N = {
'range.widen': 'Escolher outro período',
'timeline.bucket': 'caixas de {n} min',
'toast.copied': 'Copiado',
'study.truncated': 'Este período é grande demais para ser lido por inteiro: os números cobrem só parte dos eventos. Escolha um intervalo menor para valores exatos.',
'unban.btn': 'Desbanir',
'unban.title': 'Desbanir {ip}',
'unban.explain': 'Isto libera agora o bloqueio deste endereço no firewall do servidor (fail2ban). Use quando o bloqueio foi um engano ou quando você está testando o seu próprio sistema.',