mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 网站 OpenResty 增加重载功能 (#3182)
This commit is contained in:
parent
14142be38f
commit
58b6a2de32
@ -262,6 +262,8 @@ func (a *AppInstallService) Operate(req request.AppInstalledOperate) error {
|
||||
return syncByID(install.ID)
|
||||
case constant.Upgrade:
|
||||
return upgradeInstall(install.ID, req.DetailId, req.Backup)
|
||||
case constant.Reload:
|
||||
return opNginx(install.ContainerName, constant.NginxReload)
|
||||
default:
|
||||
return errors.New("operate not support")
|
||||
}
|
||||
|
@ -36,16 +36,14 @@ const (
|
||||
type AppOperate string
|
||||
|
||||
var (
|
||||
Up AppOperate = "up"
|
||||
Down AppOperate = "down"
|
||||
Start AppOperate = "start"
|
||||
Stop AppOperate = "stop"
|
||||
Restart AppOperate = "restart"
|
||||
Delete AppOperate = "delete"
|
||||
Sync AppOperate = "sync"
|
||||
Backup AppOperate = "backup"
|
||||
Restore AppOperate = "restore"
|
||||
Update AppOperate = "update"
|
||||
Rebuild AppOperate = "rebuild"
|
||||
Upgrade AppOperate = "upgrade"
|
||||
Reload AppOperate = "reload"
|
||||
)
|
||||
|
@ -30,6 +30,16 @@
|
||||
{{ $t('app.restart') }}
|
||||
</el-button>
|
||||
<el-divider direction="vertical" />
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
v-if="data.app === 'OpenResty'"
|
||||
@click="onOperate('reload')"
|
||||
:disabled="data.status !== 'Running'"
|
||||
>
|
||||
{{ $t('app.reload') }}
|
||||
</el-button>
|
||||
<el-divider v-if="data.app === 'OpenResty'" direction="vertical" />
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="setting"
|
||||
|
@ -1525,6 +1525,7 @@ const message = {
|
||||
hostModeHelper:
|
||||
'The current application network mode is host mode. If you need to open the port, please open it manually on the firewall page.',
|
||||
showLocal: 'Show Local Application',
|
||||
reload: 'Reload',
|
||||
},
|
||||
website: {
|
||||
website: 'Website',
|
||||
|
@ -1425,6 +1425,7 @@ const message = {
|
||||
syncAllAppHelper: '即將同步所有應用,是否繼續? ',
|
||||
hostModeHelper: '目前應用網路模式為 host 模式,如需放開端口,請在防火牆頁面手動放開',
|
||||
showLocal: '顯示本機應用程式',
|
||||
reload: '重載',
|
||||
},
|
||||
website: {
|
||||
website: '網站',
|
||||
|
@ -1425,6 +1425,7 @@ const message = {
|
||||
syncAllAppHelper: '即将同步所有应用,是否继续?',
|
||||
hostModeHelper: '当前应用网络模式为 host 模式,如需放开端口,请在防火墙页面手动放开',
|
||||
showLocal: '显示本地应用',
|
||||
reload: '重载',
|
||||
},
|
||||
website: {
|
||||
website: '网站',
|
||||
|
Loading…
x
Reference in New Issue
Block a user