diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 6b404bb19..7c806e7bc 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -546,6 +546,8 @@ const message = { cpuShareHelper: 'The default CPU share for a container is 1024, which can be increased to give the container more CPU time.', + containerFromAppHelper: + 'Detected that this container originates from the app store. App operations may cause current edits to be invalidated.', command: 'Command', console: 'Console Interaction', tty: 'TTY (-t)', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 74e305529..352be17fe 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -532,6 +532,7 @@ const message = { cpuShare: 'CPU 權重', cpuShareHelper: '容器默認份額為 1024 個 CPU,增大可使當前容器獲得更多的 CPU 時間', + containerFromAppHelper: '檢測到該容器來源於應用商店,應用操作可能會導致當前編輯失效', command: '命令', console: '控製臺交互', tty: '偽終端 ( -t )', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 22d8eaf16..4be57f888 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -532,6 +532,7 @@ const message = { cpuShare: 'CPU 权重', cpuShareHelper: '容器默认份额为 1024 个 CPU,增大可使当前容器获得更多的 CPU 时间', + containerFromAppHelper: '检测到该容器来源于应用商店,应用操作可能会导致当前编辑失效', command: '命令', console: '控制台交互', tty: '伪终端 ( -t )', diff --git a/frontend/src/views/container/container/operate/index.vue b/frontend/src/views/container/container/operate/index.vue index 72b65b3e2..6205f05f7 100644 --- a/frontend/src/views/container/container/operate/index.vue +++ b/frontend/src/views/container/container/operate/index.vue @@ -24,6 +24,13 @@ > + @@ -171,7 +178,7 @@ - + { itemCmd += `'${item}' `; } dialogData.value.rowData.cmdStr = itemCmd ? itemCmd.substring(0, itemCmd.length - 1) : ''; - if (dialogData.value.rowData.entrypoint) { - dialogData.value.rowData.entrypointStr = dialogData.value.rowData.entrypoint.join(' '); + + let itemEntrypoint = ''; + for (const item of dialogData.value.rowData.entrypoint) { + itemEntrypoint += `'${item}' `; } + dialogData.value.rowData.entrypointStr = itemEntrypoint + ? itemEntrypoint.substring(0, itemEntrypoint.length - 1) + : ''; dialogData.value.rowData.labels = dialogData.value.rowData.labels || []; dialogData.value.rowData.env = dialogData.value.rowData.env || []; dialogData.value.rowData.labelsStr = dialogData.value.rowData.labels.join('\n'); @@ -435,8 +447,21 @@ const onSubmit = async (formEl: FormInstance | undefined) => { } } } - if (dialogData.value.rowData!.entrypointStr) { - dialogData.value.rowData!.entrypoint = dialogData.value.rowData!.entrypointStr.split(' '); + dialogData.value.rowData!.entrypoint = []; + if (dialogData.value.rowData?.entrypointStr) { + if (dialogData.value.rowData?.entrypointStr.indexOf(`'`) !== -1) { + let itemEntrypoint = dialogData.value.rowData!.entrypointStr.split(`'`); + for (const entry of itemEntrypoint) { + if (entry && entry !== ' ') { + dialogData.value.rowData!.entrypoint.push(entry); + } + } + } else { + let itemEntrypoint = dialogData.value.rowData!.entrypointStr.split(` `); + for (const entry of itemEntrypoint) { + dialogData.value.rowData!.entrypoint.push(entry); + } + } } if (dialogData.value.rowData!.publishAllPorts) { dialogData.value.rowData!.exposedPorts = [];