mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-06 05:24:33 +08:00
fix: Fix container edit task log abnormalities (#9590)
This commit is contained in:
parent
6427337728
commit
117faa952e
2 changed files with 9 additions and 10 deletions
|
@ -677,7 +677,7 @@ func (u *ContainerService) ContainerUpdate(req dto.ContainerOperate) error {
|
|||
|
||||
taskItem.AddSubTask(i18n.GetWithName("ContainerCreate", req.Name), func(t *task.Task) error {
|
||||
err := client.ContainerRemove(ctx, req.ContainerID, container.RemoveOptions{Force: true})
|
||||
taskItem.LogWithStatus(i18n.GetMsgByKey("ContainerRemoveOld"), err)
|
||||
taskItem.LogWithStatus(i18n.GetWithName("ContainerRemoveOld", req.Name), err)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ func (u *ContainerService) ContainerUpgrade(req dto.ContainerUpgrade) error {
|
|||
}
|
||||
}
|
||||
err := client.ContainerRemove(ctx, req.Name, container.RemoveOptions{Force: true})
|
||||
taskItem.LogWithStatus(i18n.GetMsgByKey("ContainerRemoveOld"), err)
|
||||
taskItem.LogWithStatus(i18n.GetWithName("ContainerRemoveOld", req.Name), err)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -4,14 +4,6 @@
|
|||
back-name="ContainerItem"
|
||||
:title="isCreate ? $t('container.create') : $t('commons.button.edit') + ' - ' + form.name"
|
||||
>
|
||||
<template #prompt>
|
||||
<el-alert
|
||||
v-if="!isCreate && isFromApp(form)"
|
||||
:title="$t('container.containerFromAppHelper')"
|
||||
:closable="false"
|
||||
type="error"
|
||||
/>
|
||||
</template>
|
||||
<template #main>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
|
@ -24,6 +16,13 @@
|
|||
<el-row type="flex" justify="center" :gutter="20">
|
||||
<el-col :span="20">
|
||||
<el-card>
|
||||
<el-alert
|
||||
v-if="!isCreate && isFromApp(form)"
|
||||
:title="$t('container.containerFromAppHelper')"
|
||||
:closable="false"
|
||||
type="error"
|
||||
/>
|
||||
|
||||
<el-button v-if="isCreate" type="primary" icon="EditPen" plain @click="toTerminal()">
|
||||
{{ $t('container.commandInput') }}
|
||||
</el-button>
|
||||
|
|
Loading…
Add table
Reference in a new issue