Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/init/migration/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func Init() {
migrations.DeleteXpackHideMenu,
migrations.AddCronjobGroup,
migrations.AddDiskMenu,
migrations.AddSimpleNodeGroup,
})
if err := m.Migrate(); err != nil {
global.LOG.Error(err)
Expand Down
10 changes: 10 additions & 0 deletions core/init/migration/migrations/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,3 +525,13 @@ var AddDiskMenu = &gormigrate.Migration{
}, "7", tx)
},
}

var AddSimpleNodeGroup = &gormigrate.Migration{
ID: "20250916-add-simple-node-group",
Migrate: func(tx *gorm.DB) error {
if err := tx.Create(&model.Group{Name: "Default", Type: "SimpleNode", IsDefault: true}).Error; err != nil {
return err
}
return nil
},
}
8 changes: 8 additions & 0 deletions core/utils/common/common.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package common

import (
"crypto/md5"
"encoding/hex"
"fmt"
mathRand "math/rand"
"net"
Expand Down Expand Up @@ -36,6 +38,12 @@ func RandStrAndNum(n int) string {
return (string(b))
}

func Md5(val string) string {
hash := md5.New()
hash.Write([]byte(val))
return hex.EncodeToString(hash.Sum(nil))
}

func LoadTimeZoneByCmd() string {
loc := time.Now().Location().String()
if _, err := time.LoadLocation(loc); err != nil {
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const message = {
sure: 'Confirm',
show: 'Show',
hide: 'Hide',
visit: 'Visit',
},
operate: {
start: 'Start',
Expand Down Expand Up @@ -3521,6 +3522,8 @@ const message = {
'Detected that this node is not bound to a license. Please bind it in [Panel Settings - License] menu and try again!',
memTotal: 'Total Memory',
nodeManagement: 'Node Management',
panelManagement: 'Panel Management',
addPanel: 'Add Panel',
addNode: 'Add Node',
connInfo: 'Connection Information',
nodeInfo: 'Node Information',
Expand Down Expand Up @@ -3578,6 +3581,7 @@ const message = {
fixAPI: 'Check the node logs and verify if the firewall ports are properly opened.',
forceDelete: 'Force Delete',
operateHelper: 'The following nodes will undergo {0} operation, do you want to continue?',
operatePanelHelper: 'The following panels will undergo {0} operation, do you want to continue?',
forceDeleteHelper: 'Force delete will ignore node deletion errors and delete database metadata',
uninstall: 'Delete node data',
uninstallHelper: 'This will delete all 1Panel related data of the node. Proceed with caution!',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const message = {
sure: '確認',
show: '表示する',
hide: '隠す',
visit: '訪問',
},
operate: {
start: '開始',
Expand Down Expand Up @@ -3407,6 +3408,8 @@ const message = {
'このノードがライセンスにバインドされていないことを検出しました。[パネル設定 - ライセンス]メニューでバインドしてから再試行してください!',
memTotal: '総メモリ',
nodeManagement: 'ノード管理',
panelManagement: 'パネル管理',
addPanel: 'パネル追加',
addNode: 'ノードを追加',
connInfo: '接続情報',
nodeInfo: 'ノード情報',
Expand Down Expand Up @@ -3464,6 +3467,7 @@ const message = {
fixAPI: 'ノードのログを確認し、ファイアウォールのポートが正常に開放されているか確認します。',
forceDelete: '強制削除',
operateHelper: '以下のノードに{0}操作を行います。続行しますか?',
operatePanelHelper: '以下のパネルに対して {0} 操作を実行します。続行しますか?',
forceDeleteHelper: '強制削除はノード削除エラーを無視し、データベースメタデータを削除します',
uninstall: 'ノードデータを削除',
uninstallHelper: 'ノードに関連するすべての1Panelデータが削除されます。慎重に選択してください!',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const message = {
sure: '확인',
show: '보기',
hide: '숨기기',
visit: '방문',
},
operate: {
start: '시작',
Expand Down Expand Up @@ -3345,6 +3346,8 @@ const message = {
'이 노드가 라이선스에 바인딩되지 않은 것으로 감지되었습니다. [패널 설정 - 라이선스] 메뉴에서 바인딩 후 다시 시도하세요!',
memTotal: '총 메모리',
nodeManagement: '노드 관리',
panelManagement: '패널 관리',
addPanel: '패널 추가',
addNode: '노드 추가',
connInfo: '연결 정보',
nodeInfo: '노드 정보',
Expand Down Expand Up @@ -3403,6 +3406,7 @@ const message = {
fixAPI: '노드 로그를 확인하고 방화벽 포트가 정상적으로 열려 있는지 확인합니다.',
forceDelete: '강제 삭제',
operateHelper: '다음 노드에 대해 {0} 작업을 수행합니다. 계속하시겠습니까?',
operatePanelHelper: '다음 패널에 대해 {0} 작업을 수행합니다. 계속하시겠습니까?',
forceDeleteHelper: '강제 삭제는 노드 삭제 오류를 무시하고 데이터베이스 메타데이터를 삭제합니다',
uninstall: '노드 데이터 삭제',
uninstallHelper: '이 작업은 노드의 모든 1Panel 관련 데이터를 삭제합니다. 신중하게 선택하세요!',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const message = {
sure: 'Sahkan',
show: 'Tunjukkan',
hide: 'Sembunyikan',
visit: 'Lawati',
},
operate: {
start: 'Mula',
Expand Down Expand Up @@ -3475,6 +3476,8 @@ const message = {
'Terdeteksi nod ini tidak terikat pada lesen. Sila ikat dalam menu [Tetapan Panel - Lesen] dan cuba lagi!',
memTotal: 'Jumlah Memori',
nodeManagement: 'Pengurusan Nod',
panelManagement: 'Pengurusan Panel',
addPanel: 'Tambah Panel',
addNode: 'Tambah Nod',
connInfo: 'Maklumat Sambungan',
nodeInfo: 'Maklumat Nod',
Expand Down Expand Up @@ -3533,6 +3536,7 @@ const message = {
fixAPI: 'Semak log nod dan periksa sama ada port firewall dibuka dengan betul.',
forceDelete: 'Hapus Secara Paksa',
operateHelper: 'Operasi {0} akan dilakukan pada nod berikut, adakah anda ingin meneruskan?',
operatePanelHelper: 'Operasi {0} akan dilakukan pada panel berikut. Teruskan?',
forceDeleteHelper:
'Hapus secara paksa akan mengabaikan ralat penghapusan nod dan menghapus metadata pangkalan data',
uninstall: 'Padam data nod',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const message = {
sure: 'Confirmar',
show: 'Exibir',
hide: 'Ocultar',
visit: 'Visitar',
},
operate: {
start: 'Iniciar',
Expand Down Expand Up @@ -3493,6 +3494,8 @@ const message = {
'Detectamos que este nó não está vinculado a uma licença. Por favor vincule no menu [Configurações do Painel - Licença] e tente novamente!',
memTotal: 'Memória Total',
nodeManagement: 'Gerenciamento de Nó',
panelManagement: 'Gerenciamento de Painel',
addPanel: 'Adicionar Painel',
addNode: 'Adicionar Nó',
connInfo: 'Informações de Conexão',
nodeInfo: 'Informações do Nó',
Expand Down Expand Up @@ -3550,6 +3553,7 @@ const message = {
fixAPI: 'Verifique os logs do nó e confirme se as portas do firewall estão devidamente abertas.',
forceDelete: 'Excluir Forçadamente',
operateHelper: 'A operação {0} será realizada nos seguintes nós, deseja continuar?',
operatePanelHelper: 'A operação {0} será executada nos painéis a seguir. Continuar?',
forceDeleteHelper:
'Excluir forçadamente ignorará erros de exclusão do nó e removerá os metadados do banco de dados',
uninstall: 'Excluir dados do nó',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ const message = {
sure: 'Подтвердить',
show: 'Показать',
hide: 'Скрыть',
visit: 'Посетить',
},
operate: {
start: 'Запустить',
Expand Down Expand Up @@ -3480,6 +3481,8 @@ const message = {
'Обнаружено, что узел не привязан к лицензии. Привяжите в меню [Настройки панели - Лицензия] и повторите попытку!',
memTotal: 'Общая память',
nodeManagement: 'Управление узлом',
panelManagement: 'Управление Панелью',
addPanel: 'Добавить Панель',
addNode: 'Добавить узел',
connInfo: 'Информация о подключении',
nodeInfo: 'Информация об узле',
Expand Down Expand Up @@ -3539,6 +3542,7 @@ const message = {
fixAPI: 'Проверьте журналы узла и убедитесь, что порты брандмауэра правильно открыты.',
forceDelete: 'Принудительное удаление',
operateHelper: 'Будет выполнена операция {0} для следующих узлов, вы хотите продолжить?',
operatePanelHelper: 'Операция {0} будет выполнена на следующих панелях. Продолжить?',
forceDeleteHelper:
'Принудительное удаление проигнорирует ошибки удаления узла и удалит метаданные базы данных',
uninstall: 'Удалить данные узла',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const message = {
sure: 'Onayla',
show: 'Göster',
hide: 'Gizle',
visit: 'Visit',
},
operate: {
start: 'Başlat',
Expand Down Expand Up @@ -3558,6 +3559,8 @@ const message = {
'Bu düğümün lisansa bağlı olmadığı algılandı. Lütfen [Panel Ayarları - Lisans] menüsünde bağlayın ve tekrar deneyin!',
memTotal: 'Toplam Bellek',
nodeManagement: 'Düğüm Yönetimi',
panelManagement: 'Panel Yönetimi',
addPanel: 'Panel Ekle',
addNode: 'Düğüm Ekle',
connInfo: 'Bağlantı Bilgileri',
nodeInfo: 'Düğüm Bilgileri',
Expand Down Expand Up @@ -3616,6 +3619,7 @@ const message = {
fixAPI: 'Düğüm günlüklerini kontrol edin ve güvenlik duvarı portlarının doğru şekilde açıldığını doğrulayın.',
forceDelete: 'Zorla Sil',
operateHelper: 'Aşağıdaki düğümler {0} işlemini geçirecek, devam etmek istiyor musunuz?',
operatePanelHelper: 'Aşağıdaki panellerde {0} işlemi gerçekleştirilecek. Devam etmek istiyor musunuz?',
forceDeleteHelper: 'Zorla silme, düğüm silme hatalarını yok sayar ve veritabanı meta verilerini siler',
uninstall: 'Düğüm verilerini sil',
uninstallHelper: 'Bu, düğümle ilgili tüm 1Panel verilerini silecektir. Dikkatli ilerleyin!',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const message = {
sure: '確定',
show: '顯示',
hide: '隱藏',
visit: '訪問',
},
operate: {
start: '啟動',
Expand Down Expand Up @@ -3278,6 +3279,8 @@ const message = {
nodeUnbindHelper: '檢測到該節點未綁定許可證,請在 [面板設定 - 許可證] 選單中綁定後重試!',
memTotal: '記憶體總計',
nodeManagement: '節點管理',
panelManagement: '面板管理',
addPanel: '添加面板',
addNode: '新增節點',
connInfo: '連接資訊',
nodeInfo: '節點資訊',
Expand Down Expand Up @@ -3327,6 +3330,7 @@ const message = {
fixAPI: '檢查節點日誌,確認防火牆埠是否正常放行。',
forceDelete: '強制刪除',
operateHelper: '將對以下節點執行 {0} 操作,是否繼續?',
operatePanelHelper: '將對以下面板進行 {0} 操作,是否繼續?',
uninstall: '刪除節點資料',
uninstallHelper: '此操作將刪除與節點相關的所有 1Panel 資料,請謹慎選擇!',
forceDeleteHelper: '強制刪除將忽略節點刪除錯誤並刪除資料庫中繼資料',
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const message = {
sure: '确定',
show: '显示',
hide: '隐藏',
visit: '访问',
},
operate: {
start: '启动',
Expand Down Expand Up @@ -3250,6 +3251,8 @@ const message = {
nodeUnbindHelper: '检测到该节点未绑定许可证,请在 [ 面板设置 - 许可证 ] 菜单中绑定后重试!',
memTotal: '内存总计',
nodeManagement: '节点管理',
panelManagement: '面板管理',
addPanel: '添加面板',
addNode: '添加节点',
connInfo: '连接信息',
nodeInfo: '节点信息',
Expand Down Expand Up @@ -3299,6 +3302,7 @@ const message = {
fixAPI: '排查节点日志,检查防火墙端口是否正常放行',
forceDelete: '强制删除',
operateHelper: '将对以下节点进行 {0} 操作,是否继续?',
operatePanelHelper: '将对以下面板进行 {0} 操作,是否继续?',
uninstall: '删除节点数据',
uninstallHelper: '将删除节点所有 1Panel 相关数据,谨慎选择!',
forceDeleteHelper: '强制删除将会忽略节点删除错误,删除数据库元数据',
Expand Down
28 changes: 18 additions & 10 deletions frontend/src/views/setting/panel/api-interface/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,13 @@
</el-alert>
<el-form :model="form" ref="formRef" @submit.prevent v-loading="loading" label-position="top" :rules="rules">
<el-form-item :label="$t('setting.apiKey')" prop="apiKey">
<el-input v-model="form.apiKey" readonly>
<template #suffix>
<CopyButton :content="form.apiKey" class="w-30" />
</template>
<template #append>
<el-button @click="resetApiKey()">
{{ $t('commons.button.reset') }}
</el-button>
</template>
</el-input>
<el-input v-model="form.apiKey" readonly style="width: calc(100% - 225px)" />
<el-button-group>
<CopyButton class="copy_button" :isIcon="false" :content="form.apiKey" />
<el-button @click="resetApiKey()">
{{ $t('commons.button.reset') }}
</el-button>
</el-button-group>
<span class="input-help">{{ $t('setting.apiKeyHelper') }}</span>
</el-form-item>
<el-form-item :label="$t('setting.ipWhiteList')" prop="ipWhiteList">
Expand Down Expand Up @@ -188,3 +185,14 @@ defineExpose({
acceptParams,
});
</script>

<style lang="scss" scoped>
.copy_button {
border-radius: 0px;
border-left-width: 0px;
}
:deep(.el-input__wrapper) {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
</style>
Loading