Skip to content

Commit

Permalink
feat(ui): now display an error when SSE failed (#7177)
Browse files Browse the repository at this point in the history
* feat(ui): now display an error when SSE failed

close #1303

* chore(translations): auto generate values for languages other than english

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
Skraye and actions-user authored Feb 4, 2025
1 parent 42ad09d commit 5ff5667
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ui/src/components/executions/ExecutionRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@
title: this.$t("error"),
message: this.$t("errors.404.flow or execution"),
});
} else {
this.$store.dispatch("core/showMessage", {
variant: "error",
title: this.$t("error"),
message: this.$t("something_went_wrong.loading_execution"),
});
}
}
});
Expand Down
10 changes: 10 additions & 0 deletions ui/src/components/logs/TaskRunDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@
this.logsSSE = sse;
this.logsSSE.onmessage = event => {
// we are receiving a first "fake" event to force initializing the connection: ignoring it
if (event.lastEventId !== "start") {
this.logsBuffer = this.logsBuffer.concat(JSON.parse(event.data));
Expand All @@ -525,7 +526,16 @@
this.scrollToBottomFailedTask();
}
}
this.logsSSE.onerror = _ => {
this.$store.dispatch("core/showMessage", {
variant: "error",
title: this.$t("error"),
message: this.$t("something_went_wrong.loading_execution"),
});
}
})
},
isSubflow(taskRun) {
return taskRun.outputs?.executionId;
Expand Down
3 changes: 3 additions & 0 deletions ui/src/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Kommentar",
"move_line": "Zeile verschieben",
"command_palette": "Befehlsübersicht anzeigen"
},
"something_went_wrong": {
"loading_execution": "Beim Laden der Ausführung ist etwas schiefgelaufen."
}
}
}
5 changes: 4 additions & 1 deletion ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,9 @@
"comment": "Comment",
"uncomment": "Uncomment"
},
"instance": "Instance"
"instance": "Instance",
"something_went_wrong": {
"loading_execution": "Something went wrong while loading the execution"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Comentario",
"move_line": "Mover línea",
"command_palette": "Mostrar paleta de comandos"
},
"something_went_wrong": {
"loading_execution": "Algo salió mal al cargar la ejecución."
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Commentaire",
"move_line": "Déplacer la ligne",
"command_palette": "Afficher la palette de commandes"
},
"something_went_wrong": {
"loading_execution": "Une erreur s'est produite lors du chargement de l'exécution"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "टिप्पणी",
"move_line": "लाइन को स्थानांतरित करें",
"command_palette": "कमांड पैलेट दिखाएं"
},
"something_went_wrong": {
"loading_execution": "कुछ गलत हो गया जब execution लोड हो रहा था।"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Commento",
"move_line": "Sposta linea",
"command_palette": "Mostra la palette dei comandi"
},
"something_went_wrong": {
"loading_execution": "Si è verificato un errore durante il caricamento dell'esecuzione."
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "コメント",
"move_line": "行を移動",
"command_palette": "コマンドパレットを表示"
},
"something_went_wrong": {
"loading_execution": "実行の読み込み中に問題が発生しました"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "댓글",
"move_line": "줄 이동",
"command_palette": "명령 팔레트 표시"
},
"something_went_wrong": {
"loading_execution": "실행을 로드하는 중 문제가 발생했습니다."
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Komentarz",
"move_line": "Przenieś linię",
"command_palette": "Pokaż paletę poleceń"
},
"something_went_wrong": {
"loading_execution": "Wystąpił problem podczas ładowania wykonania"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Comentário",
"move_line": "Mover linha",
"command_palette": "Mostrar paleta de comandos"
},
"something_went_wrong": {
"loading_execution": "Algo deu errado ao carregar a execução"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "Комментарий",
"move_line": "Переместить строку",
"command_palette": "Показать палитру команд"
},
"something_went_wrong": {
"loading_execution": "Произошла ошибка при загрузке выполнения"
}
}
}
3 changes: 3 additions & 0 deletions ui/src/translations/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@
"comment": "评论",
"move_line": "移动行",
"command_palette": "显示命令面板"
},
"something_went_wrong": {
"loading_execution": "加载执行时出现问题"
}
}
}

0 comments on commit 5ff5667

Please sign in to comment.