diff --git a/agent/app/service/app.go b/agent/app/service/app.go index d711768cc..5e4bb3445 100644 --- a/agent/app/service/app.go +++ b/agent/app/service/app.go @@ -351,7 +351,7 @@ func (a AppService) Install(req request.AppInstallCreate) (appInstall *model.App return } } - if app.Key == "openresty" && app.Resource == "remote" && common.CompareVersion(appDetail.Version, "1.21.4.3-3-3") { + if app.Key == "openresty" && app.Resource == "remote" && common.CompareVersion(appDetail.Version, "1.27") { if dir, ok := req.Params["WEBSITE_DIR"]; ok { siteDir := dir.(string) if siteDir == "" || !strings.HasPrefix(siteDir, "/") { @@ -365,6 +365,7 @@ func (a AppService) Install(req request.AppInstallCreate) (appInstall *model.App } if !fileOp.Stat(siteDir) { _ = fileOp.CreateDir(siteDir, constant.DirPerm) + _ = fileOp.CreateDir(path.Join(siteDir, "conf.d"), constant.DirPerm) } err = settingRepo.UpdateOrCreate("WEBSITE_DIR", siteDir) if err != nil { @@ -377,16 +378,16 @@ func (a AppService) Install(req request.AppInstallCreate) (appInstall *model.App continue } var port int - if port, err = checkPort(key, req.Params); err == nil { - if key == "PANEL_APP_PORT_HTTP" { - httpPort = port - } - if key == "PANEL_APP_PORT_HTTPS" { - httpsPort = port - } - } else { + port, err = checkPort(key, req.Params) + if err != nil { return } + if key == "PANEL_APP_PORT_HTTP" { + httpPort = port + } + if key == "PANEL_APP_PORT_HTTPS" { + httpsPort = port + } } if err = checkRequiredAndLimit(app); err != nil { @@ -919,11 +920,11 @@ func (a AppService) SyncAppListFromRemote(taskID string) (err error) { appTags []*model.AppTag oldAppIds []uint ) - for _, t := range list.Extra.Tags { + for _, tag := range list.Extra.Tags { tags = append(tags, &model.Tag{ - Key: t.Key, - Name: t.Name, - Sort: t.Sort, + Key: tag.Key, + Name: tag.Name, + Sort: tag.Sort, }) } deleteCustomApp() diff --git a/agent/init/migration/migrations/init.go b/agent/init/migration/migrations/init.go index 1201ba5a5..ed42b2a87 100644 --- a/agent/init/migration/migrations/init.go +++ b/agent/init/migration/migrations/init.go @@ -207,7 +207,7 @@ var InitDefaultCA = &gormigrate.Migration{ var InitPHPExtensions = &gormigrate.Migration{ ID: "20240722-add-php-extensions", Migrate: func(tx *gorm.DB) error { - if err := tx.Create(&model.PHPExtensions{Name: "Default", Extensions: "bcmath,gd,gettext,intl,pcntl,shmop,soap,sockets,sysvsem,xmlrpc,zip"}).Error; err != nil { + if err := tx.Create(&model.PHPExtensions{Name: "Default", Extensions: "bcmath,ftp,gd,gettext,intl,mysqli,pcntl,pdo_mysql,shmop,soap,sockets,sysvsem,xmlrpc,zip"}).Error; err != nil { return err } if err := tx.Create(&model.PHPExtensions{Name: "WordPress", Extensions: "exif,igbinary,imagick,intl,zip,apcu,memcached,opcache,redis,bc,image,shmop,mysqli,pdo_mysql,gd"}).Error; err != nil { diff --git a/core/constant/common.go b/core/constant/common.go index 31994d0ad..d3f0bcebd 100644 --- a/core/constant/common.go +++ b/core/constant/common.go @@ -72,7 +72,6 @@ var WebUrlMap = map[string]struct{}{ "/hosts/files": {}, "/hosts/monitor/monitor": {}, "/hosts/monitor/setting": {}, - "/hosts/terminal": {}, "/hosts/firewall/port": {}, "/hosts/firewall/forward": {}, "/hosts/firewall/ip": {}, @@ -82,6 +81,8 @@ var WebUrlMap = map[string]struct{}{ "/hosts/ssh/log": {}, "/hosts/ssh/session": {}, + "/terminal": {}, + "/logs": {}, "/logs/operation": {}, "/logs/login": {}, diff --git a/frontend/package.json b/frontend/package.json index 3ca9c181d..cdab697e6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -21,8 +21,6 @@ }, "dependencies": { "@codemirror/lang-json": "^6.0.1", - "@codemirror/lang-html": "^6.4.9", - "@codemirror/lang-php": "^6.0.1", "@codemirror/language": "^6.10.2", "@codemirror/legacy-modes": "^6.4.0", "@codemirror/theme-one-dark": "^6.1.2", diff --git a/frontend/src/views/website/runtime/php/create/index.vue b/frontend/src/views/website/runtime/php/create/index.vue index 6d1be40c2..7c3dad40a 100644 --- a/frontend/src/views/website/runtime/php/create/index.vue +++ b/frontend/src/views/website/runtime/php/create/index.vue @@ -97,10 +97,10 @@ > @@ -216,41 +216,41 @@ const phpSources = globalStore.isIntl ? [ { label: i18n.global.t('runtime.default'), - value: 'dl-cdn.alpinelinux.org', + value: 'https://dl-cdn.alpinelinux.org', }, { label: i18n.global.t('runtime.xtom'), - value: 'mirrors.xtom.com', + value: 'https://mirrors.xtom.com', }, ] : [ { label: i18n.global.t('runtime.ustc'), - value: 'mirrors.ustc.edu.cn', + value: 'https://mirrors.ustc.edu.cn', }, { label: i18n.global.t('runtime.netease'), - value: 'mirrors.163.com', + value: 'https://mirrors.163.com', }, { label: i18n.global.t('runtime.aliyun'), - value: 'mirrors.aliyun.com', + value: 'https://mirrors.aliyun.com', }, { label: i18n.global.t('runtime.tsinghua'), - value: 'mirrors.tuna.tsinghua.edu.cn', + value: 'https://mirrors.tuna.tsinghua.edu.cn', }, { label: i18n.global.t('runtime.xtomhk'), - value: 'mirrors.xtom.com.hk', + value: 'https://mirrors.xtom.com.hk', }, { label: i18n.global.t('runtime.xtom'), - value: 'mirrors.xtom.com', + value: 'https://mirrors.xtom.com', }, { - label: i18n.global.t('runtime.default'), - value: 'dl-cdn.alpinelinux.org', + label: i18n.global.t('commons.table.default'), + value: 'https://dl-cdn.alpinelinux.org', }, ]; @@ -476,8 +476,8 @@ const acceptParams = async (props: OperateRrops) => { getRuntime(props.id); } extensions.value = ''; - listPHPExtensions(); open.value = true; + listPHPExtensions(); }; defineExpose({ diff --git a/frontend/src/views/website/website/nginx/status/index.vue b/frontend/src/views/website/website/nginx/status/index.vue index c72c10e80..44a410dec 100644 --- a/frontend/src/views/website/website/nginx/status/index.vue +++ b/frontend/src/views/website/website/nginx/status/index.vue @@ -1,28 +1,52 @@ @@ -60,9 +84,3 @@ onMounted(() => { get(); }); - -