Skip to content

Commit efa2fa9

Browse files
fix: Fix issue with .NET environment creation failure (#7980)
1 parent 68146ec commit efa2fa9

File tree

14 files changed

+89
-12
lines changed

14 files changed

+89
-12
lines changed

agent/app/service/container.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,9 @@ func (u *ContainerService) StreamLogs(ctx *gin.Context, params dto.StreamLog) {
804804
select {
805805
case msg, ok := <-messageChan:
806806
if !ok {
807+
if msg == "" {
808+
return true
809+
}
807810
return false
808811
}
809812
_, err := fmt.Fprintf(w, "data: %v\n\n", msg)
@@ -812,8 +815,10 @@ func (u *ContainerService) StreamLogs(ctx *gin.Context, params dto.StreamLog) {
812815
}
813816
return true
814817
case err := <-errorChan:
815-
_, _ = fmt.Fprintf(w, "event: error\ndata: %v\n\n", err.Error())
816-
return false
818+
if err != nil {
819+
_, _ = fmt.Fprintf(w, "event: error\ndata: %v\n\n", err.Error())
820+
}
821+
return true
817822
case <-ctx.Request.Context().Done():
818823
return false
819824
}

agent/app/service/runtime_utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func SyncRuntimesStatus(runtimes []model.Runtime) error {
187187
}
188188
}
189189
for _, index := range runtimeContainer {
190-
if runtimes[index].Status != constant.StatusBuilding {
190+
if runtimes[index].Status != constant.StatusBuilding && runtimes[index].Status != constant.StatusCreating {
191191
runtimes[index].Status = constant.StatusStopped
192192
}
193193
}
@@ -499,7 +499,7 @@ func handleCompose(env gotenv.Env, composeContent []byte, create request.Runtime
499499
var volumes []interface{}
500500
defaultVolumes := make(map[string]string)
501501
switch create.Type {
502-
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimePython:
502+
case constant.RuntimeNode, constant.RuntimeJava, constant.RuntimePython, constant.RuntimeDotNet:
503503
defaultVolumes = constant.RuntimeDefaultVolumes
504504
case constant.RuntimeGo:
505505
defaultVolumes = constant.GoDefaultVolumes

frontend/src/lang/modules/en.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ const message = {
7676
down: 'Stop',
7777
up: 'Start',
7878
},
79+
operate: {
80+
start: 'Start',
81+
stop: 'Stop',
82+
restart: 'Restart',
83+
reload: 'Reload',
84+
rebuild: 'Rebuild',
85+
sync: 'Sync',
86+
up: 'Up',
87+
down: 'Down',
88+
},
7989
search: {
8090
timeStart: 'Time start',
8191
timeEnd: 'Time end',

frontend/src/lang/modules/ja.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ const message = {
7373
down: '停止',
7474
up: '起動',
7575
},
76+
operate: {
77+
start: '開始',
78+
stop: '停止',
79+
restart: '再起動',
80+
reload: '再読み込み',
81+
rebuild: '再構築',
82+
sync: '同期',
83+
up: '起動',
84+
down: '停止',
85+
},
7686
search: {
7787
timeStart: '時間開始',
7888
timeEnd: 'タイムエンド',

frontend/src/lang/modules/ko.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ const message = {
7373
down: '중지',
7474
up: '시작',
7575
},
76+
operate: {
77+
start: '시작',
78+
stop: '중지',
79+
restart: '재시작',
80+
reload: '다시 로드',
81+
rebuild: '재구축',
82+
sync: '동기화',
83+
up: '실행',
84+
down: '중지',
85+
},
7686
search: {
7787
timeStart: '시작 시간',
7888
timeEnd: '종료 시간',

frontend/src/lang/modules/ms.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ const message = {
7373
down: 'Hentikan',
7474
up: 'Mulakan',
7575
},
76+
operate: {
77+
start: 'Mula',
78+
stop: 'Hentikan',
79+
restart: 'Mulai Semula',
80+
reload: 'Muat Semula',
81+
rebuild: 'Bangun Semula',
82+
sync: 'Segerakkan',
83+
up: 'Naik',
84+
down: 'Turun',
85+
},
7686
search: {
7787
timeStart: 'Masa mula',
7888
timeEnd: 'Masa tamat',

frontend/src/lang/modules/pt-br.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ const message = {
7373
down: 'Parar',
7474
up: 'Iniciar',
7575
},
76+
operate: {
77+
start: 'Iniciar',
78+
stop: 'Parar',
79+
restart: 'Reiniciar',
80+
reload: 'Recarregar',
81+
rebuild: 'Reconstruir',
82+
sync: 'Sincronizar',
83+
up: 'Iniciar',
84+
down: 'Parar',
85+
},
7686
search: {
7787
timeStart: 'Hora inicial',
7888
timeEnd: 'Hora final',

frontend/src/lang/modules/ru.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ const message = {
7373
down: 'Остановить',
7474
up: 'Запустить',
7575
},
76+
operate: {
77+
start: 'Запустить',
78+
stop: 'Остановить',
79+
restart: 'Перезапустить',
80+
reload: 'Перезагрузить',
81+
rebuild: 'Перестроить',
82+
sync: 'Синхронизировать',
83+
up: 'Запустить',
84+
down: 'Остановить',
85+
},
7686
search: {
7787
timeStart: 'Время начала',
7888
timeEnd: 'Время окончания',

frontend/src/lang/modules/tw.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ const message = {
7676
down: '停止',
7777
up: '啟動',
7878
},
79+
operate: {
80+
start: '啟動',
81+
stop: '停止',
82+
restart: '重新啟動',
83+
reload: '重新載入',
84+
rebuild: '重建',
85+
sync: '同步',
86+
up: '啟動',
87+
down: '停止',
88+
},
7989
search: {
8090
timeStart: '開始時間',
8191
timeEnd: '結束時間',

frontend/src/lang/modules/zh.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ const message = {
8383
reload: '重载',
8484
rebuild: '重建',
8585
sync: '同步',
86+
up: '启动',
87+
down: '停止',
8688
},
8789
search: {
8890
timeStart: '开始时间',

0 commit comments

Comments
 (0)