mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-11-20 00:01:06 +00:00
feat(website): added a feature for bulk-clearing reverse proxy cache
This commit is contained in:
@@ -2,17 +2,35 @@ package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/agent/app/dto/request"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/model"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/repo"
|
||||
"github.com/1Panel-dev/1Panel/agent/app/task"
|
||||
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||
"github.com/1Panel-dev/1Panel/agent/i18n"
|
||||
"sort"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func (w WebsiteService) BatchOpWebsite(req request.BatchWebsiteOp) error {
|
||||
websites, _ := websiteRepo.List(repo.WithByIDs(req.IDs))
|
||||
if req.Operate == "clearProxyCache" {
|
||||
opTask, err := task.NewTaskWithOps(i18n.GetMsgByKey("ProxyCacheClear"), task.TaskBatch, task.TaskScopeWebsite, req.TaskID, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
opTask.AddSubTask("", func(t *task.Task) error {
|
||||
return batchClearProxyCache(t, req.IDs)
|
||||
}, nil)
|
||||
go func() { _ = opTask.Execute() }()
|
||||
return nil
|
||||
}
|
||||
websites, err := websiteRepo.List(repo.WithByIDs(req.IDs))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
opTask, err := task.NewTaskWithOps(i18n.GetMsgByKey("Status"), task.TaskBatch, task.TaskScopeWebsite, req.TaskID, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -57,8 +75,66 @@ func (w WebsiteService) BatchOpWebsite(req request.BatchWebsiteOp) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func batchClearProxyCache(t *task.Task, ids []uint) error {
|
||||
websites, err := websiteRepo.GetBy(repo.WithByIDs(ids))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// A nil entry is a requested website that no longer exists.
|
||||
pending := make(map[uint]*model.Website, len(ids))
|
||||
for _, id := range ids {
|
||||
pending[id] = nil
|
||||
}
|
||||
for i := range websites {
|
||||
pending[websites[i].ID] = &websites[i]
|
||||
}
|
||||
|
||||
sitesDir := GetSiteDir("")
|
||||
var cleared, skipped, failed int
|
||||
var needsReload bool
|
||||
for _, id := range ids {
|
||||
web, ok := pending[id]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
delete(pending, id)
|
||||
if web == nil {
|
||||
t.LogFailedWithErr(fmt.Sprintf("ID %d", id), gorm.ErrRecordNotFound)
|
||||
failed++
|
||||
continue
|
||||
}
|
||||
changed, err := cleanWebsiteProxyCache(sitesDir, web.Alias)
|
||||
needsReload = needsReload || changed
|
||||
switch {
|
||||
case err != nil:
|
||||
t.LogFailedWithErr(web.PrimaryDomain, err)
|
||||
failed++
|
||||
case changed:
|
||||
t.LogSuccess(web.PrimaryDomain)
|
||||
cleared++
|
||||
default:
|
||||
t.Log(web.PrimaryDomain + " · " + i18n.GetMsgByKey("ProxyCacheEmpty"))
|
||||
skipped++
|
||||
}
|
||||
}
|
||||
summary := i18n.GetMsgWithMap("ProxyCacheSummary", map[string]interface{}{"cleared": cleared, "skipped": skipped, "failed": failed})
|
||||
t.Log(summary)
|
||||
if needsReload {
|
||||
if err := reloadProxyCacheNginx(); err != nil {
|
||||
return fmt.Errorf("%s: %w", i18n.GetMsgByKey("ProxyCacheReloadFailed"), err)
|
||||
}
|
||||
}
|
||||
if failed > 0 {
|
||||
return errors.New(summary)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w WebsiteService) BatchSetGroup(req request.BatchWebsiteGroup) error {
|
||||
websites, _ := websiteRepo.List(repo.WithByIDs(req.IDs))
|
||||
websites, err := websiteRepo.List(repo.WithByIDs(req.IDs))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, web := range websites {
|
||||
web.WebsiteGroupID = req.GroupID
|
||||
if err := websiteRepo.Save(context.Background(), &web); err != nil {
|
||||
@@ -69,7 +145,10 @@ func (w WebsiteService) BatchSetGroup(req request.BatchWebsiteGroup) error {
|
||||
}
|
||||
|
||||
func (w WebsiteService) BatchSetHttps(ctx context.Context, req request.BatchWebsiteHttps) error {
|
||||
websites, _ := websiteRepo.List(repo.WithByIDs(req.IDs))
|
||||
websites, err := websiteRepo.List(repo.WithByIDs(req.IDs))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
opTask, err := task.NewTaskWithOps(i18n.GetMsgByKey("SSL"), task.TaskBatch, task.TaskScopeWebsite, req.TaskID, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -460,13 +460,33 @@ func (w WebsiteService) ClearProxyCache(req request.NginxCommonReq) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cacheDir := GetSitePath(website, SiteCacheDir)
|
||||
fileOp := files.NewFileOp()
|
||||
if fileOp.Stat(cacheDir) {
|
||||
if err = fileOp.CleanDir(cacheDir); err != nil {
|
||||
return err
|
||||
if _, err := cleanWebsiteProxyCache(GetSiteDir(""), website.Alias); err != nil {
|
||||
return err
|
||||
}
|
||||
return reloadProxyCacheNginx()
|
||||
}
|
||||
|
||||
func cleanWebsiteProxyCache(sitesDir, alias string) (bool, error) {
|
||||
if alias == "" || alias == "." || alias == ".." || filepath.Base(alias) != alias {
|
||||
return false, fmt.Errorf("invalid website alias %q", alias)
|
||||
}
|
||||
cacheDir := filepath.Join(sitesDir, alias, "cache")
|
||||
for _, dir := range []string{filepath.Dir(cacheDir), cacheDir} {
|
||||
info, err := os.Lstat(dir)
|
||||
if os.IsNotExist(err) {
|
||||
return false, nil
|
||||
}
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if !info.IsDir() {
|
||||
return false, fmt.Errorf("%s is not a directory", dir)
|
||||
}
|
||||
}
|
||||
return files.NewFileOp().CleanDir(cacheDir)
|
||||
}
|
||||
|
||||
func reloadProxyCacheNginx() error {
|
||||
nginxInstall, err := getAppInstallByKey(constant.AppOpenresty)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "To check for image updates in the current runtime e
|
||||
ErrPHPExtensionsConflict: "A PHP extension template with this name exists with different content"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "The model and tokenizer directories must be different, and neither can contain the other"
|
||||
|
||||
ProxyCacheClear: "Clear reverse proxy caches"
|
||||
ProxyCacheEmpty: "Nothing to clear"
|
||||
ProxyCacheSummary: "Cleared {{ .cleared }}, nothing to clear {{ .skipped }}, failed {{ .failed }}"
|
||||
ProxyCacheReloadFailed: "Caches cleared, OpenResty reload failed"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "Para comprobar actualizaciones de imágenes en el e
|
||||
ErrPHPExtensionsConflict: "Ya existe una plantilla de extensiones PHP con este nombre y contenido diferente; no se ha sobrescrito"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "Los directorios de modelos y tokenizadores deben ser distintos y ninguno puede contener al otro"
|
||||
|
||||
ProxyCacheClear: "Vaciar la caché del proxy inverso"
|
||||
ProxyCacheEmpty: "Nada que vaciar"
|
||||
ProxyCacheSummary: "Sitios con caché vaciada: {{ .cleared }}. Sin caché que vaciar: {{ .skipped }}. Con errores: {{ .failed }}."
|
||||
ProxyCacheReloadFailed: "Se ha vaciado la caché, pero no se ha podido recargar OpenResty"
|
||||
|
||||
@@ -821,3 +821,8 @@ ErrImageCheckProxyRequired: "برای بررسی بهروزرسانی تصا
|
||||
ErrPHPExtensionsConflict: "قالب افزونه PHP با این نام و محتوای متفاوت از قبل وجود دارد؛ بازنویسی نشد"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "پوشههای مدل و توکنساز باید متفاوت باشند و هیچکدام نباید درون دیگری قرار گیرد"
|
||||
|
||||
ProxyCacheClear: "پاکسازی کش پراکسی معکوس"
|
||||
ProxyCacheEmpty: "چیزی برای پاکسازی وجود ندارد"
|
||||
ProxyCacheSummary: "پاکشده: {{ .cleared }}، بدون نیاز به پاکسازی: {{ .skipped }}، ناموفق: {{ .failed }}"
|
||||
ProxyCacheReloadFailed: "کش پاک شد، اما بارگذاری مجدد OpenResty ناموفق بود"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "現在の実行環境でイメージの更新を確
|
||||
ErrPHPExtensionsConflict: "同じ名前で内容が異なる PHP 拡張機能テンプレートが既に存在するため、上書きしませんでした"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "モデルとトークナイザーのディレクトリは別々にし、一方が他方を含まないようにしてください"
|
||||
|
||||
ProxyCacheClear: "リバースプロキシキャッシュを消去"
|
||||
ProxyCacheEmpty: "消去するキャッシュはありません"
|
||||
ProxyCacheSummary: "消去済み {{ .cleared }} 件、消去不要 {{ .skipped }} 件、失敗 {{ .failed }} 件"
|
||||
ProxyCacheReloadFailed: "キャッシュは消去されましたが、OpenResty の再読み込みに失敗しました"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "현재 실행 환경에서 이미지 업데이트
|
||||
ErrPHPExtensionsConflict: "같은 이름에 내용이 다른 PHP 확장 템플릿이 이미 있어 덮어쓰지 않았습니다"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "모델 디렉터리와 토크나이저 디렉터리는 서로 달라야 하며 서로 포함할 수 없습니다"
|
||||
|
||||
ProxyCacheClear: "리버스 프록시 캐시 비우기"
|
||||
ProxyCacheEmpty: "비울 캐시 없음"
|
||||
ProxyCacheSummary: "완료 {{ .cleared }}개, 비울 캐시 없음 {{ .skipped }}개, 실패 {{ .failed }}개"
|
||||
ProxyCacheReloadFailed: "캐시는 비웠지만 OpenResty를 다시 로드하지 못했습니다"
|
||||
|
||||
@@ -811,3 +811,8 @@ ErrImageCheckProxyRequired: "ເພື່ອກວດສອບການອັບ
|
||||
ErrPHPExtensionsConflict: "ມີແມ່ແບບສ່ວນຂະຫຍາຍ PHP ຊື່ນີ້ຢູ່ແລ້ວແຕ່ເນື້ອຫາຕ່າງກັນ; ບໍ່ໄດ້ຂຽນທັບ"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "ໂຟນເດີໂມເດວ ແລະ tokenizer ຕ້ອງແຕກຕ່າງກັນ ແລະ ບໍ່ສາມາດຢູ່ພາຍໃນກັນໄດ້"
|
||||
|
||||
ProxyCacheClear: "ລ້າງແຄຊ reverse proxy"
|
||||
ProxyCacheEmpty: "ບໍ່ມີແຄຊທີ່ຕ້ອງລ້າງ"
|
||||
ProxyCacheSummary: "ລ້າງແລ້ວ {{ .cleared }}, ບໍ່ມີແຄຊທີ່ຕ້ອງລ້າງ {{ .skipped }}, ລົ້ມເຫຼວ {{ .failed }}"
|
||||
ProxyCacheReloadFailed: "ລ້າງແຄຊແລ້ວ ແຕ່ໂຫຼດ OpenResty ຄືນໃໝ່ບໍ່ສຳເລັດ"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "Untuk menyemak kemas kini imej dalam persekitaran s
|
||||
ErrPHPExtensionsConflict: "Templat sambungan PHP dengan nama ini sudah wujud tetapi kandungannya berbeza; tidak ditulis ganti"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "Direktori model dan tokenizer mestilah berbeza dan tidak boleh mengandungi satu sama lain"
|
||||
|
||||
ProxyCacheClear: "Kosongkan cache proksi terbalik"
|
||||
ProxyCacheEmpty: "Tiada cache untuk dikosongkan"
|
||||
ProxyCacheSummary: "Dikosongkan: {{ .cleared }}, tiada cache untuk dikosongkan: {{ .skipped }}, gagal: {{ .failed }}"
|
||||
ProxyCacheReloadFailed: "Cache telah dikosongkan, tetapi OpenResty gagal dimuat semula"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "Para verificar atualizações de imagens no ambient
|
||||
ErrPHPExtensionsConflict: "Já existe um modelo de extensões PHP com este nome e conteúdo diferente; ele não foi sobrescrito"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "Os diretórios de modelos e tokenizadores devem ser diferentes e nenhum pode conter o outro"
|
||||
|
||||
ProxyCacheClear: "Limpar cache do proxy reverso"
|
||||
ProxyCacheEmpty: "Nenhum cache para limpar"
|
||||
ProxyCacheSummary: "Sites com cache limpo: {{ .cleared }}. Sem cache para limpar: {{ .skipped }}. Com falha: {{ .failed }}."
|
||||
ProxyCacheReloadFailed: "O cache foi limpo, mas houve uma falha ao recarregar o OpenResty"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "Для проверки обновлений обр
|
||||
ErrPHPExtensionsConflict: "Шаблон расширений PHP с таким именем уже существует и имеет другое содержимое; перезапись не выполнена"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "Каталоги моделей и токенизаторов должны различаться и не могут быть вложены друг в друга"
|
||||
|
||||
ProxyCacheClear: "Очистить кэш обратного прокси"
|
||||
ProxyCacheEmpty: "Кэш пуст"
|
||||
ProxyCacheSummary: "Кэш очищен: {{ .cleared }}, кэш пуст: {{ .skipped }}, ошибок: {{ .failed }}"
|
||||
ProxyCacheReloadFailed: "Кэш очищен, но не удалось перезагрузить конфигурацию OpenResty"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "Geçerli çalışma ortamında imaj güncellemeleri
|
||||
ErrPHPExtensionsConflict: "Bu ada sahip ancak içeriği farklı bir PHP uzantı şablonu zaten mevcut; üzerine yazılmadı"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "Model ve tokenizer dizinleri farklı olmalı ve biri diğerini içermemelidir"
|
||||
|
||||
ProxyCacheClear: "Ters vekil önbelleğini temizle"
|
||||
ProxyCacheEmpty: "Temizlenecek önbellek yok"
|
||||
ProxyCacheSummary: "Temizlenen: {{ .cleared }}, temizlenecek önbelleği olmayan: {{ .skipped }}, başarısız: {{ .failed }}"
|
||||
ProxyCacheReloadFailed: "Önbellek temizlendi ancak OpenResty yeniden yüklenemedi"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "目前運行環境下,如需檢查映像是否更
|
||||
ErrPHPExtensionsConflict: "同名 PHP 擴充模版已存在且內容不同,未覆蓋"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "模型目錄和分詞器目錄不能相同或互相包含"
|
||||
|
||||
ProxyCacheClear: "清空反代快取"
|
||||
ProxyCacheEmpty: "無需清理"
|
||||
ProxyCacheSummary: "已清空 {{ .cleared }} 個,無需清理 {{ .skipped }} 個,失敗 {{ .failed }} 個"
|
||||
ProxyCacheReloadFailed: "快取已清空,OpenResty 重新載入失敗"
|
||||
|
||||
@@ -820,3 +820,8 @@ ErrImageCheckProxyRequired: "当前运行环境下,如需检查镜像是否更
|
||||
ErrPHPExtensionsConflict: "同名 PHP 扩展模版已存在且内容不同,未覆盖"
|
||||
|
||||
ErrModelTokenizerDirOverlap: "模型目录和分词器目录不能相同或互相包含"
|
||||
|
||||
ProxyCacheClear: "清空反代缓存"
|
||||
ProxyCacheEmpty: "无需清理"
|
||||
ProxyCacheSummary: "已清空 {{ .cleared }} 个,无需清理 {{ .skipped }} 个,失败 {{ .failed }} 个"
|
||||
ProxyCacheReloadFailed: "缓存已清空,OpenResty 重载失败"
|
||||
|
||||
@@ -181,20 +181,26 @@ func (f FileOp) DeleteFile(dst string) error {
|
||||
return f.Fs.Remove(dst)
|
||||
}
|
||||
|
||||
func (f FileOp) CleanDir(dst string) error {
|
||||
// CleanDir reports whether any entry was removed, including on partial failure.
|
||||
func (f FileOp) CleanDir(dst string) (bool, error) {
|
||||
if IsProtected(dst) {
|
||||
return buserr.New("ErrPathNotDelete")
|
||||
return false, buserr.New("ErrPathNotDelete")
|
||||
}
|
||||
items, err := afero.ReadDir(f.Fs, dst)
|
||||
dir, err := f.Fs.Open(dst)
|
||||
if err != nil {
|
||||
return err
|
||||
return false, err
|
||||
}
|
||||
for _, item := range items {
|
||||
if err := f.Fs.RemoveAll(filepath.Join(dst, item.Name())); err != nil {
|
||||
return err
|
||||
defer dir.Close()
|
||||
names, err := dir.Readdirnames(-1)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
for i, name := range names {
|
||||
if err := f.Fs.RemoveAll(filepath.Join(dst, name)); err != nil {
|
||||
return i > 0, err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
return len(names) > 0, nil
|
||||
}
|
||||
|
||||
func (f FileOp) RmRf(dst string) error {
|
||||
|
||||
@@ -17,11 +17,19 @@
|
||||
</div>
|
||||
</el-alert>
|
||||
<slot name="content"></slot>
|
||||
<ul v-for="(item, index) in form.names" :key="index">
|
||||
<ul v-for="(item, index) in visibleNames" :key="index">
|
||||
<div class="dialog-object-name">
|
||||
<li>{{ item }}</li>
|
||||
</div>
|
||||
</ul>
|
||||
<el-button
|
||||
v-if="visibleNames.length < form.names.length"
|
||||
link
|
||||
type="primary"
|
||||
@click="expanded = true"
|
||||
>
|
||||
{{ $t('commons.button.showAll') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -31,7 +39,7 @@
|
||||
{{ $t('commons.button.cancel') }}
|
||||
</el-button>
|
||||
<el-button type="primary" @click="onConfirm" :disabled="loading">
|
||||
{{ $t('commons.button.confirm') }}
|
||||
{{ form.confirmText || $t('commons.button.confirm') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
@@ -45,23 +53,31 @@ import DrawerPro from '@/components/drawer-pro/index.vue';
|
||||
withDefaults(defineProps<{ drawer?: boolean }>(), { drawer: false });
|
||||
import i18n from '@/lang';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { reactive, ref } from 'vue';
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
|
||||
defineOptions({ name: 'OpDialog' });
|
||||
|
||||
const form = reactive({
|
||||
confirmText: '',
|
||||
nameLimit: 0,
|
||||
msgs: [],
|
||||
title: '',
|
||||
names: [],
|
||||
api: null as Function,
|
||||
params: {},
|
||||
});
|
||||
const expanded = ref(false);
|
||||
const visibleNames = computed(() =>
|
||||
form.nameLimit && !expanded.value ? form.names.slice(0, form.nameLimit) : form.names,
|
||||
);
|
||||
const loading = ref();
|
||||
const open = ref();
|
||||
const successMsg = ref('');
|
||||
const noMsg = ref(false);
|
||||
|
||||
interface DialogProps {
|
||||
confirmText?: string;
|
||||
nameLimit?: number;
|
||||
title: string;
|
||||
msg: string;
|
||||
names: Array<string>;
|
||||
@@ -72,6 +88,9 @@ interface DialogProps {
|
||||
noMsg: boolean;
|
||||
}
|
||||
const acceptParams = (props: DialogProps): void => {
|
||||
expanded.value = false;
|
||||
form.nameLimit = props.nameLimit ?? 0;
|
||||
form.confirmText = props.confirmText ?? '';
|
||||
form.title = props.title;
|
||||
form.names = props.names;
|
||||
form.msgs = props.msg.split('\n');
|
||||
|
||||
@@ -5064,6 +5064,8 @@ const message = {
|
||||
status: 'Current Status',
|
||||
configResource: 'Configuration',
|
||||
saveAndReload: 'Save and reload',
|
||||
batchClearProxyCacheWarn:
|
||||
'Clear the reverse proxy caches of {0} selected websites? The next request for previously cached content will reach the origin server.',
|
||||
clearProxyCache: 'Clean reverse proxy cache',
|
||||
clearProxyCacheWarn: 'This action will delete all files in the cache directory. Continue?',
|
||||
create: 'Add a new module',
|
||||
|
||||
@@ -5138,6 +5138,8 @@ const message = {
|
||||
status: 'Estado actual',
|
||||
configResource: 'Configuración',
|
||||
saveAndReload: 'Guardar y recargar',
|
||||
batchClearProxyCacheWarn:
|
||||
'¿Quieres vaciar la caché del proxy inverso de los {0} sitios seleccionados? La próxima solicitud de contenido que estaba en caché llegará al servidor de origen.',
|
||||
clearProxyCache: 'Limpiar caché de proxy inverso',
|
||||
clearProxyCacheWarn: 'Esta acción eliminará todos los archivos en el directorio de caché. ¿Deseas continuar?',
|
||||
create: 'Agregar nuevo módulo',
|
||||
|
||||
@@ -5021,6 +5021,8 @@ const message = {
|
||||
status: 'وضعیت فعلی',
|
||||
configResource: 'پیکربندی',
|
||||
saveAndReload: 'ذخیره و بارگذاری مجدد',
|
||||
batchClearProxyCacheWarn:
|
||||
'کش پراکسی معکوس برای {0} وبسایت انتخابشده پاک شود؟ درخواست بعدی برای محتوایی که قبلاً در کش بوده به سرور مبدأ ارسال میشود.',
|
||||
clearProxyCache: 'پاکسازی کش پراکسی معکوس',
|
||||
clearProxyCacheWarn: 'این عمل همه فایلهای موجود در دایرکتوری کش را حذف میکند. ادامه میدهید؟',
|
||||
create: 'افزودن یک ماژول جدید',
|
||||
|
||||
@@ -5045,6 +5045,8 @@ const message = {
|
||||
status: '現在のステータス',
|
||||
configResource: '構成',
|
||||
saveAndReload: '保存してリロードします',
|
||||
batchClearProxyCacheWarn:
|
||||
'選択した {0} 件のサイトのリバースプロキシキャッシュを消去しますか? キャッシュされていたコンテンツへの次のリクエストはオリジンサーバーに送られます。',
|
||||
clearProxyCache: '逆プロキシキャッシュをきれいにします',
|
||||
clearProxyCacheWarn:
|
||||
'キャッシュで構成されたすべてのWebサイトが影響を受け、「OpenResty」が再起動されます。続けたいですか?',
|
||||
|
||||
@@ -4955,6 +4955,8 @@ const message = {
|
||||
status: '현재 상태',
|
||||
configResource: '구성',
|
||||
saveAndReload: '저장 및 다시 로드',
|
||||
batchClearProxyCacheWarn:
|
||||
'선택한 웹사이트 {0}개의 리버스 프록시 캐시를 비울까요? 캐시되어 있던 콘텐츠에 대한 다음 요청은 원본 서버로 전달됩니다.',
|
||||
clearProxyCache: '리버스 프록시 캐시 삭제',
|
||||
clearProxyCacheWarn:
|
||||
'캐시가 구성된 모든 웹사이트에 영향을 미치며 OpenResty 가 다시 시작됩니다. 계속하시겠습니까?',
|
||||
|
||||
@@ -4915,6 +4915,8 @@ const message = {
|
||||
status: 'ສະຖານະປະຈຸບັນ',
|
||||
configResource: 'ການຕັ້ງຄ່າ',
|
||||
saveAndReload: 'ບັນທຶກ ແລະ ໂຫຼດໃໝ່',
|
||||
batchClearProxyCacheWarn:
|
||||
'ລ້າງແຄຊ reverse proxy ຂອງ {0} ເວັບໄຊທີ່ເລືອກບໍ? ຄຳຂໍຄັ້ງຕໍ່ໄປສຳລັບເນື້ອຫາທີ່ເຄີຍຢູ່ໃນແຄຊຈະຖືກສົ່ງໄປຫາເຊີບເວີຕົ້ນທາງ.',
|
||||
clearProxyCache: 'ລ້າງແຄຊ reverse proxy',
|
||||
clearProxyCacheWarn: 'ການດຳເນີນການນີ້ຈະລຶບໄຟລ໌ທັງໝົດໃນໂຟນເດີແຄຊ. ຕ້ອງການຕໍ່ຫຼືບໍ່?',
|
||||
create: 'ເພີ່ມໂມດູນໃໝ່',
|
||||
|
||||
@@ -5140,6 +5140,8 @@ const message = {
|
||||
status: 'Status Semasa',
|
||||
configResource: 'Konfigurasi',
|
||||
saveAndReload: 'Simpan dan muat semula',
|
||||
batchClearProxyCacheWarn:
|
||||
'Kosongkan cache proksi terbalik untuk {0} laman web yang dipilih? Permintaan seterusnya untuk kandungan yang sebelum ini dicache akan dihantar ke pelayan asal.',
|
||||
clearProxyCache: 'Bersihkan cache proksi terbalik',
|
||||
clearProxyCacheWarn:
|
||||
'Semua laman web yang dikonfigurasi dengan cache akan terjejas dan "OpenResty" akan dimulakan semula. Adakah anda mahu meneruskan?',
|
||||
|
||||
@@ -5167,6 +5167,8 @@ const message = {
|
||||
status: 'Status atual',
|
||||
configResource: 'Configuração',
|
||||
saveAndReload: 'Salvar e recarregar',
|
||||
batchClearProxyCacheWarn:
|
||||
'Limpar o cache do proxy reverso dos {0} sites selecionados? A próxima solicitação de conteúdo que estava em cache será enviada ao servidor de origem.',
|
||||
clearProxyCache: 'Limpar cache do proxy reverso',
|
||||
clearProxyCacheWarn:
|
||||
'Todos os sites com cache configurado serão afetados e o "OpenResty" será reiniciado. Deseja continuar?',
|
||||
|
||||
@@ -5135,6 +5135,8 @@ const message = {
|
||||
status: 'Текущий статус',
|
||||
configResource: 'Конфигурация',
|
||||
saveAndReload: 'Сохранить и перезагрузить',
|
||||
batchClearProxyCacheWarn:
|
||||
'Очистить кэш обратного прокси для выбранных сайтов ({0})? Следующий запрос к ранее кэшированному содержимому будет отправлен на исходный сервер.',
|
||||
clearProxyCache: 'Очистить кэш обратного прокси',
|
||||
clearProxyCacheWarn:
|
||||
'Это повлияет на все веб-сайты с настроенным кэшем и перезапустит "OpenResty". Хотите продолжить?',
|
||||
|
||||
@@ -5145,6 +5145,8 @@ const message = {
|
||||
status: 'Geçerli Durum',
|
||||
configResource: 'Yapılandırma',
|
||||
saveAndReload: 'Kaydet ve yeniden yükle',
|
||||
batchClearProxyCacheWarn:
|
||||
'Seçilen {0} web sitesinin ters vekil önbelleği temizlensin mi? Daha önce önbelleğe alınmış içerik için bir sonraki istek kaynak sunucuya gönderilir.',
|
||||
clearProxyCache: 'Ters vekil önbelleğini temizle',
|
||||
clearProxyCacheWarn: 'Bu işlem önbellek dizinindeki tüm dosyaları silecektir. Devam etmek istiyor musunuz?',
|
||||
create: 'Yeni bir modül ekle',
|
||||
|
||||
@@ -4701,6 +4701,7 @@ const message = {
|
||||
status: '當前狀態',
|
||||
configResource: '設定修改',
|
||||
saveAndReload: '儲存並重載',
|
||||
batchClearProxyCacheWarn: '將清空所選 {0} 個網站的反代快取。首次存取原已快取的內容時會重新請求來源站。',
|
||||
clearProxyCache: '清除反代快取',
|
||||
clearProxyCacheWarn: '此操作將刪除快取目錄下的所有檔案,是否繼續?',
|
||||
create: '新增模組',
|
||||
|
||||
@@ -4739,7 +4739,8 @@ const message = {
|
||||
status: '当前状态',
|
||||
configResource: '配置修改',
|
||||
saveAndReload: '保存并重载',
|
||||
clearProxyCache: '清除反代缓存',
|
||||
batchClearProxyCacheWarn: '将清空所选 {0} 个网站的反代缓存。首次访问原已缓存的内容时会重新请求源站。',
|
||||
clearProxyCache: '清空反代缓存',
|
||||
clearProxyCacheWarn: '此操作将删除缓存目录下的所有文件, 是否继续?',
|
||||
create: '新增模块',
|
||||
update: '编辑模块',
|
||||
|
||||
@@ -294,6 +294,7 @@
|
||||
:label="$t('commons.button.set') + $t('website.ssl')"
|
||||
value="setHttps"
|
||||
></el-option>
|
||||
<el-option :label="$t('nginx.clearProxyCache')" value="clearProxyCache" />
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -729,11 +730,18 @@ const batchOp = () => {
|
||||
batchReq.ids = selects.value.map((item) => item.id);
|
||||
const taskID = newUUID();
|
||||
batchReq.taskID = taskID;
|
||||
const clearCache = batchReq.operate === 'clearProxyCache';
|
||||
opRef.value.acceptParams({
|
||||
names: names,
|
||||
title: i18n.global.t('website.batchOperate'),
|
||||
nameLimit: clearCache ? 5 : 0,
|
||||
confirmText: clearCache ? i18n.global.t('nginx.clearProxyCache') : undefined,
|
||||
title: i18n.global.t(clearCache ? 'nginx.clearProxyCache' : 'website.batchOperate'),
|
||||
api: batchOperate,
|
||||
msg: i18n.global.t('website.batchOperateHelper', [i18n.global.t('commons.button.' + batchReq.operate)]),
|
||||
msg: clearCache
|
||||
? i18n.global.t('nginx.batchClearProxyCacheWarn', [names.length])
|
||||
: i18n.global.t('website.batchOperateHelper', [
|
||||
i18n.global.t('commons.button.' + batchReq.operate),
|
||||
]),
|
||||
params: batchReq,
|
||||
noMsg: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user