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