mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-26 09:22:50 +08:00
style: Optimize batch delete website (#10853)
Refs https://github.com/1Panel-dev/1Panel/issues/10851
This commit is contained in:
parent
36c4fbfeee
commit
6982396572
12 changed files with 29 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ import (
|
|||
"path"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
|
@ -539,6 +540,15 @@ func (w WebsiteService) BatchOpWebsite(req request.BatchWebsiteOp) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sort.SliceStable(websites, func(i, j int) bool {
|
||||
if websites[i].Type == constant.Subsite && websites[j].Type != constant.Subsite {
|
||||
return true
|
||||
}
|
||||
if websites[i].Type != constant.Subsite && websites[j].Type == constant.Subsite {
|
||||
return false
|
||||
}
|
||||
return false
|
||||
})
|
||||
opWebsiteTask := func(t *task.Task) error {
|
||||
for _, web := range websites {
|
||||
msg := fmt.Sprintf("%s %s", i18n.GetMsgByKey(req.Operate), web.PrimaryDomain)
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ export namespace App {
|
|||
httpPort: number;
|
||||
container: string;
|
||||
env: { [key: string]: string };
|
||||
appKey: string;
|
||||
}
|
||||
|
||||
export interface AppInstallDto {
|
||||
|
|
|
|||
|
|
@ -3743,6 +3743,8 @@ const message = {
|
|||
licenseHelper: 'The Pro version supports the custom application repository feature',
|
||||
databaseHelper: 'Application associated database, please select target node database',
|
||||
nodeHelper: 'Cannot select current node',
|
||||
migrateHelper:
|
||||
'Currently only supports migrating monolithic applications and applications associated only with MySQL, MariaDB, PostgreSQL databases',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'Alert',
|
||||
|
|
|
|||
|
|
@ -3693,6 +3693,8 @@ const message = {
|
|||
licenseHelper: 'La versión Pro admite la función de repositorio de aplicaciones personalizadas',
|
||||
databaseHelper: 'Base de datos asociada a la aplicación, seleccione la base de datos del nodo destino',
|
||||
nodeHelper: 'No se puede seleccionar el nodo actual',
|
||||
migrateHelper:
|
||||
'Actualmente solo admite la migración de aplicaciones monolíticas y aplicaciones asociadas únicamente con bases de datos MySQL, MariaDB, PostgreSQL',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'Alerta',
|
||||
|
|
|
|||
|
|
@ -3632,6 +3632,8 @@ const message = {
|
|||
licenseHelper: 'プロバージョンはカスタムアプリケーションリポジトリ機能をサポートしています',
|
||||
databaseHelper: 'アプリケーション関連データベース、ターゲットノードのデータベースを選択してください',
|
||||
nodeHelper: '現在のノードは選択できません',
|
||||
migrateHelper:
|
||||
'現在、単体アプリケーションと MySQL、MariaDB、PostgreSQL データベースのみに関連するアプリケーションの移行のみをサポートしています',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'アラート',
|
||||
|
|
|
|||
|
|
@ -3568,6 +3568,8 @@ const message = {
|
|||
licenseHelper: '프로 버전은 사용자 정의 애플리케이션 저장소 기능을 지원합니다',
|
||||
databaseHelper: '애플리케이션 관련 데이터베이스, 대상 노드 데이터베이스를 선택하세요',
|
||||
nodeHelper: '현재 노드는 선택할 수 없습니다',
|
||||
migrateHelper:
|
||||
'현재 단일 애플리케이션과 MySQL, MariaDB, PostgreSQL 데이터베이스만 연결된 애플리케이션의 마이그레이션만 지원합니다',
|
||||
},
|
||||
alert: {
|
||||
isAlert: '알림',
|
||||
|
|
|
|||
|
|
@ -3705,6 +3705,8 @@ const message = {
|
|||
licenseHelper: 'Versi Pro menyokong fungsi gudang aplikasi tersuai',
|
||||
databaseHelper: 'Pangkalan data berkaitan aplikasi, sila pilih pangkalan data nod sasaran',
|
||||
nodeHelper: 'Tidak boleh memilih nod semasa',
|
||||
migrateHelper:
|
||||
'Kini hanya menyokong penghijrahan aplikasi monolitik dan aplikasi yang hanya dikaitkan dengan pangkalan data MySQL, MariaDB, PostgreSQL',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'Amaran',
|
||||
|
|
|
|||
|
|
@ -3721,6 +3721,8 @@ const message = {
|
|||
licenseHelper: 'A versão Pro suporta o recurso de repositório de aplicativos personalizados',
|
||||
databaseHelper: 'Banco de dados associado ao aplicativo, selecione o banco de dados do nó de destino',
|
||||
nodeHelper: 'Não é possível selecionar o nó atual',
|
||||
migrateHelper:
|
||||
'Atualmente suporta apenas a migração de aplicações monolíticas e aplicações associadas apenas a bancos de dados MySQL, MariaDB, PostgreSQL',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'Alerta',
|
||||
|
|
|
|||
|
|
@ -3712,6 +3712,8 @@ const message = {
|
|||
licenseHelper: 'Профессиональная версия поддерживает функцию пользовательского репозитория приложений',
|
||||
databaseHelper: 'База данных, связанная с приложением, выберите базу данных целевого узла',
|
||||
nodeHelper: 'Нельзя выбрать текущий узел',
|
||||
migrateHelper:
|
||||
'В настоящее время поддерживает миграцию только монолитных приложений и приложений, связанных только с базами данных MySQL, MariaDB, PostgreSQL',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'Оповещение',
|
||||
|
|
|
|||
|
|
@ -3786,6 +3786,8 @@ const message = {
|
|||
licenseHelper: 'Pro sürümü, özel uygulama deposu özelliğini destekler',
|
||||
databaseHelper: 'Uygulama ilişkili veritabanı, lütfen hedef düğüm veritabanını seçin',
|
||||
nodeHelper: 'Geçerli düğüm seçilemez',
|
||||
migrateHelper:
|
||||
'Şu anda yalnızca tek parça uygulamaların ve yalnızca MySQL, MariaDB, PostgreSQL veritabanlarıyla ilişkili uygulamaların taşınmasını destekler',
|
||||
},
|
||||
alert: {
|
||||
isAlert: 'Uyarı',
|
||||
|
|
|
|||
|
|
@ -3457,6 +3457,7 @@ const message = {
|
|||
licenseHelper: '專業版支援自訂應用倉庫功能',
|
||||
databaseHelper: '應用關聯數據庫,請選擇目標節點數據庫',
|
||||
nodeHelper: '不能選擇當前節點',
|
||||
migrateHelper: '目前僅支持遷移單體應用和只關聯 MySQL、MariaDB、PostgreSQL 數據庫的應用',
|
||||
},
|
||||
alert: {
|
||||
isAlert: '是否告警',
|
||||
|
|
|
|||
|
|
@ -3444,6 +3444,7 @@ const message = {
|
|||
licenseHelper: '专业版支持自定义应用仓库功能',
|
||||
databaseHelper: '应用关联数据库,请选择目标节点数据库',
|
||||
nodeHelper: '不能选择当前节点',
|
||||
migrateHelper: '当前仅支持迁移单体应用和只关联 MySQL、MariaDB、PostgreSQL 数据库的应用',
|
||||
},
|
||||
alert: {
|
||||
isAlert: '是否告警',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue