diff --git a/agent/app/service/container.go b/agent/app/service/container.go index e2350eedf..937079c0b 100644 --- a/agent/app/service/container.go +++ b/agent/app/service/container.go @@ -555,13 +555,15 @@ func (u *ContainerService) ContainerInfo(req dto.OperationWithName) (*dto.Contai networkSettings := oldContainer.NetworkSettings bridgeNetworkSettings := networkSettings.Networks[data.Network] if bridgeNetworkSettings.IPAMConfig != nil { - ipv4Address := bridgeNetworkSettings.IPAMConfig.IPv4Address data.MacAddr = bridgeNetworkSettings.MacAddress - data.Ipv4 = ipv4Address - ipv6Address := bridgeNetworkSettings.IPAMConfig.IPv6Address - data.Ipv6 = ipv6Address + if data.Network != "bridge" { + data.Ipv4 = bridgeNetworkSettings.IPAMConfig.IPv4Address + data.Ipv6 = bridgeNetworkSettings.IPAMConfig.IPv6Address + } } else { - data.Ipv4 = bridgeNetworkSettings.IPAddress + if data.Network != "bridge" { + data.Ipv4 = bridgeNetworkSettings.IPAddress + } } data.Hostname = oldContainer.Config.Hostname data.DNS = oldContainer.HostConfig.DNS diff --git a/agent/app/service/firewall.go b/agent/app/service/firewall.go index c0cb9ff39..b3975c6d0 100644 --- a/agent/app/service/firewall.go +++ b/agent/app/service/firewall.go @@ -611,8 +611,10 @@ func (u *FirewallService) updatePingStatus(enable string) error { } func (u *FirewallService) addPortsBeforeStart(client firewall.FirewallClient) error { - if err := client.Port(fireClient.FireInfo{Port: global.CONF.Base.Port, Protocol: "tcp", Strategy: "accept"}, "add"); err != nil { - return err + if !global.IsMaster { + if err := client.Port(fireClient.FireInfo{Port: global.CONF.Base.Port, Protocol: "tcp", Strategy: "accept"}, "add"); err != nil { + return err + } } if err := client.Port(fireClient.FireInfo{Port: "22", Protocol: "tcp", Strategy: "accept"}, "add"); err != nil { return err diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index d468f1fb7..4b5d511d3 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1860,8 +1860,9 @@ const message = { subscription: 'Subscription', perpetual: 'Perpetual', versionConstraint: '{0} Version Buyout', - forceDelete: 'Force delete, will ignore errors during the deletion process and eventually remove metadata', - deleteHelper: 'Deleting the license may cause child nodes to be unable to switch, please proceed with caution!', + forceUnbind: 'Force Unbind', + forceUnbindHelper: + 'Forcing unbind will ignore any errors that occur during the unbinding process and ultimately release the license binding.', trialInfo: 'Version', authorizationId: 'Authorization ID', authorizedUser: 'Authorized User', @@ -3212,7 +3213,7 @@ const message = { fixSSHConn: 'Manually edit the node to confirm connection information', checkConnInfo: 'Check Agent Connection Information', checkStatus: 'Check Node Service Availability', - fixStatus: 'Investigate Node Logs', + fixStatus: 'Run "systemctl status 1panel-agent.service" to check if the service is running.', checkAPI: 'Check Node API Availability', fixAPI: 'Check the node logs and verify if the firewall ports are properly opened.', forceDelete: 'Force Delete', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 3fdd69350..0fbb025c1 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -1723,6 +1723,9 @@ const message = { subscription: 'サブスクリプション', perpetual: '永久ライセンス', versionConstraint: '{0} バージョン買い取り', + forceUnbind: '強制バインド解除', + forceUnbindHelper: + '強制的にバインド解除を行うと、解除プロセス中に発生するエラーを無視し、最終的にライセンスのバインドを解除します。', trialInfo: 'バージョン', authorizationId: 'サブスクリプション承認ID', authorizedUser: '認定ユーザー', @@ -3024,7 +3027,7 @@ const message = { fixSSHConn: 'ノードを手動で編集し、接続情報を確認', checkConnInfo: 'エージェント接続情報を確認', checkStatus: 'ノードサービスの可用性を確認', - fixStatus: 'ノードログを調査', + fixStatus: '「systemctl status 1panel-agent.service」を実行して、サービスが起動しているか確認します。', checkAPI: 'ノードAPIの可用性を確認', fixAPI: 'ノードのログを確認し、ファイアウォールのポートが正常に開放されているか確認します。', forceDelete: '強制削除', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index 60cb5dad5..184e86ec9 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -1697,6 +1697,9 @@ const message = { subscription: '구독', perpetual: '영구 라이선스', versionConstraint: '{0} 버전 일시불 구매', + forceUnbind: '강제 바인딩 해제', + forceUnbindHelper: + '강제 바인딩 해제를 수행하면 해제 과정에서 발생하는 오류를 무시하고 궁극적으로 라이센스 바인딩을 해제합니다.', trialInfo: '버전', authorizationId: '구독 인증 ID', authorizedUser: '인증된 사용자', @@ -2973,7 +2976,7 @@ const message = { fixSSHConn: '노드를 수동으로 편집하여 연결 정보를 확인합니다', checkConnInfo: '에이전트 연결 정보 확인', checkStatus: '노드 서비스 가용성 확인', - fixStatus: '노드 로그 조사', + fixStatus: '"systemctl status 1panel-agent.service"를 실행하여 서비스가 실행 중인지 확인합니다.', checkAPI: '노드 API 가용성 확인', fixAPI: '노드 로그를 확인하고 방화벽 포트가 정상적으로 열려 있는지 확인합니다.', forceDelete: '강제 삭제', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 8a34eec1c..97233cca9 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -1782,6 +1782,9 @@ const message = { subscription: 'Langganan', perpetual: 'Lesen Perpetual', versionConstraint: '{0} Pembelian versi', + forceUnbind: 'Paksakan Nyahikat', + forceUnbindHelper: + 'Memaksa nyahikat akan mengabaikan sebarang ralat yang berlaku semasa proses nyahikat dan akhirnya melepaskan ikatan lesen.', trialInfo: 'Versi', authorizationId: 'ID Kebenaran Langganan', authorizedUser: 'Pengguna yang Dibenarkan', @@ -3094,7 +3097,8 @@ const message = { fixSSHConn: 'Edit nod secara manual untuk mengesahkan maklumat sambungan', checkConnInfo: 'Periksa Maklumat Sambungan Ejen', checkStatus: 'Periksa Ketersediaan Perkhidmatan Nod', - fixStatus: 'Siasat Log Nod', + fixStatus: + 'Jalankan "systemctl status 1panel-agent.service" untuk memeriksa sama ada perkhidmatan sedang berjalan.', checkAPI: 'Periksa Ketersediaan API Nod', fixAPI: 'Semak log nod dan periksa sama ada port firewall dibuka dengan betul.', forceDelete: 'Hapus Secara Paksa', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index 41456b683..bd5b42995 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -1767,6 +1767,9 @@ const message = { subscription: 'Assinatura', perpetual: 'Licença Perpétua', versionConstraint: '{0} Compra do versão', + forceUnbind: 'Forçar Desvinculação', + forceUnbindHelper: + 'Forçar a desvinculação ignorará quaisquer erros que ocorram durante o processo de desvinculação e, em última análise, liberará a vinculação da licença.', trialInfo: 'Versão', authorizationId: 'ID de autorização', authorizedUser: 'Usuário autorizado', @@ -3097,7 +3100,7 @@ const message = { fixSSHConn: 'Edite o nó manualmente para confirmar as informações de conexão', checkConnInfo: 'Verificar Informações de Conexão do Agente', checkStatus: 'Verificar Disponibilidade do Serviço do Nó', - fixStatus: 'Investigar Logs do Nó', + fixStatus: 'Execute "systemctl status 1panel-agent.service" para verificar se o serviço está em execução.', checkAPI: 'Verificar Disponibilidade da API do Nó', fixAPI: 'Verifique os logs do nó e confirme se as portas do firewall estão devidamente abertas.', forceDelete: 'Excluir Forçadamente', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index 73af72425..25f10dd56 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -1767,6 +1767,9 @@ const message = { subscription: 'Подписка', perpetual: 'Пожизненная лицензия', versionConstraint: '{0} Выкуп версии', + forceUnbind: 'Принудительное отвязывание', + forceUnbindHelper: + 'Принудительное отвязывание будет игнорировать любые ошибки, возникающие в процессе отвязывания, и в конечном итоге освободит привязку лицензии.', trialInfo: 'Версия', authorizationId: 'ID авторизации подписки', authorizedUser: 'Авторизованный пользователь', @@ -3087,7 +3090,7 @@ const message = { fixSSHConn: 'Вручную отредактируйте узел, чтобы подтвердить информацию о подключении', checkConnInfo: 'Проверка информации о подключении агента', checkStatus: 'Проверка доступности службы узла', - fixStatus: 'Проверка журналов узла', + fixStatus: 'Запустите "systemctl status 1panel-agent.service", чтобы проверить, запущена ли служба.', checkAPI: 'Проверка доступности API узла', fixAPI: 'Проверьте журналы узла и убедитесь, что порты брандмауэра правильно открыты.', forceDelete: 'Принудительное удаление', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index 92bd3f9a3..1bdfcc62d 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -1727,8 +1727,8 @@ const message = { subscription: '訂閱', perpetual: '永久授權', versionConstraint: '{0} 版本買斷', - forceDelete: '強制刪除,會忽略刪除過程中產生的錯誤並最終刪除元數據', - deleteHelper: '刪除許可證可能導致子節點無法切換,請謹慎操作!', + forceUnbind: '強制解除綁定', + forceUnbindHelper: '強制解除綁定將忽略解除過程中產生的錯誤,最終解除許可證綁定。', trialInfo: '版本', authorizationId: '訂閱授權 ID', authorizedUser: '被授權方', @@ -2976,7 +2976,7 @@ const message = { fixSSHConn: '手動編輯節點,確認連接資訊', checkConnInfo: '檢查 Agent 連接資訊', checkStatus: '檢查節點服務可用性', - fixStatus: '排查節點日誌', + fixStatus: '執行 "systemctl status 1panel-agent.service" 以檢查服務是否已啟動。', checkAPI: '檢查節點 API 可用性', fixAPI: '檢查節點日誌,確認防火牆端口是否正常放行。', forceDelete: '強制刪除', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 6ff550aa1..45b08b8e3 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1719,8 +1719,8 @@ const message = { subscription: '订阅', perpetual: '永久授权', versionConstraint: '{0} 版本买断', - forceDelete: '强制删除,会忽略删除过程中产生的错误并最终删除元数据', - deleteHelper: '删除许可证可能导致子节点无法切换,请谨慎操作!', + forceUnbind: '强制解绑', + forceUnbindHelper: '强制解绑,会忽略解绑过程中产生的错误并最终解除许可证绑定', trialInfo: '版本', authorizationId: '订阅授权 ID', authorizedUser: '被授权方', @@ -2957,7 +2957,7 @@ const message = { fixSSHConn: '手动编辑节点,确认连接信息', checkConnInfo: '检查 Agent 连接信息', checkStatus: '检查节点服务可用性', - fixStatus: '排查节点日志', + fixStatus: 'systemctl status 1panel-agent.service 检查服务是否已启动', checkAPI: '检查节点 API 可用性', fixAPI: '排查节点日志,检查防火墙端口是否正常放行', forceDelete: '强制删除', diff --git a/frontend/src/views/container/container/operate/index.vue b/frontend/src/views/container/container/operate/index.vue index 2fdc69e01..43e73f2d0 100644 --- a/frontend/src/views/container/container/operate/index.vue +++ b/frontend/src/views/container/container/operate/index.vue @@ -425,7 +425,7 @@ - + @@ -462,7 +462,7 @@ const form = reactive({ image: '', imageInput: false, forcePull: false, - network: '', + network: 'bridge', hostname: '', domainName: '', macAddr: '', diff --git a/frontend/src/views/container/dashboard/index.vue b/frontend/src/views/container/dashboard/index.vue index fbfa2e0d0..5cb4622bd 100644 --- a/frontend/src/views/container/dashboard/index.vue +++ b/frontend/src/views/container/dashboard/index.vue @@ -1,120 +1,126 @@ diff --git a/frontend/src/views/container/docker-status/index.vue b/frontend/src/views/container/docker-status/index.vue index 46fac2fe1..8205d3bf5 100644 --- a/frontend/src/views/container/docker-status/index.vue +++ b/frontend/src/views/container/docker-status/index.vue @@ -20,6 +20,7 @@ const loadStatus = async () => { await loadDockerStatus() .then((res) => { isActive.value = res.data === 'Running'; + em('update:loading', false); em('update:is-active', isActive.value); em('search'); em('mounted'); diff --git a/frontend/src/views/database/redis/setting/persistence/index.vue b/frontend/src/views/database/redis/setting/persistence/index.vue index e6075d30e..015c59bfe 100644 --- a/frontend/src/views/database/redis/setting/persistence/index.vue +++ b/frontend/src/views/database/redis/setting/persistence/index.vue @@ -90,9 +90,13 @@ @@ -205,7 +209,7 @@ const onBackup = async () => { }; const onRecover = async () => { let param = { - downloadAccountID: currentRow.value.source, + downloadAccountID: currentRow.value.downloadAccountID, type: 'redis', name: database.value, detailName: '', diff --git a/frontend/src/views/setting/license/delete/index.vue b/frontend/src/views/setting/license/delete/index.vue deleted file mode 100644 index 3ae0168e3..000000000 --- a/frontend/src/views/setting/license/delete/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/frontend/src/views/setting/license/index.vue b/frontend/src/views/setting/license/index.vue index 04f7b7a8f..30fd0f639 100644 --- a/frontend/src/views/setting/license/index.vue +++ b/frontend/src/views/setting/license/index.vue @@ -83,8 +83,19 @@ - + + + @@ -92,7 +103,6 @@ import { ref, reactive, onMounted } from 'vue'; import { deleteLicense, searchLicense, syncLicense, unbindLicense } from '@/api/modules/setting'; import LicenseImport from '@/components/license-import/index.vue'; -import LicenseDelete from '@/views/setting/license/delete/index.vue'; import LicenseBind from '@/views/setting/license/bind/index.vue'; import { dateFormat } from '@/utils/util'; import i18n from '@/lang'; @@ -103,9 +113,11 @@ import { initFavicon } from '@/utils/xpack'; const globalStore = GlobalStore(); const loading = ref(); const licenseRef = ref(); -const delRef = ref(); const bindRef = ref(); const opRef = ref(); +const opRef2 = ref(); +const forceUnbind = ref(); +const unbindRow = ref(); const data = ref(); const paginationConfig = reactive({ @@ -141,29 +153,33 @@ const onSync = async (row: any) => { }; const onUnbind = async (row: any) => { - ElMessageBox.confirm(i18n.global.t('license.unbindHelper'), i18n.global.t('commons.button.unbind'), { - confirmButtonText: i18n.global.t('commons.button.confirm'), - cancelButtonText: i18n.global.t('commons.button.cancel'), - type: 'info', - }).then(async () => { - loading.value = true; - await unbindLicense(row.id) - .then(() => { - loading.value = false; - MsgSuccess(i18n.global.t('commons.msg.operationSuccess')); - if (row.freeCount !== 0) { - globalStore.isProductPro = false; - initFavicon(); - window.location.reload(); - return; - } - search(); - }) - .catch(() => { - loading.value = false; - }); + unbindRow.value = row; + opRef2.value.acceptParams({ + title: i18n.global.t('commons.button.unbind'), + names: [row.licenseName], + msg: i18n.global.t('license.unbindHelper'), + api: null, + params: null, }); }; +const submitUnbind = async () => { + loading.value = true; + await unbindLicense(unbindRow.value.id) + .then(() => { + loading.value = false; + MsgSuccess(i18n.global.t('commons.msg.operationSuccess')); + if (unbindRow.value.freeCount !== 0) { + globalStore.isMasterProductPro = false; + initFavicon(); + window.location.reload(); + return; + } + search(); + }) + .catch(() => { + loading.value = false; + }); +}; const search = async () => { loading.value = true;