mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 15:06:37 +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 {
|
taskItem.AddSubTask(i18n.GetWithName("ContainerCreate", req.Name), func(t *task.Task) error {
|
||||||
err := client.ContainerRemove(ctx, req.ContainerID, container.RemoveOptions{Force: true})
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -753,7 +753,7 @@ func (u *ContainerService) ContainerUpgrade(req dto.ContainerUpgrade) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err := client.ContainerRemove(ctx, req.Name, container.RemoveOptions{Force: true})
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,6 @@
|
||||||
back-name="ContainerItem"
|
back-name="ContainerItem"
|
||||||
:title="isCreate ? $t('container.create') : $t('commons.button.edit') + ' - ' + form.name"
|
: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>
|
<template #main>
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
|
@ -24,6 +16,13 @@
|
||||||
<el-row type="flex" justify="center" :gutter="20">
|
<el-row type="flex" justify="center" :gutter="20">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-card>
|
<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()">
|
<el-button v-if="isCreate" type="primary" icon="EditPen" plain @click="toTerminal()">
|
||||||
{{ $t('container.commandInput') }}
|
{{ $t('container.commandInput') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue