From 21deca4302d698097045de3096cde52fe1c1a697 Mon Sep 17 00:00:00 2001 From: Yuki Guo Date: Fri, 20 Nov 2026 16:39:37 +0800 Subject: [PATCH] feat(website): add batch checkout php version (#14481) --- agent/app/api/v2/website.go | 13 ++ agent/app/dto/request/website.go | 7 ++ agent/app/dto/response/website.go | 7 ++ agent/app/repo/website.go | 8 ++ agent/app/service/website.go | 79 ++++++++++-- agent/app/service/website_utils.go | 22 ++++ agent/router/ro_website.go | 1 + frontend/src/api/interface/website.ts | 14 +++ frontend/src/api/modules/website.ts | 4 + frontend/src/lang/modules/en.ts | 11 ++ frontend/src/lang/modules/es-es.ts | 11 ++ frontend/src/lang/modules/fa.ts | 11 ++ frontend/src/lang/modules/ja.ts | 11 ++ frontend/src/lang/modules/ko.ts | 10 ++ frontend/src/lang/modules/lo.ts | 10 ++ frontend/src/lang/modules/ms.ts | 11 ++ frontend/src/lang/modules/pt-br.ts | 11 ++ frontend/src/lang/modules/ru.ts | 11 ++ frontend/src/lang/modules/tr.ts | 10 ++ frontend/src/lang/modules/zh-Hant.ts | 10 ++ frontend/src/lang/modules/zh.ts | 10 ++ .../views/website/website/batch-op/php.vue | 116 ++++++++++++++++++ frontend/src/views/website/website/index.vue | 64 +++++++--- 23 files changed, 440 insertions(+), 22 deletions(-) create mode 100644 frontend/src/views/website/website/batch-op/php.vue diff --git a/agent/app/api/v2/website.go b/agent/app/api/v2/website.go index aa2bedb6e..dbc54e558 100644 --- a/agent/app/api/v2/website.go +++ b/agent/app/api/v2/website.go @@ -1340,3 +1340,16 @@ func (b *BaseApi) BatchSetHttps(c *gin.Context) { } helper.Success(c) } + +func (b *BaseApi) BatchChangePHPVersion(c *gin.Context) { + var req request.WebsiteBatchPHPVersionReq + if err := helper.CheckBindAndValidate(&req, c); err != nil { + return + } + results, err := websiteService.BatchChangePHPVersion(req) + if err != nil { + helper.InternalServer(c, err) + return + } + helper.SuccessWithData(c, results) +} diff --git a/agent/app/dto/request/website.go b/agent/app/dto/request/website.go index 95530796a..2a234b31b 100644 --- a/agent/app/dto/request/website.go +++ b/agent/app/dto/request/website.go @@ -5,6 +5,7 @@ import ( ) type WebsiteSearch struct { + RuntimeType string `json:"runtimeType" validate:"omitempty,oneof=php node java go python dotnet"` dto.PageInfo Name string `json:"name"` OrderBy string `json:"orderBy" validate:"required,oneof=primary_domain type status createdAt expire_date created_at favorite"` @@ -393,3 +394,9 @@ type ExecComposerReq struct { WebsiteID uint `json:"websiteID" validate:"required"` TaskID string `json:"taskID" validate:"required"` } + +// WebsiteBatchPHPVersionReq changes only existing PHP websites. +type WebsiteBatchPHPVersionReq struct { + IDs []uint `json:"ids" validate:"required,min=1"` + RuntimeID uint `json:"runtimeID" validate:"required"` +} diff --git a/agent/app/dto/response/website.go b/agent/app/dto/response/website.go index 4526e1000..9dced6c5b 100644 --- a/agent/app/dto/response/website.go +++ b/agent/app/dto/response/website.go @@ -129,3 +129,10 @@ type Database struct { From string `json:"from"` ID uint `json:"id"` } + +type WebsiteBatchPHPVersionResult struct { + ID uint `json:"id"` + Domain string `json:"domain"` + Status string `json:"status"` + Message string `json:"message"` +} diff --git a/agent/app/repo/website.go b/agent/app/repo/website.go index deef91f89..c27e663cb 100644 --- a/agent/app/repo/website.go +++ b/agent/app/repo/website.go @@ -18,6 +18,7 @@ type IWebsiteRepo interface { WithDefaultServer() DBOption WithDomainLike(domain string) DBOption WithSearchKeyword(keyword string, ids []uint) DBOption + WithRuntimeType(runtimeType string) DBOption WithRuntimeID(runtimeID uint) DBOption WithParentID(websiteID uint) DBOption WithType(websiteType string) DBOption @@ -60,6 +61,13 @@ func (w *WebsiteRepo) WithAppInstallIds(appInstallIDs []uint) DBOption { } } +func (w *WebsiteRepo) WithRuntimeType(runtimeType string) DBOption { + return func(db *gorm.DB) *gorm.DB { + runtimes := db.Session(&gorm.Session{NewDB: true}).Model(&model.Runtime{}).Select("id").Where("type = ?", runtimeType) + return db.Where("type = ? AND runtime_id IN (?)", "runtime", runtimes) + } +} + func (w *WebsiteRepo) WithRuntimeID(runtimeID uint) DBOption { return func(db *gorm.DB) *gorm.DB { return db.Where("runtime_id = ?", runtimeID) diff --git a/agent/app/service/website.go b/agent/app/service/website.go index 92101cd1b..f77c9ccea 100644 --- a/agent/app/service/website.go +++ b/agent/app/service/website.go @@ -83,6 +83,7 @@ type IWebsiteService interface { GetWebsite(id uint) (response.WebsiteDTO, error) ChangePHPVersion(req request.WebsitePHPVersionReq) error + BatchChangePHPVersion(req request.WebsiteBatchPHPVersionReq) ([]response.WebsiteBatchPHPVersionResult, error) OperateCrossSiteAccess(req request.CrossSiteAccessOp) error ExecComposer(req request.ExecComposerReq) error ChangeGroup(group, newGroup uint) error @@ -190,6 +191,9 @@ func (w WebsiteService) PageWebsite(req request.WebsiteSearch) (int64, []respons if req.Type != "" { opts = append(opts, websiteRepo.WithType(req.Type)) } + if req.RuntimeType != "" { + opts = append(opts, websiteRepo.WithRuntimeType(req.RuntimeType)) + } total, websites, err := websiteRepo.Page(req.Page, req.PageSize, opts...) if err != nil { return 0, nil, err @@ -1425,14 +1429,6 @@ func (w WebsiteService) ChangePHPVersion(req request.WebsitePHPVersionReq) (err if oldRuntime.Resource == constant.ResourceLocal { return buserr.New("ErrPHPResource") } - client, err := docker.NewDockerClient() - if err != nil { - return err - } - defer client.Close() - if !checkImageLike(client, oldRuntime.Image) { - return buserr.WithName("ErrImageNotExist", oldRuntime.Name) - } } if req.RuntimeID > 0 { @@ -1443,6 +1439,17 @@ func (w WebsiteService) ChangePHPVersion(req request.WebsitePHPVersionReq) (err if runtime.Resource == constant.ResourceLocal { return buserr.New("ErrPHPResource") } + if runtime.Type != constant.RuntimePHP { + return fmt.Errorf("target runtime must be PHP") + } + client, err := docker.NewDockerClient() + if err != nil { + return err + } + defer client.Close() + if err := validateWebsitePHPImage(context.Background(), client, runtime.Image, runtime.Name); err != nil { + return err + } website.RuntimeID = runtime.ID website.AppInstallID = 0 website.Proxy = fmt.Sprintf("127.0.0.1:%s", runtime.Port) @@ -2685,3 +2692,59 @@ func (w WebsiteService) UpdateStream(req request.StreamUpdate) error { website.StreamPorts = req.StreamConfig.StreamPorts return websiteRepo.Save(context.Background(), &website) } + +func (w WebsiteService) BatchChangePHPVersion(req request.WebsiteBatchPHPVersionReq) ([]response.WebsiteBatchPHPVersionResult, error) { + target, err := runtimeRepo.GetFirst(context.Background(), repo.WithByID(req.RuntimeID)) + if err != nil { + return nil, err + } + if target.Type != constant.RuntimePHP { + return nil, fmt.Errorf("target runtime must be PHP") + } + if target.Resource == constant.ResourceLocal { + return nil, buserr.New("ErrPHPResource") + } + results := make([]response.WebsiteBatchPHPVersionResult, 0, len(req.IDs)) + seen := make(map[uint]bool) + for _, id := range req.IDs { + if seen[id] { + continue + } + seen[id] = true + result := response.WebsiteBatchPHPVersionResult{ID: id, Status: "failed"} + website, err := websiteRepo.GetFirst(repo.WithByID(id)) + if err != nil { + result.Message = err.Error() + results = append(results, result) + continue + } + result.Domain = website.PrimaryDomain + if website.Type != constant.Runtime { + result.Status = "skipped" + result.Message = "notPHP" + } else { + runtime, lookupErr := runtimeRepo.GetFirst(context.Background(), repo.WithByID(website.RuntimeID)) + switch { + case lookupErr != nil: + result.Message = lookupErr.Error() + case runtime.Type != constant.RuntimePHP: + result.Status = "skipped" + result.Message = "notPHP" + case runtime.Resource == constant.ResourceLocal: + result.Status = "skipped" + result.Message = "localPHP" + case website.RuntimeID == req.RuntimeID: + result.Status = "skipped" + result.Message = "samePHP" + default: + if err := w.ChangePHPVersion(request.WebsitePHPVersionReq{WebsiteID: id, RuntimeID: req.RuntimeID}); err != nil { + result.Message = err.Error() + } else { + result.Status = "success" + } + } + } + results = append(results, result) + } + return results, nil +} diff --git a/agent/app/service/website_utils.go b/agent/app/service/website_utils.go index ac482d1c6..f1343f8b1 100644 --- a/agent/app/service/website_utils.go +++ b/agent/app/service/website_utils.go @@ -41,6 +41,8 @@ import ( "github.com/1Panel-dev/1Panel/agent/utils/nginx" "github.com/1Panel-dev/1Panel/agent/utils/nginx/parser" "github.com/1Panel-dev/1Panel/agent/utils/re" + "github.com/docker/docker/api/types/image" + "github.com/docker/docker/client" "github.com/pkg/errors" "gorm.io/gorm" ) @@ -2136,3 +2138,23 @@ func getManualWebsiteSSL(req request.WebsiteHTTPSOp) (model.WebsiteSSL, error) { websiteSSL.Status = constant.SSLReady return websiteSSL, nil } + +type websitePHPImageInspector interface { + ImageInspect(context.Context, string, ...client.ImageInspectOption) (image.InspectResponse, error) +} + +// Let Docker resolve the full reference, including registries, tags, digests and IDs. +// A missing source image must not prevent switching away from that environment. +func validateWebsitePHPImage(ctx context.Context, inspector websitePHPImageInspector, reference, name string) error { + if strings.TrimSpace(reference) == "" { + return buserr.WithName("ErrImageNotExist", name) + } + _, err := inspector.ImageInspect(ctx, reference) + if client.IsErrNotFound(err) { + return buserr.WithName("ErrImageNotExist", name) + } + if err != nil { + return fmt.Errorf("inspect PHP runtime %s image %s: %w", name, reference, err) + } + return nil +} diff --git a/agent/router/ro_website.go b/agent/router/ro_website.go index 2faaaca69..101925275 100644 --- a/agent/router/ro_website.go +++ b/agent/router/ro_website.go @@ -87,6 +87,7 @@ func (a *WebsiteRouter) InitRouter(Router *gin.RouterGroup) { websiteRouter.POST("/lbs/file", baseApi.UpdateLoadBalanceFile) websiteRouter.POST("/php/version", baseApi.ChangePHPVersion) + websiteRouter.POST("/php/version/batch", baseApi.BatchChangePHPVersion) websiteRouter.POST("/realip/config", baseApi.SetRealIPConfig) websiteRouter.GET("/realip/config/:id", baseApi.GetRealIPConfig) diff --git a/frontend/src/api/interface/website.ts b/frontend/src/api/interface/website.ts index 7d3e73a1a..65b570629 100644 --- a/frontend/src/api/interface/website.ts +++ b/frontend/src/api/interface/website.ts @@ -75,6 +75,8 @@ export namespace Website { } export interface WebSiteSearch extends ReqPage { + type?: string; + runtimeType?: string; name: string; orderBy: string; order: string; @@ -576,6 +578,18 @@ export namespace Website { content: string; } + export interface BatchPHPVersionChange { + ids: number[]; + runtimeID: number; + } + + export interface BatchPHPVersionResult { + id: number; + domain: string; + status: 'success' | 'failed' | 'skipped'; + message: string; + } + export interface PHPVersionChange { websiteID: number; runtimeID: number; diff --git a/frontend/src/api/modules/website.ts b/frontend/src/api/modules/website.ts index a0119440e..4afc16021 100644 --- a/frontend/src/api/modules/website.ts +++ b/frontend/src/api/modules/website.ts @@ -466,3 +466,7 @@ export const importCA = (params: { }) => { return http.post(`/websites/ca/import`, params); }; + +export const batchChangePHPVersion = (req: Website.BatchPHPVersionChange) => { + return http.post(`/websites/php/version/batch`, req, 600000); +}; diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 869b68be7..418519564 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -4636,6 +4636,17 @@ const message = { isEdirWarn: 'Changes to docker-compose.yml were detected. Please review the diff.', }, website: { + batchPHP: 'Switch PHP version', + batchPHPHelper: + 'Only PHP websites will be changed. Other websites are skipped. Local PHP environments are not supported.', + batchPHPCount: 'Selected: {0}; PHP websites: {1}; others: {2}.', + notPHP: 'Not a PHP website', + localPHP: 'Local PHP is not supported', + samePHP: 'Already using the target PHP environment', + batchPHPResult: 'Results', + batchPHPStatus_success: 'Succeeded', + batchPHPStatus_failed: 'Failed', + batchPHPStatus_skipped: 'Skipped', sslDomainMismatchWebsite: 'The certificate domains do not match the website domains', primaryDomain: 'Primary domain', otherDomains: 'Other domains', diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts index 82f70a2b4..c89c41466 100644 --- a/frontend/src/lang/modules/es-es.ts +++ b/frontend/src/lang/modules/es-es.ts @@ -4725,6 +4725,17 @@ const message = { isEdirWarn: 'Se detectaron cambios en el archivo docker-compose.yml. Revise la comparación.', }, website: { + batchPHP: 'Cambiar versión de PHP', + batchPHPHelper: + 'Solo se modificarán los sitios PHP. Los demás se omitirán. No se admiten entornos PHP locales.', + batchPHPCount: 'Sitios seleccionados: {0}; sitios PHP: {1}; otros: {2}.', + notPHP: 'No es un sitio PHP', + localPHP: 'No se admiten entornos PHP locales', + samePHP: 'Ya utiliza el entorno PHP de destino', + batchPHPResult: 'Resultados', + batchPHPStatus_success: 'Correcto', + batchPHPStatus_failed: 'Error', + batchPHPStatus_skipped: 'Omitido', sslDomainMismatchWebsite: 'Los dominios del certificado no coinciden con los dominios del sitio web', primaryDomain: 'Dominio principal', otherDomains: 'Otros dominios', diff --git a/frontend/src/lang/modules/fa.ts b/frontend/src/lang/modules/fa.ts index f39255cad..e1d62cd2d 100644 --- a/frontend/src/lang/modules/fa.ts +++ b/frontend/src/lang/modules/fa.ts @@ -4594,6 +4594,17 @@ const message = { isEdirWarn: 'تغییرات در docker-compose.yml شناسایی شد. لطفاً تفاوت را بررسی کنید.', }, website: { + batchPHP: 'تغییر نسخه PHP', + batchPHPHelper: + 'فقط سایت‌های PHP تغییر می‌کنند. سایر سایت‌ها نادیده گرفته می‌شوند. محیط‌های PHP محلی پشتیبانی نمی‌شوند.', + batchPHPCount: 'سایت‌های انتخاب‌شده: {0}؛ سایت‌های PHP: {1}؛ سایر: {2}.', + notPHP: 'سایت PHP نیست', + localPHP: 'محیط‌های PHP محلی پشتیبانی نمی‌شوند', + samePHP: 'از قبل از محیط PHP مقصد استفاده می‌کند', + batchPHPResult: 'نتایج', + batchPHPStatus_success: 'موفق', + batchPHPStatus_failed: 'ناموفق', + batchPHPStatus_skipped: 'رد شد', sslDomainMismatchWebsite: 'دامنه‌های گواهی با دامنه‌های وب‌سایت مطابقت ندارند', primaryDomain: 'دامنه اصلی', otherDomains: 'سایر دامنه‌ها', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 2f13a1e02..15240a18e 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -4617,6 +4617,17 @@ const message = { isEdirWarn: 'docker-compose.yml ファイルの変更が検出されました。差分を確認してください。', }, website: { + batchPHP: 'PHP バージョンを切り替え', + batchPHPHelper: + 'PHP サイトのみ変更します。他のサイトはスキップされます。ローカル PHP 環境はサポートされていません。', + batchPHPCount: '選択したサイト: {0}、PHP サイト: {1}、その他: {2}。', + notPHP: 'PHP サイトではありません', + localPHP: 'ローカル PHP 環境はサポートされていません', + samePHP: '既に対象の PHP 環境を使用しています', + batchPHPResult: '処理結果', + batchPHPStatus_success: '成功', + batchPHPStatus_failed: '失敗', + batchPHPStatus_skipped: 'スキップ', sslDomainMismatchWebsite: '証明書のドメインがウェブサイトのドメインと一致しません', primaryDomain: 'プライマリドメイン', otherDomains: '他のドメイン', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index cb2d44190..ba8ff0b13 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -4535,6 +4535,16 @@ const message = { isEdirWarn: 'docker-compose.yml 파일 변경이 감지되었습니다. 차이점을 확인해 주세요.', }, website: { + batchPHP: 'PHP 버전 전환', + batchPHPHelper: 'PHP 웹사이트에만 적용됩니다. 다른 웹사이트는 건너뜁니다. 로컬 PHP 환경은 지원되지 않습니다.', + batchPHPCount: '선택한 웹사이트: {0}, PHP 웹사이트: {1}, 기타: {2}.', + notPHP: 'PHP 웹사이트가 아닙니다', + localPHP: '로컬 PHP 환경은 지원되지 않습니다', + samePHP: '이미 대상 PHP 환경을 사용 중입니다', + batchPHPResult: '처리 결과', + batchPHPStatus_success: '성공', + batchPHPStatus_failed: '실패', + batchPHPStatus_skipped: '건너뜀', sslDomainMismatchWebsite: '인증서 도메인이 웹사이트 도메인과 일치하지 않습니다', primaryDomain: '기본 도메인', otherDomains: '기타 도메인', diff --git a/frontend/src/lang/modules/lo.ts b/frontend/src/lang/modules/lo.ts index eb6c05a57..779b5afdd 100644 --- a/frontend/src/lang/modules/lo.ts +++ b/frontend/src/lang/modules/lo.ts @@ -4497,6 +4497,16 @@ const message = { isEdirWarn: 'ກວດພົບການປ່ຽນແປງໃນ docker-compose.yml. ກະລຸນາກວດສອບຄວາມແຕກຕ່າງ.', }, website: { + batchPHP: 'ປ່ຽນເວີຊັນ PHP', + batchPHPHelper: 'ປ່ຽນແປງສະເພາະເວັບໄຊ PHP. ເວັບໄຊອື່ນຈະຖືກຂ້າມ. ບໍ່ຮອງຮັບສະພາບແວດລ້ອມ PHP ພາຍໃນເຄື່ອງ.', + batchPHPCount: 'ເວັບໄຊທີ່ເລືອກ: {0}; ເວັບໄຊ PHP: {1}; ອື່ນໆ: {2}.', + notPHP: 'ບໍ່ແມ່ນເວັບໄຊ PHP', + localPHP: 'ບໍ່ຮອງຮັບສະພາບແວດລ້ອມ PHP ພາຍໃນເຄື່ອງ', + samePHP: 'ກຳລັງໃຊ້ສະພາບແວດລ້ອມ PHP ເປົ້າໝາຍແລ້ວ', + batchPHPResult: 'ຜົນການດຳເນີນງານ', + batchPHPStatus_success: 'ສຳເລັດ', + batchPHPStatus_failed: 'ລົ້ມເຫຼວ', + batchPHPStatus_skipped: 'ຂ້າມແລ້ວ', sslDomainMismatchWebsite: 'ໂດເມນຂອງໃບຢັ້ງຢືນບໍ່ກົງກັບໂດເມນຂອງເວັບໄຊ', primaryDomain: 'ໂດເມນຫຼັກ', otherDomains: 'ໂດເມນອື່ນໆ', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index b8a2a4b9b..e7c28d023 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -4708,6 +4708,17 @@ const message = { isEdirWarn: 'Perubahan pada fail docker-compose.yml telah dikesan. Sila semak perbezaannya.', }, website: { + batchPHP: 'Tukar versi PHP', + batchPHPHelper: + 'Hanya laman PHP akan diubah. Laman lain akan dilangkau. Persekitaran PHP setempat tidak disokong.', + batchPHPCount: 'Laman dipilih: {0}; laman PHP: {1}; lain-lain: {2}.', + notPHP: 'Bukan laman PHP', + localPHP: 'Persekitaran PHP setempat tidak disokong', + samePHP: 'Sudah menggunakan persekitaran PHP sasaran', + batchPHPResult: 'Keputusan', + batchPHPStatus_success: 'Berjaya', + batchPHPStatus_failed: 'Gagal', + batchPHPStatus_skipped: 'Dilangkau', sslDomainMismatchWebsite: 'Domain sijil tidak sepadan dengan domain laman web', primaryDomain: 'Domain Utama', otherDomains: 'Domain Lain', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index f164577a7..9ad6d568e 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -4731,6 +4731,17 @@ const message = { isEdirWarn: 'Foram detectadas alterações no arquivo docker-compose.yml. Revise a comparação.', }, website: { + batchPHP: 'Alterar versão do PHP', + batchPHPHelper: + 'Somente sites PHP serão alterados. Os demais serão ignorados. Ambientes PHP locais não são compatíveis.', + batchPHPCount: 'Sites selecionados: {0}; sites PHP: {1}; outros: {2}.', + notPHP: 'Não é um site PHP', + localPHP: 'Ambientes PHP locais não são compatíveis', + samePHP: 'Já utiliza o ambiente PHP de destino', + batchPHPResult: 'Resultados', + batchPHPStatus_success: 'Sucesso', + batchPHPStatus_failed: 'Falha', + batchPHPStatus_skipped: 'Ignorado', sslDomainMismatchWebsite: 'Os domínios do certificado não correspondem aos domínios do site', primaryDomain: 'Domínio principal', otherDomains: 'Outros domínios', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 3cb71e75e..e9c2613a6 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -4702,6 +4702,17 @@ const message = { isEdirWarn: 'Обнаружены изменения в файле docker-compose.yml. Проверьте различия.', }, website: { + batchPHP: 'Переключить версию PHP', + batchPHPHelper: + 'Изменения применяются только к сайтам PHP. Остальные сайты будут пропущены. Локальные окружения PHP не поддерживаются.', + batchPHPCount: 'Выбрано сайтов: {0}; сайтов PHP: {1}; остальных: {2}.', + notPHP: 'Не является сайтом PHP', + localPHP: 'Локальные окружения PHP не поддерживаются', + samePHP: 'Уже используется целевое окружение PHP', + batchPHPResult: 'Результаты', + batchPHPStatus_success: 'Успешно', + batchPHPStatus_failed: 'Ошибка', + batchPHPStatus_skipped: 'Пропущено', sslDomainMismatchWebsite: 'Домены сертификата не соответствуют доменам сайта', primaryDomain: 'Основной домен', otherDomains: 'Другие домены', diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index f8852d022..757aa30a3 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -4709,6 +4709,16 @@ const message = { isEdirWarn: 'docker-compose.yml dosyasında değişiklikler algılandı. Lütfen farkları inceleyin.', }, website: { + batchPHP: 'PHP sürümünü değiştir', + batchPHPHelper: 'Yalnızca PHP siteleri değiştirilir. Diğer siteler atlanır. Yerel PHP ortamları desteklenmez.', + batchPHPCount: 'Seçilen siteler: {0}; PHP siteleri: {1}; diğerleri: {2}.', + notPHP: 'PHP sitesi değil', + localPHP: 'Yerel PHP ortamları desteklenmez', + samePHP: 'Hedef PHP ortamı zaten kullanılıyor', + batchPHPResult: 'Sonuçlar', + batchPHPStatus_success: 'Başarılı', + batchPHPStatus_failed: 'Başarısız', + batchPHPStatus_skipped: 'Atlandı', sslDomainMismatchWebsite: 'Sertifika alan adları web sitesinin alan adlarıyla eşleşmiyor', primaryDomain: 'Birincil alan adı', otherDomains: 'Diğer alan adları', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index 94cb756b1..f548aba49 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -4295,6 +4295,16 @@ const message = { isEdirWarn: '偵測到 docker-compose.yml 檔案被修改,請檢視對比', }, website: { + batchPHP: '切換 PHP 版本', + batchPHPHelper: '僅對 PHP 網站生效,其他網站自動略過。不支援本機 PHP 環境。', + batchPHPCount: '已選擇 {0} 個網站,其中 PHP 網站 {1} 個,其他 {2} 個。', + notPHP: '非 PHP 網站', + localPHP: '不支援本機 PHP 環境', + samePHP: '已使用目標 PHP 環境', + batchPHPResult: '處理結果', + batchPHPStatus_success: '成功', + batchPHPStatus_failed: '失敗', + batchPHPStatus_skipped: '略過', sslDomainMismatchWebsite: '憑證網域與網站網域不相符', primaryDomain: '主域名', otherDomains: '其他域名', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index c71547135..3692b9f3c 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -4329,6 +4329,16 @@ const message = { isEdirWarn: '检测到 docker-compose.yml 文件被修改,请查看对比', }, website: { + batchPHP: '切换 PHP 版本', + batchPHPHelper: '仅对 PHP 网站生效,其他网站自动跳过。不支持本地 PHP 环境。', + batchPHPCount: '已选择 {0} 个网站,其中 PHP 网站 {1} 个,其他 {2} 个。', + notPHP: '非 PHP 网站', + localPHP: '不支持本地 PHP 环境', + samePHP: '已使用目标 PHP 环境', + batchPHPResult: '处理结果', + batchPHPStatus_success: '成功', + batchPHPStatus_failed: '失败', + batchPHPStatus_skipped: '跳过', sslDomainMismatchWebsite: '证书域名与网站域名不匹配', primaryDomain: '主域名', otherDomains: '其他域名', diff --git a/frontend/src/views/website/website/batch-op/php.vue b/frontend/src/views/website/website/batch-op/php.vue new file mode 100644 index 000000000..21b97906d --- /dev/null +++ b/frontend/src/views/website/website/batch-op/php.vue @@ -0,0 +1,116 @@ + + diff --git a/frontend/src/views/website/website/index.vue b/frontend/src/views/website/website/index.vue index eb27823b2..cb38cf546 100644 --- a/frontend/src/views/website/website/index.vue +++ b/frontend/src/views/website/website/index.vue @@ -32,16 +32,17 @@