diff --git a/agent/app/service/container.go b/agent/app/service/container.go index 9b6ddb3f7e61..d4c8baa8f8ae 100644 --- a/agent/app/service/container.go +++ b/agent/app/service/container.go @@ -804,6 +804,9 @@ func (u *ContainerService) StreamLogs(ctx *gin.Context, params dto.StreamLog) { select { case msg, ok := <-messageChan: if !ok { + if msg == "" { + return true + } return false } _, err := fmt.Fprintf(w, "data: %v\n\n", msg) @@ -812,8 +815,10 @@ func (u *ContainerService) StreamLogs(ctx *gin.Context, params dto.StreamLog) { } return true case err := <-errorChan: - _, _ = fmt.Fprintf(w, "event: error\ndata: %v\n\n", err.Error()) - return false + if err != nil { + _, _ = fmt.Fprintf(w, "event: error\ndata: %v\n\n", err.Error()) + } + return true case <-ctx.Request.Context().Done(): return false } diff --git a/agent/app/service/runtime_utils.go b/agent/app/service/runtime_utils.go index 2a1d86ca8c48..85ca883633a1 100644 --- a/agent/app/service/runtime_utils.go +++ b/agent/app/service/runtime_utils.go @@ -187,7 +187,7 @@ func SyncRuntimesStatus(runtimes []model.Runtime) error { } } for _, index := range runtimeContainer { - if runtimes[index].Status != constant.StatusBuilding { + if runtimes[index].Status != constant.StatusBuilding && runtimes[index].Status != constant.StatusCreating { runtimes[index].Status = constant.StatusStopped } } @@ -499,7 +499,7 @@ func handleCompose(env gotenv.Env, composeContent []byte, create request.Runtime var volumes []interface{} defaultVolumes := make(map[string]string) switch create.Type { - case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimePython: + case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimePython, constant.RuntimeDotNet: defaultVolumes = constant.RuntimeDefaultVolumes case constant.RuntimeGo: defaultVolumes = constant.GoDefaultVolumes diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index c8a8528f3adb..820b3dc0a000 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -76,6 +76,16 @@ const message = { down: 'Stop', up: 'Start', }, + operate: { + start: 'Start', + stop: 'Stop', + restart: 'Restart', + reload: 'Reload', + rebuild: 'Rebuild', + sync: 'Sync', + up: 'Up', + down: 'Down', + }, search: { timeStart: 'Time start', timeEnd: 'Time end', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index b93089082e8b..1d224a3fe285 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -73,6 +73,16 @@ const message = { down: '停止', up: '起動', }, + operate: { + start: '開始', + stop: '停止', + restart: '再起動', + reload: '再読み込み', + rebuild: '再構築', + sync: '同期', + up: '起動', + down: '停止', + }, search: { timeStart: '時間開始', timeEnd: 'タイムエンド', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 5326b9e74fd0..befbb5fae570 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -73,6 +73,16 @@ const message = { down: '중지', up: '시작', }, + operate: { + start: '시작', + stop: '중지', + restart: '재시작', + reload: '다시 로드', + rebuild: '재구축', + sync: '동기화', + up: '실행', + down: '중지', + }, search: { timeStart: '시작 시간', timeEnd: '종료 시간', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 47351ce9ba73..fdb83ef2dfe9 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -73,6 +73,16 @@ const message = { down: 'Hentikan', up: 'Mulakan', }, + operate: { + start: 'Mula', + stop: 'Hentikan', + restart: 'Mulai Semula', + reload: 'Muat Semula', + rebuild: 'Bangun Semula', + sync: 'Segerakkan', + up: 'Naik', + down: 'Turun', + }, search: { timeStart: 'Masa mula', timeEnd: 'Masa tamat', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index 61ca83b664fa..d1a1c67f6ebb 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -73,6 +73,16 @@ const message = { down: 'Parar', up: 'Iniciar', }, + operate: { + start: 'Iniciar', + stop: 'Parar', + restart: 'Reiniciar', + reload: 'Recarregar', + rebuild: 'Reconstruir', + sync: 'Sincronizar', + up: 'Iniciar', + down: 'Parar', + }, search: { timeStart: 'Hora inicial', timeEnd: 'Hora final', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 82d9d2b755bb..e2ad3b9cbdb7 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -73,6 +73,16 @@ const message = { down: 'Остановить', up: 'Запустить', }, + operate: { + start: 'Запустить', + stop: 'Остановить', + restart: 'Перезапустить', + reload: 'Перезагрузить', + rebuild: 'Перестроить', + sync: 'Синхронизировать', + up: 'Запустить', + down: 'Остановить', + }, search: { timeStart: 'Время начала', timeEnd: 'Время окончания', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 276199ce0a98..bc7ec539fbc2 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -76,6 +76,16 @@ const message = { down: '停止', up: '啟動', }, + operate: { + start: '啟動', + stop: '停止', + restart: '重新啟動', + reload: '重新載入', + rebuild: '重建', + sync: '同步', + up: '啟動', + down: '停止', + }, search: { timeStart: '開始時間', timeEnd: '結束時間', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 41afd2b7dfa9..065e7147428c 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -83,6 +83,8 @@ const message = { reload: '重载', rebuild: '重建', sync: '同步', + up: '启动', + down: '停止', }, search: { timeStart: '开始时间', diff --git a/frontend/src/views/home/app/index.vue b/frontend/src/views/home/app/index.vue index d1dca0e59d7d..4a12d437b815 100644 --- a/frontend/src/views/home/app/index.vue +++ b/frontend/src/views/home/app/index.vue @@ -226,7 +226,7 @@ const goInstall = (key: string, type: string) => { case 'java': case 'go': case 'python': - case 'donet': + case 'dotnet': router.push({ path: '/websites/runtimes/' + type }); break; default: diff --git a/frontend/src/views/website/runtime/dotnet/index.vue b/frontend/src/views/website/runtime/dotnet/index.vue index 20c31f64b743..256b35d1712c 100644 --- a/frontend/src/views/website/runtime/dotnet/index.vue +++ b/frontend/src/views/website/runtime/dotnet/index.vue @@ -133,7 +133,7 @@ const req = reactive({ name: '', page: 1, pageSize: 40, - type: 'donet', + type: 'dotnet', }); const buttons = [ { @@ -199,7 +199,7 @@ const sync = () => { }; const openCreate = () => { - operateRef.value.acceptParams({ type: 'donet', mode: 'create' }); + operateRef.value.acceptParams({ type: 'dotnet', mode: 'create' }); }; const openDetail = (row: Runtime.Runtime) => { @@ -228,8 +228,8 @@ const goDashboard = async (port: any, protocol: string) => { const operateRuntime = async (operate: string, ID: number) => { try { const action = await ElMessageBox.confirm( - i18n.global.t('runtime.operatorHelper', [i18n.global.t('ommons.operate.' + operate)]), - i18n.global.t('ommons.operate.' + operate), + i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.operate.' + operate)]), + i18n.global.t('commons.operate.' + operate), { confirmButtonText: i18n.global.t('commons.button.confirm'), cancelButtonText: i18n.global.t('commons.button.cancel'), diff --git a/frontend/src/views/website/runtime/dotnet/operate/index.vue b/frontend/src/views/website/runtime/dotnet/operate/index.vue index e9df6f790210..608fef10ec0c 100644 --- a/frontend/src/views/website/runtime/dotnet/operate/index.vue +++ b/frontend/src/views/website/runtime/dotnet/operate/index.vue @@ -80,7 +80,7 @@ const initData = (type: string) => ({ environments: [], volumes: [], }); -let runtime = reactive(initData('donet')); +let runtime = reactive(initData('dotnet')); const rules = ref({ name: [Rules.requiredInput, Rules.appName], appID: [Rules.requiredSelect], diff --git a/frontend/src/views/website/runtime/go/index.vue b/frontend/src/views/website/runtime/go/index.vue index 4bfc8190772f..e8f4cba97e28 100644 --- a/frontend/src/views/website/runtime/go/index.vue +++ b/frontend/src/views/website/runtime/go/index.vue @@ -222,8 +222,8 @@ const goDashboard = async (port: any, protocol: string) => { const operateRuntime = async (operate: string, ID: number) => { try { const action = await ElMessageBox.confirm( - i18n.global.t('runtime.operatorHelper', [i18n.global.t('ommons.operate.' + operate)]), - i18n.global.t('ommons.operate.' + operate), + i18n.global.t('runtime.operatorHelper', [i18n.global.t('commons.operate.' + operate)]), + i18n.global.t('commons.operate.' + operate), { confirmButtonText: i18n.global.t('commons.button.confirm'), cancelButtonText: i18n.global.t('commons.button.cancel'),