Skip to content

Commit

Permalink
perf: 修改任务停止日志输出提示
Browse files Browse the repository at this point in the history
  • Loading branch information
w940853815 committed Apr 11, 2024
1 parent d49be90 commit 55c1849
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/i18n/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,8 @@
"runSucceed": "Task executed successfully",
"EnterUploadPath": "Enter the upload path",
"FileNameTooLong": "File name too long",
"StopJob": "Stop job"
"StopJob": "Stop job",
"StopLogOutput": "Task Canceled: The current task (currentTaskId) has been manually stopped. Since the progress of each task varies, the following is the final execution result of the task. A failed execution indicates that the task has been successfully stopped."
},
"perms": {
"": "",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/langs/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,8 @@
"runSucceed": "タスクが成功しました",
"EnterUploadPath": "アップロードパスを入力してください",
"FileNameTooLong": "ファイル名が長すぎます",
"StopJob": "ジョブを停止"
"StopJob": "ジョブを停止",
"StopLogOutput": "Task Canceled:現在のタスク(currentTaskId)は手動で停止されました。各タスクの進行状況が異なるため、以下はタスクの最終実行結果です。実行が失敗した場合は、タスクが正常に停止されました。"
},
"perms": {
"": "",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/langs/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,8 @@
"runSucceed": "任务执行成功",
"EnterUploadPath": "输入上传路径",
"FileNameTooLong": "文件名太长",
"StopJob": "停止作业"
"StopJob": "停止作业",
"StopLogOutput": "Task Canceled:当前任务(currentTaskId)已手动停止,由于每个任务的执行进度不一样,下面是任务最终的执行结果,执行失败表示已成功停止任务执行。"
},
"perms": {
"": "",
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/langs/zh_Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,8 @@
"runSucceed": "任務執行成功",
"EnterUploadPath": "輸入上傳路徑",
"FileNameTooLong": "檔案名太長",
"StopJob": "停止作業"
"StopJob": "停止作業",
"StopLogOutput": "任務已取消:當前任務(currentTaskId)已被手動停止。由於每個任務的執行進度不同,以下是任務的最終執行結果。執行失敗表示任務已成功停止。"
},
"perms": {
"": "",
Expand Down
3 changes: 2 additions & 1 deletion src/views/ops/Job/QuickJob.vue
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ export default {
},
stop() {
StopJob({ task_id: this.currentTaskId }).then(() => {
this.xterm.write(this.wrapperError('Task has been canceled'))
this.xterm.write('\x1b[31m' +
this.$tc('ops.StopLogOutput').replace('currentTaskId', this.currentTaskId) + '\x1b[0m')
this.getTaskStatus()
}).catch((e) => {
console.log(e)
Expand Down

0 comments on commit 55c1849

Please sign in to comment.