Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1249,8 +1249,10 @@ function taskExecute() {
|
||||
try {
|
||||
const resp = await fetch('{{ url_for("measure.api_current_production") }}');
|
||||
if (!resp.ok) {
|
||||
// #61: l'errore si mostra, non si ignora
|
||||
this.productionError = '{{ _("Errore di comunicazione con il server") }}';
|
||||
// #61: si mostra il detail del server (es. 503 "Stazione non configurata"),
|
||||
// che e' la causa vera; fallback generico se il corpo non e' JSON.
|
||||
const errBody = await resp.json().catch(() => null);
|
||||
this.productionError = (errBody && errBody.detail) || '{{ _("Errore di comunicazione con il server") }}';
|
||||
return;
|
||||
}
|
||||
const run = await resp.json();
|
||||
|
||||
@@ -181,6 +181,8 @@ def test_no_open_run_means_no_fermo_linea_and_no_fake_timer(
|
||||
html = _execute_page(logged_in_client, mock_api_client, monkeypatch)
|
||||
assert 'x-if="isMeasureTask && productionRun"' in html
|
||||
assert "!this.productionRun" in html
|
||||
# #61: loadProductionRun mostra il detail del server, non solo il messaggio generico
|
||||
assert "errBody.detail" in html
|
||||
assert "Nessuna produzione aperta su questa stazione" in html
|
||||
# il vecchio ripiego locale non c'e' piu'
|
||||
assert "this.startCountdownFrom(this.measurementIntervalMinutes * 60)" not in html.split(
|
||||
|
||||
@@ -1863,7 +1863,7 @@ msgstr "No description available"
|
||||
#: templates/measure/select_recipe.html:294
|
||||
#: templates/measure/task_list.html:107
|
||||
msgid "AVVIA ATTIVITÀ"
|
||||
msgstr "START THE SEQUENCE"
|
||||
msgstr "START ACTIVITY"
|
||||
|
||||
# Maker - Task Editor
|
||||
#: templates/measure/select_recipe.html:302
|
||||
|
||||
Reference in New Issue
Block a user