diff options
Diffstat (limited to 'packages/meshbay-hub/src')
13 files changed, 19 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js index 50bd8ac..e2d5742 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js @@ -370,6 +370,7 @@ function TransferRow({ it }) { <span class=${it.status === 'failed' ? 'transfer-failed' : ''}> ${it.status === 'done' ? t('transfers.done') : it.status === 'cancelled' ? t('transfers.cancelled') + : it.errorCode === 'disk_full' ? t('transfers.disk_full') : it.error || t('transfers.failed')} </span> ${it.canOpen && html` diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js index 768709e..07d2622 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js @@ -783,6 +783,7 @@ export default { 'transfers.eta_minutes': 'noch {n} Min.', 'transfers.eta_hours': 'noch {n} Std.', 'transfers.failed': 'Fehlgeschlagen', + 'transfers.disk_full': 'Die Festplatte des Nodes ist voll', 'group.select': 'Auswählen', 'group.select_done': 'Fertig', 'group.actions': 'Aktionen ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js index de7fc91..a25fb2e 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js @@ -902,6 +902,7 @@ export default { 'transfers.eta_minutes': '{n} min left', 'transfers.eta_hours': '{n} h left', 'transfers.failed': 'Failed', + 'transfers.disk_full': "The node's disk is full", 'group.select': 'Select', 'group.select_done': 'Done', 'group.actions': 'Actions ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js index b8ca4c4..0731b76 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js @@ -778,6 +778,7 @@ export default { 'transfers.eta_minutes': 'quedan {n} min', 'transfers.eta_hours': 'quedan {n} h', 'transfers.failed': 'Fallida', + 'transfers.disk_full': 'El disco del node está lleno', 'group.select': 'Seleccionar', 'group.select_done': 'Listo', 'group.actions': 'Acciones ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js index 3a94f13..e67f50d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js @@ -781,6 +781,7 @@ export default { 'transfers.eta_minutes': '{n} min restantes', 'transfers.eta_hours': '{n} h restantes', 'transfers.failed': 'Échec', + 'transfers.disk_full': 'Le disque du node est plein', 'group.select': 'Sélectionner', 'group.select_done': 'Terminé', 'group.actions': 'Actions ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js index 67fe6d3..d88b8d5 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js @@ -781,6 +781,7 @@ export default { 'transfers.eta_minutes': '{n} min rimanenti', 'transfers.eta_hours': '{n} h rimanenti', 'transfers.failed': 'Non riuscito', + 'transfers.disk_full': 'Il disco del node è pieno', 'group.select': 'Seleziona', 'group.select_done': 'Fine', 'group.actions': 'Azioni ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js index 019cc86..edf134d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js @@ -773,6 +773,7 @@ export default { 'transfers.eta_minutes': '残り {n} 分', 'transfers.eta_hours': '残り {n} 時間', 'transfers.failed': '失敗', + 'transfers.disk_full': 'node のディスクがいっぱいです', 'group.select': '選択', 'group.select_done': '完了', 'group.actions': '操作({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js index eb96496..0eaedbb 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js @@ -782,6 +782,7 @@ export default { 'transfers.eta_minutes': 'nog {n} min', 'transfers.eta_hours': 'nog {n} u', 'transfers.failed': 'Mislukt', + 'transfers.disk_full': 'De schijf van de node is vol', 'group.select': 'Selecteren', 'group.select_done': 'Klaar', 'group.actions': 'Acties ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js index 61cce3d..6efebb8 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js @@ -794,6 +794,7 @@ export default { 'transfers.eta_minutes': 'pozostało {n} min', 'transfers.eta_hours': 'pozostało {n} godz.', 'transfers.failed': 'Nie powiódł się', + 'transfers.disk_full': 'Dysk, na którym działa node, jest pełny', 'group.select': 'Zaznacz', 'group.select_done': 'Gotowe', 'group.actions': 'Działania ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js index 6279f46..df2d1f8 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js @@ -780,6 +780,7 @@ export default { 'transfers.eta_minutes': 'faltam {n} min', 'transfers.eta_hours': 'faltam {n} h', 'transfers.failed': 'Falhou', + 'transfers.disk_full': 'O disco do node está cheio', 'group.select': 'Selecionar', 'group.select_done': 'Concluir', 'group.actions': 'Ações ({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js index 02869c5..709eb65 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js @@ -762,6 +762,7 @@ export default { 'transfers.eta_minutes': '剩余 {n} 分钟', 'transfers.eta_hours': '剩余 {n} 小时', 'transfers.failed': '失败', + 'transfers.disk_full': 'node 的磁盘已满', 'group.select': '选择', 'group.select_done': '完成', 'group.actions': '操作({n})', diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transfers.js b/packages/meshbay-hub/src/meshbay_hub/static/transfers.js index 7036c4f..b54f1ac 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/transfers.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/transfers.js @@ -73,6 +73,7 @@ export class TransferStore { queuedByOwnLimit: Boolean( it.lease && it.lease.cap && it.lease.used >= it.lease.cap), error: it.error || '', + errorCode: it.errorCode || '', note: it.note || '', speed: this._speed(it), // The ETA is drawn only once the window holds a few seconds of real @@ -184,9 +185,10 @@ export class TransferStore { this._emit(); }; - const finish = (status, error = '') => { + const finish = (status, error = '', errorCode = '') => { item.status = status; item.error = error; + item.errorCode = errorCode; this._emit(); this._maybeRelease(item.transport); }; @@ -284,7 +286,7 @@ export class TransferStore { }) .catch(err => { if (item.signal.aborted || err.name === 'AbortError') finish('cancelled'); - else finish('failed', err.message || String(err)); + else finish('failed', err.message || String(err), err.code || ''); }) .finally(finished); diff --git a/packages/meshbay-hub/src/meshbay_hub/static/transport-upload.js b/packages/meshbay-hub/src/meshbay_hub/static/transport-upload.js index a8f039d..e11613d 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/transport-upload.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/transport-upload.js @@ -80,6 +80,10 @@ extendTransport(class { // this client did before there was anything to ask. if (answerProbe(0)) return; failure = new Error(msg.detail || 'Upload refused'); + // Carried so a caller can tell a refusal it can act on (`disk_full`: + // stop, nothing will fit until the operator makes room) from one it + // cannot. The detail is English; whoever shows it translates by code. + if (msg.code) failure.code = msg.code; wake(); return; } |