mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-05 22:54:26 +08:00
feat: Optimize node management logic (#9510)
This commit is contained in:
parent
765add6184
commit
ea1a34f57a
19 changed files with 156 additions and 16 deletions
|
|
@ -206,17 +206,17 @@ func (a *AppInstallRepo) LoadBaseInfo(key string, name string) (*RootInfo, error
|
|||
return nil, err
|
||||
}
|
||||
switch app.Key {
|
||||
case "mysql", "mariadb":
|
||||
case "mysql", "mariadb", constant.AppMysqlCluster:
|
||||
password, ok := envMap["PANEL_DB_ROOT_PASSWORD"].(string)
|
||||
if ok {
|
||||
info.Password = password
|
||||
}
|
||||
case "redis":
|
||||
case "redis", constant.AppRedisCluster:
|
||||
password, ok := envMap["PANEL_REDIS_ROOT_PASSWORD"].(string)
|
||||
if ok {
|
||||
info.Password = password
|
||||
}
|
||||
case "mongodb", constant.AppPostgresql:
|
||||
case "mongodb", constant.AppPostgresql, constant.AppPostgresqlCluster:
|
||||
user, ok := envMap["PANEL_DB_ROOT_USER"].(string)
|
||||
if ok {
|
||||
info.UserName = user
|
||||
|
|
|
|||
|
|
@ -116,13 +116,15 @@ func checkPortExist(port int) error {
|
|||
}
|
||||
|
||||
var DatabaseKeys = map[string]uint{
|
||||
constant.AppMysql: 3306,
|
||||
constant.AppMariaDB: 3306,
|
||||
constant.AppPostgresql: 5432,
|
||||
constant.AppPostgres: 5432,
|
||||
constant.AppMongodb: 27017,
|
||||
constant.AppRedis: 6379,
|
||||
constant.AppMemcached: 11211,
|
||||
constant.AppMysql: 3306,
|
||||
constant.AppMariaDB: 3306,
|
||||
constant.AppPostgresql: 5432,
|
||||
constant.AppPostgres: 5432,
|
||||
constant.AppMongodb: 27017,
|
||||
constant.AppRedis: 6379,
|
||||
constant.AppMemcached: 11211,
|
||||
constant.AppMysqlCluster: 3306,
|
||||
constant.AppPostgresqlCluster: 5432,
|
||||
}
|
||||
|
||||
var ToolKeys = map[string]uint{
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 4776196 */
|
||||
src: url('iconfont.woff2?t=1750234328196') format('woff2'),
|
||||
url('iconfont.woff?t=1750234328196') format('woff'),
|
||||
url('iconfont.ttf?t=1750234328196') format('truetype'),
|
||||
url('iconfont.svg?t=1750234328196#iconfont') format('svg');
|
||||
src: url('iconfont.woff2?t=1752473267421') format('woff2'),
|
||||
url('iconfont.woff?t=1752473267421') format('woff'),
|
||||
url('iconfont.ttf?t=1752473267421') format('truetype'),
|
||||
url('iconfont.svg?t=1752473267421#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
|
@ -14,6 +14,18 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.p-cluster-3:before {
|
||||
content: "\e706";
|
||||
}
|
||||
|
||||
.p-cluster-2:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.p-cluster-1:before {
|
||||
content: "\e7d8";
|
||||
}
|
||||
|
||||
.p-start:before {
|
||||
content: "\e688";
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,27 @@
|
|||
"css_prefix_text": "p-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "88609",
|
||||
"name": "cluster-3",
|
||||
"font_class": "cluster-3",
|
||||
"unicode": "e706",
|
||||
"unicode_decimal": 59142
|
||||
},
|
||||
{
|
||||
"icon_id": "663330",
|
||||
"name": "cluster-2",
|
||||
"font_class": "cluster-2",
|
||||
"unicode": "e61f",
|
||||
"unicode_decimal": 58911
|
||||
},
|
||||
{
|
||||
"icon_id": "4766884",
|
||||
"name": "cluster-1",
|
||||
"font_class": "cluster-1",
|
||||
"unicode": "e7d8",
|
||||
"unicode_decimal": 59352
|
||||
},
|
||||
{
|
||||
"icon_id": "15838584",
|
||||
"name": "arrow-right-filling",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 195 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1977,6 +1977,8 @@ const message = {
|
|||
node: 'Upgrading to the professional version allows you to manage multiple Linux servers with 1Panel.',
|
||||
fileExchange: 'Upgrade to the Professional Edition to quickly transfer files between multiple servers.',
|
||||
app: 'Upgrade to the professional version to view service information, abnormal monitoring, etc. through the mobile APP. ',
|
||||
cluster:
|
||||
'Upgrading to the Professional Edition allows you to manage MySQL/Postgres/Reids master-slave clusters.',
|
||||
},
|
||||
clean: {
|
||||
scan: 'Start scanning',
|
||||
|
|
@ -3353,6 +3355,16 @@ const message = {
|
|||
appTitle3: 'Real-Time Abnormal Monitoring',
|
||||
appContent3:
|
||||
'View real-time server status, WAF security monitoring, website traffic statistics, and process health status on the mobile app.',
|
||||
|
||||
clusterTitle1: 'Master-Slave Deployment',
|
||||
clusterContent1:
|
||||
'Supports creating MySQL/Postgres/Redis master-slave instances on different nodes, automatically completing master-slave association and initialization',
|
||||
clusterTitle2: 'Master-Slave Management',
|
||||
clusterContent2:
|
||||
'Unified page to centrally manage multiple master-slave nodes, view their roles, running status, etc.',
|
||||
clusterTitle3: 'Replication Status',
|
||||
clusterContent3:
|
||||
'Displays master-slave replication status and delay information, assisting in troubleshooting synchronization issues',
|
||||
},
|
||||
node: {
|
||||
master: 'Main Node',
|
||||
|
|
|
|||
|
|
@ -1893,6 +1893,8 @@ const message = {
|
|||
alert: 'プロのバージョンにアップグレードして、SMSを介してアラーム情報を受信し、アラームログを表示し、さまざまなキーイベントを完全に制御し、心配のないシステム操作を確実にする',
|
||||
app: 'モバイルアプリでサービス情報、異常監視などを表示するには、プロフェッショナル版にアップグレードしてください。',
|
||||
fileExchange: 'プロフェッショナル版にアップグレードすると、複数のサーバー間でファイルを迅速に転送できます。',
|
||||
cluster:
|
||||
'プロフェッショナル版にアップグレードすると、MySQL/Postgres/Reidsマスタースレーブクラスタを管理できます。',
|
||||
},
|
||||
clean: {
|
||||
scan: 'スキャンを開始します',
|
||||
|
|
@ -3222,6 +3224,16 @@ const message = {
|
|||
appTitle3: 'リアルタイム異常監視',
|
||||
appContent3:
|
||||
'モバイル端末でサーバーステータス、WAFセキュリティ監視、ウェブサイトの訪問統計、プロセスの健康状態をリアルタイムで確認できます。',
|
||||
|
||||
clusterTitle1: 'マスタースレーブ展開',
|
||||
clusterContent1:
|
||||
'異なるノードで MySQL/Postgres/Redis マスタースレーブインスタンスを作成することをサポートし、自動的にマスタースレーブ関連付けと初期化を完了します',
|
||||
clusterTitle2: 'マスタースレーブ管理',
|
||||
clusterContent2:
|
||||
'統一されたページで複数のマスタースレーブノードを一元的に管理し、それらの役割、実行状態などを表示します',
|
||||
clusterTitle3: 'レプリケーション状態',
|
||||
clusterContent3:
|
||||
'マスタースレーブレプリケーション状態と遅延情報を表示し、同期の問題を解決するのに役立ちます',
|
||||
},
|
||||
node: {
|
||||
master: '主ノード',
|
||||
|
|
|
|||
|
|
@ -1861,6 +1861,8 @@ const message = {
|
|||
alert: '전문 버전으로 업그레이드하면 SMS 를 통해 알림 정보를 받고 알림 로그를 볼 수 있으며, 다양한 주요 이벤트를 완벽하게 제어하여 시스템 운영을 걱정 없이 유지할 수 있습니다.',
|
||||
fileExchange: '프로페셔널 에디션으로 업그레이드하여 여러 서버 간에 파일을 빠르게 전송할 수 있습니다.',
|
||||
app: '프로페셔널 버전으로 업그레이드하면 모바일 APP을 통해 서비스 정보, 이상 모니터링 등을 확인할 수 있습니다.',
|
||||
cluster:
|
||||
'프로페셔널 에디션으로 업그레이드하면 MySQL/Postgres/Reids 마스터-슬레이브 클러스터를 관리할 수 있습니다.',
|
||||
},
|
||||
clean: {
|
||||
scan: '스캔 시작',
|
||||
|
|
@ -3164,6 +3166,16 @@ const message = {
|
|||
appTitle3: '실시간 이상 모니터링',
|
||||
appContent3:
|
||||
'모바일 앱에서 서버 상태, WAF 보안 모니터링, 웹사이트 방문 통계 및 프로세스 건강 상태를 실시간으로 확인하세요.',
|
||||
|
||||
clusterTitle1: '마스터-슬레이브 배포',
|
||||
clusterContent1:
|
||||
'다른 노드에서 MySQL/Postgres/Redis 마스터-슬레이브 인스턴스를 생성하는 것을 지원하며, 자동으로 마스터-슬레이브 연결 및 초기화를 완료합니다',
|
||||
clusterTitle2: '마스터-슬레이브 관리',
|
||||
clusterContent2:
|
||||
'통합 페이지에서 여러 마스터-슬레이브 노드를 중앙에서 관리하고, 역할, 실행 상태 등을 확인합니다',
|
||||
clusterTitle3: '복제 상태',
|
||||
clusterContent3:
|
||||
'마스터-슬레이브 복제 상태 및 지연 정보를 표시하여 동기화 문제를 해결하는 데 도움을 줍니다',
|
||||
},
|
||||
node: {
|
||||
master: '주 노드',
|
||||
|
|
|
|||
|
|
@ -1949,6 +1949,8 @@ const message = {
|
|||
alert: 'Tingkatkan ke versi profesional untuk menerima maklumat amaran melalui SMS dan melihat log amaran, mengawal sepenuhnya pelbagai acara utama, dan memastikan operasi sistem bebas kerisauan.',
|
||||
fileExchange: 'Naik taraf ke Edisi Professional untuk menghantar fail dengan cepat antara pelbagai pelayan.',
|
||||
app: 'Tingkatkan ke versi profesional untuk melihat maklumat perkhidmatan, pemantauan abnormal, dll melalui aplikasi mudah alih.',
|
||||
cluster:
|
||||
'Versi Profesional menaik taraf membolehkan anda menguruskan kelompok induk-hamba MySQL/Postgres/Reids.',
|
||||
},
|
||||
clean: {
|
||||
scan: 'Mulakan imbasan',
|
||||
|
|
@ -3293,6 +3295,16 @@ const message = {
|
|||
appTitle3: 'Pemantauan Anomali Masa Nyata',
|
||||
appContent3:
|
||||
'Lihat status pelayan, pemantauan keselamatan WAF, statistik pelawat laman web dan status kesihatan proses di aplikasi mudah alih secara masa nyata.',
|
||||
|
||||
clusterTitle1: 'Penyebaran Utama-Hamba',
|
||||
clusterContent1:
|
||||
'Menyokong penciptaan contoh utama-hamba MySQL/Postgres/Redis pada nod yang berbeza, secara automatik melengkapkan perhubungan utama-hamba dan permulaan',
|
||||
clusterTitle2: 'Pengurusan Utama-Hamba',
|
||||
clusterContent2:
|
||||
'Halaman terpadu untuk menguruskan pelbagai nod utama-hamba, lihat peranan, status berjalan, dsb.',
|
||||
clusterTitle3: 'Status Replikasi',
|
||||
clusterContent3:
|
||||
'Memaparkan status replikasi utama-hamba dan maklumat kelewatan, membantu menyelesaikan masalah sinkronisasi',
|
||||
},
|
||||
node: {
|
||||
master: 'Nod Utama',
|
||||
|
|
|
|||
|
|
@ -1940,6 +1940,8 @@ const message = {
|
|||
fileExchange:
|
||||
'Atualize para a Edição Profissional para transferir arquivos rapidamente entre vários servidores.',
|
||||
app: 'Upgrade para a versão profissional para visualizar informações do serviço, monitoramento anômalo, etc., através do aplicativo móvel.',
|
||||
cluster:
|
||||
'A atualização para a Edição Profissional permite gerenciar clusters mestre-escravo MySQL/Postgres/Reids.',
|
||||
},
|
||||
clean: {
|
||||
scan: 'Iniciar escaneamento',
|
||||
|
|
@ -3301,6 +3303,16 @@ const message = {
|
|||
appTitle3: 'Monitoramento Anômalo em Tempo Real',
|
||||
appContent3:
|
||||
'Veja o status do servidor, monitoramento de segurança WAF, estatísticas de visitas ao site e saúde dos processos em tempo real no aplicativo móvel.',
|
||||
|
||||
clusterTitle1: 'Implantação Mestre-Escravo',
|
||||
clusterContent1:
|
||||
'Suporta a criação de instâncias mestre-escravo MySQL/Postgres/Redis em diferentes nós, completando automaticamente a associação e inicialização mestre-escravo',
|
||||
clusterTitle2: 'Gestão Mestre-Escravo',
|
||||
clusterContent2:
|
||||
'Página unificada para gerir centralmente vários nós mestre-escravo, visualizar seus papéis, status de execução, etc.',
|
||||
clusterTitle3: 'Estado de Replicação',
|
||||
clusterContent3:
|
||||
'Exibe o estado de replicação mestre-escravo e informações de atraso, auxiliando na resolução de problemas de sincronização',
|
||||
},
|
||||
node: {
|
||||
master: 'Nó Principal',
|
||||
|
|
|
|||
|
|
@ -1935,6 +1935,8 @@ const message = {
|
|||
alert: 'Обновление до профессиональной версии позволяет получать информацию о тревогах через SMS и просматривать логи тревог, полностью контролировать различные ключевые события и обеспечивать беспроблемную работу системы',
|
||||
fileExchange: 'Обновите до Профессиональной версии, чтобы быстро передавать файлы между несколькими серверами.',
|
||||
app: 'Обновите до профессиональной версии, чтобы просматривать информацию о сервисах, мониторинг аномалий и т.д. через мобильное приложение.',
|
||||
cluster:
|
||||
'Обновление до профессиональной версии позволяет управлять кластерами мастер-слейв MySQL/Postgres/Reids.',
|
||||
},
|
||||
clean: {
|
||||
scan: 'Начать сканирование',
|
||||
|
|
@ -3286,6 +3288,16 @@ const message = {
|
|||
appTitle3: 'Мониторинг аномалий в реальном времени',
|
||||
appContent3:
|
||||
'Просматривайте статус сервера, мониторинг безопасности WAF, статистику посещений сайта и состояние процессов в реальном времени через мобильное приложение.',
|
||||
|
||||
clusterTitle1: 'Развертывание мастер-слейв',
|
||||
clusterContent1:
|
||||
'Поддерживает создание мастер-слейв экземпляров MySQL/Postgres/Redis на разных узлах, автоматически завершая связь мастер-слейв и инициализацию',
|
||||
clusterTitle2: 'Управление мастер-слейв',
|
||||
clusterContent2:
|
||||
'Единая страница для централизованного управления несколькими узлами мастер-слейв, просмотр их ролей, статуса выполнения и т.д.',
|
||||
clusterTitle3: 'Состояние репликации',
|
||||
clusterContent3:
|
||||
'Отображает состояние репликации мастер-слейв и информацию о задержке, помогая в устранении проблем синхронизации',
|
||||
},
|
||||
node: {
|
||||
master: 'Главный узел',
|
||||
|
|
|
|||
|
|
@ -1997,6 +1997,7 @@ const message = {
|
|||
node: 'Profesyonel sürüme yükseltme, birden fazla Linux sunucusunu 1Panel ile yönetmenize olanak tanır.',
|
||||
fileExchange: 'Profesyonel Sürüme yükseltme, birden fazla sunucu arasında hızlı dosya aktarımı sağlar.',
|
||||
app: 'Profesyonel sürüme yükseltme, mobil uygulama üzerinden hizmet bilgilerini, anormal izlemeyi vb. görüntülemenize olanak tanır. ',
|
||||
cluster: 'Profesyonel Sürüme Yükseltme, MySQL/Postgers/Reids ana-çalışan kümelerini yönetmenizi sağlar.',
|
||||
},
|
||||
clean: {
|
||||
scan: 'Taramayı başlat',
|
||||
|
|
@ -3389,6 +3390,16 @@ const message = {
|
|||
appTitle3: 'Gerçek Zamanlı Anormallik İzleme',
|
||||
appContent3:
|
||||
'Mobil uygulama üzerinden gerçek zamanlı sunucu durumu, WAF güvenlik izleme, web sitesi trafik istatistikleri ve işlem sağlığı durumunu görüntüleyin.',
|
||||
|
||||
clusterTitle1: 'Ana-Çalışan Dağıtımı',
|
||||
clusterContent1:
|
||||
'Farklı düğümlerde MySQL/Postgres/Redis ana-çalışan örnekleri oluşturmayı destekler, ana-çalışan ilişkisi ve başlatmayı otomatik olarak tamamlar',
|
||||
clusterTitle2: 'Ana-Çalışan Yönetimi',
|
||||
clusterContent2:
|
||||
'Birleşik bir sayfa ile birden çok ana-çalışan düğümünü merkezi olarak yönetin, rollerini, çalışma durumlarını vb. görüntüleyin',
|
||||
clusterTitle3: 'Çoğaltma Durumu',
|
||||
clusterContent3:
|
||||
'Ana-çalışan çoğaltma durumunu ve gecikme bilgilerini görüntüleyerek senkronizasyon sorunlarını gidermeye yardımcı olur',
|
||||
},
|
||||
node: {
|
||||
master: 'Ana Düğüm',
|
||||
|
|
|
|||
|
|
@ -1846,6 +1846,7 @@ const message = {
|
|||
node: '升級專業版可以使用 1Panel 管理多台 linux 伺服器。',
|
||||
fileExchange: '升級專業版可以在多台服務器之間快速傳輸文件。',
|
||||
app: '升級專業版可通過手機APP,查看服務資訊、异常監控等。',
|
||||
cluster: '升級專業版可以管理 MySQL/Postgres/Reids 主從集群。',
|
||||
},
|
||||
clean: {
|
||||
scan: '開始掃描',
|
||||
|
|
@ -3124,6 +3125,13 @@ const message = {
|
|||
appContent2: '在移動端進行應用、網站、Docker、資料庫等基礎管理,支持快速創建應用與網站。',
|
||||
appTitle3: '實時異常監控',
|
||||
appContent3: '移動端實時查看伺服器狀態、WAF 安全監控、網站訪問統計與進程健康狀況。',
|
||||
|
||||
clusterTitle1: '主從部署',
|
||||
clusterContent1: '支持在不同節點創建 MySQL/Postgres/Redis 主從實例,自動完成主從關聯與初始化',
|
||||
clusterTitle2: '主從管理',
|
||||
clusterContent2: '統一頁面集中管理多個主從節點,查看其角色、運行狀態等信息',
|
||||
clusterTitle3: '複製狀態',
|
||||
clusterContent3: '展示主從複製狀態與延遲信息,輔助排查同步異常問題',
|
||||
},
|
||||
node: {
|
||||
master: '主節點',
|
||||
|
|
|
|||
|
|
@ -1837,6 +1837,7 @@ const message = {
|
|||
node: '升级专业版可以使用 1Panel 管理多台 linux 服务器。',
|
||||
fileExchange: '升级专业版可以在多台服务器之间快速传输文件。',
|
||||
app: '升级专业版可通过手机 APP,查看服务信息、异常监控等。',
|
||||
cluster: '升级专业版可以管理 MySQL/Postgres/Reids 主从集群。',
|
||||
},
|
||||
clean: {
|
||||
scan: '开始扫描',
|
||||
|
|
@ -3094,6 +3095,13 @@ const message = {
|
|||
appContent2: '在移动端进行应用、网站、Docker、数据库等基础管理,支持快速创建应用与网站。',
|
||||
appTitle3: '实时异常监控',
|
||||
appContent3: '移动端实时查看服务器状态、WAF 安全监控、网站访问统计与进程健康状况。',
|
||||
|
||||
clusterTitle1: '主从部署',
|
||||
clusterContent1: '支持在不同节点创建 MySQL/Postgres/Redis 主从实例,自动完成主从关联与初始化',
|
||||
clusterTitle2: '主从管理',
|
||||
clusterContent2: '统一页面集中管理多个主从节点,查看其角色、运行状态等信息',
|
||||
clusterTitle3: '复制状态',
|
||||
clusterContent3: '展示主从复制状态与延迟信息,辅助排查同步异常问题',
|
||||
},
|
||||
node: {
|
||||
master: '主节点',
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ const checkExist = (data: App.CheckInstalled) => {
|
|||
|
||||
const loadDBOptions = async () => {
|
||||
try {
|
||||
const res = await listDatabases('mysql,mariadb');
|
||||
const res = await listDatabases('mysql,mariadb,mysql-cluster');
|
||||
let datas = res.data || [];
|
||||
dbOptionsLocal.value = [];
|
||||
dbOptionsRemote.value = [];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue