diff --git a/agent/app/dto/container.go b/agent/app/dto/container.go index e6d9f8188a5b..5f654ddb969d 100644 --- a/agent/app/dto/container.go +++ b/agent/app/dto/container.go @@ -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 { diff --git a/frontend/src/views/container/compose/index.vue b/frontend/src/views/container/compose/index.vue index bb2479d5b75a..477865b07c8e 100644 --- a/frontend/src/views/container/compose/index.vue +++ b/frontend/src/views/container/compose/index.vue @@ -49,11 +49,13 @@ @@ -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) => {