mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-09 00:24:55 +08:00
fix: Fix issue with .NET environment creation failure (#7980)
This commit is contained in:
parent
68146ec70b
commit
efa2fa9eac
14 changed files with 89 additions and 12 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -73,6 +73,16 @@ const message = {
|
|||
down: '停止',
|
||||
up: '起動',
|
||||
},
|
||||
operate: {
|
||||
start: '開始',
|
||||
stop: '停止',
|
||||
restart: '再起動',
|
||||
reload: '再読み込み',
|
||||
rebuild: '再構築',
|
||||
sync: '同期',
|
||||
up: '起動',
|
||||
down: '停止',
|
||||
},
|
||||
search: {
|
||||
timeStart: '時間開始',
|
||||
timeEnd: 'タイムエンド',
|
||||
|
|
|
|||
|
|
@ -73,6 +73,16 @@ const message = {
|
|||
down: '중지',
|
||||
up: '시작',
|
||||
},
|
||||
operate: {
|
||||
start: '시작',
|
||||
stop: '중지',
|
||||
restart: '재시작',
|
||||
reload: '다시 로드',
|
||||
rebuild: '재구축',
|
||||
sync: '동기화',
|
||||
up: '실행',
|
||||
down: '중지',
|
||||
},
|
||||
search: {
|
||||
timeStart: '시작 시간',
|
||||
timeEnd: '종료 시간',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -73,6 +73,16 @@ const message = {
|
|||
down: 'Остановить',
|
||||
up: 'Запустить',
|
||||
},
|
||||
operate: {
|
||||
start: 'Запустить',
|
||||
stop: 'Остановить',
|
||||
restart: 'Перезапустить',
|
||||
reload: 'Перезагрузить',
|
||||
rebuild: 'Перестроить',
|
||||
sync: 'Синхронизировать',
|
||||
up: 'Запустить',
|
||||
down: 'Остановить',
|
||||
},
|
||||
search: {
|
||||
timeStart: 'Время начала',
|
||||
timeEnd: 'Время окончания',
|
||||
|
|
|
|||
|
|
@ -76,6 +76,16 @@ const message = {
|
|||
down: '停止',
|
||||
up: '啟動',
|
||||
},
|
||||
operate: {
|
||||
start: '啟動',
|
||||
stop: '停止',
|
||||
restart: '重新啟動',
|
||||
reload: '重新載入',
|
||||
rebuild: '重建',
|
||||
sync: '同步',
|
||||
up: '啟動',
|
||||
down: '停止',
|
||||
},
|
||||
search: {
|
||||
timeStart: '開始時間',
|
||||
timeEnd: '結束時間',
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ const message = {
|
|||
reload: '重载',
|
||||
rebuild: '重建',
|
||||
sync: '同步',
|
||||
up: '启动',
|
||||
down: '停止',
|
||||
},
|
||||
search: {
|
||||
timeStart: '开始时间',
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ const req = reactive<Runtime.RuntimeReq>({
|
|||
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'),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const initData = (type: string) => ({
|
|||
environments: [],
|
||||
volumes: [],
|
||||
});
|
||||
let runtime = reactive<Runtime.RuntimeCreate>(initData('donet'));
|
||||
let runtime = reactive<Runtime.RuntimeCreate>(initData('dotnet'));
|
||||
const rules = ref<any>({
|
||||
name: [Rules.requiredInput, Rules.appName],
|
||||
appID: [Rules.requiredSelect],
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue