mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-14 10:36:30 +08:00
feat: Add restart support for container compose (#10129)
This commit is contained in:
parent
ebdc3f05de
commit
0a5b13a418
2 changed files with 14 additions and 6 deletions
|
@ -258,7 +258,7 @@ type ComposeCreate struct {
|
|||
type ComposeOperation struct {
|
||||
Name string `json:"name" validate:"required"`
|
||||
Path string `json:"path"`
|
||||
Operation string `json:"operation" validate:"required,oneof=up start stop down delete"`
|
||||
Operation string `json:"operation" validate:"required,oneof=up start restart stop down delete"`
|
||||
WithFile bool `json:"withFile"`
|
||||
}
|
||||
type ComposeUpdate struct {
|
||||
|
|
|
@ -49,11 +49,13 @@
|
|||
</el-table-column>
|
||||
<el-table-column :label="$t('container.composeDirectory')" min-width="80" fix>
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link @click="toComposeFolder(row)">
|
||||
<el-icon>
|
||||
<FolderOpened />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-tooltip :content="row.workdir">
|
||||
<el-button type="primary" link @click="toComposeFolder(row)">
|
||||
<el-icon>
|
||||
<FolderOpened />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('container.containerStatus')" min-width="80" fix>
|
||||
|
@ -251,6 +253,12 @@ const buttons = [
|
|||
onComposeOperate('stop', row);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('commons.operate.restart'),
|
||||
click: (row: Container.ComposeInfo) => {
|
||||
onComposeOperate('restart', row);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: i18n.global.t('commons.operate.delete'),
|
||||
click: (row: Container.ComposeInfo) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue