mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-10 19:50:53 +08:00
fix: incorrect restart strategy display in app editor (#10136)
This commit is contained in:
parent
261cb2061b
commit
9cf52ccc97
3 changed files with 9 additions and 0 deletions
|
|
@ -486,6 +486,11 @@ func (a AppService) Install(req request.AppInstallCreate) (appInstall *model.App
|
||||||
req.Params["DATABASE_NAME"] = database.Name
|
req.Params["DATABASE_NAME"] = database.Name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if app.Key == "openresty" {
|
||||||
|
req.Params["CONTAINER_PACKAGE_URL"] = "http://archive.ubuntu.com/ubuntu/"
|
||||||
|
req.Params["RESTY_ADD_PACKAGE_BUILDDEPS"] = ""
|
||||||
|
req.Params["RESTY_CONFIG_OPTIONS_MORE"] = ""
|
||||||
|
}
|
||||||
paramByte, err = json.Marshal(req.Params)
|
paramByte, err = json.Marshal(req.Params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -808,6 +808,7 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
|
||||||
if install.App.Key == constant.AppOpenresty {
|
if install.App.Key == constant.AppOpenresty {
|
||||||
if err = buildNginx(t); err != nil {
|
if err = buildNginx(t); err != nil {
|
||||||
t.Log(err.Error())
|
t.Log(err.Error())
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,9 @@ const get = async () => {
|
||||||
paramModel.isHostMode = res.data.hostMode;
|
paramModel.isHostMode = res.data.hostMode;
|
||||||
paramModel.specifyIP = res.data.specifyIP;
|
paramModel.specifyIP = res.data.specifyIP;
|
||||||
paramModel.restartPolicy = res.data.restartPolicy || 'no';
|
paramModel.restartPolicy = res.data.restartPolicy || 'no';
|
||||||
|
if (paramModel.restartPolicy === 'on-failure:5') {
|
||||||
|
paramModel.restartPolicy = 'on-failure';
|
||||||
|
}
|
||||||
appConfigUpdate.value.webUI = res.data.webUI;
|
appConfigUpdate.value.webUI = res.data.webUI;
|
||||||
if (res.data.webUI != '') {
|
if (res.data.webUI != '') {
|
||||||
const httpConfig = splitHttp(res.data.webUI);
|
const httpConfig = splitHttp(res.data.webUI);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue