mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-11 16:00:35 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3f558499e | ||
|
|
69a509b284 | ||
|
|
48d75c19d3 | ||
|
|
b945808dab | ||
|
|
f475500543 | ||
|
|
8415a1ce28 | ||
|
|
faf4933a02 | ||
|
|
c692a9f5e3 | ||
|
|
e7f0c21715 | ||
|
|
da7e8f1dbf | ||
|
|
486cd5d0ad | ||
|
|
00ce5a7b36 | ||
|
|
c17f055e06 | ||
|
|
f22df4b29c | ||
|
|
b9bab90a14 |
@@ -50,13 +50,12 @@ type FirewallBackendOption struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type FirewallBackendFamilyStatus struct {
|
type FirewallBackendFamilyStatus struct {
|
||||||
Partial bool `json:"partial"`
|
Partial bool `json:"partial"`
|
||||||
Available bool `json:"available"`
|
Available bool `json:"available"`
|
||||||
Initialized bool `json:"initialized"`
|
Initialized bool `json:"initialized"`
|
||||||
Bound bool `json:"bound"`
|
Bound bool `json:"bound"`
|
||||||
Reason string `json:"reason,omitempty"`
|
Reason string `json:"reason,omitempty"`
|
||||||
ForwardPolicy string `json:"forwardPolicy,omitempty"`
|
RAInterfaces []string `json:"raInterfaces,omitempty"`
|
||||||
RAInterfaces []string `json:"raInterfaces,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type FirewallBackendGroup struct {
|
type FirewallBackendGroup struct {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package repo
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/1Panel-dev/1Panel/agent/constant"
|
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||||
"github.com/1Panel-dev/1Panel/agent/global"
|
"github.com/1Panel-dev/1Panel/agent/global"
|
||||||
@@ -110,7 +111,9 @@ func (t TaskRepo) Update(ctx context.Context, task *model.Task) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t TaskRepo) UpdateRunningTaskToFailed() error {
|
func (t TaskRepo) UpdateRunningTaskToFailed() error {
|
||||||
return getTaskDb(t.WithByStatus(constant.StatusExecuting)).Model(&model.Task{}).Updates(map[string]interface{}{"status": constant.StatusFailed, "error_msg": "1Panel restart causes failure"}).Error
|
return getTaskDb(t.WithByStatus(constant.StatusExecuting)).Model(&model.Task{}).Updates(map[string]interface{}{
|
||||||
|
"status": constant.StatusFailed, "error_msg": constant.InterruptedMsg, "end_at": time.Now(),
|
||||||
|
}).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t TaskRepo) CountExecutingTask() (int64, error) {
|
func (t TaskRepo) CountExecutingTask() (int64, error) {
|
||||||
|
|||||||
@@ -550,6 +550,11 @@ func (a AppService) installWithHooks(req request.AppInstallCreate, executeScript
|
|||||||
|
|
||||||
installTask, err := task.NewTaskWithOps(appInstall.Name, task.TaskInstall, task.TaskScopeApp, req.TaskID, appInstall.ID)
|
installTask, err := task.NewTaskWithOps(appInstall.Name, task.TaskInstall, task.TaskScopeApp, req.TaskID, appInstall.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
appInstall.Status = constant.StatusInstallErr
|
||||||
|
appInstall.Message = err.Error()
|
||||||
|
if saveErr := appInstallRepo.Save(context.Background(), appInstall); saveErr != nil {
|
||||||
|
err = fmt.Errorf("%w; save failed install status: %v", err, saveErr)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -557,7 +562,7 @@ func (a AppService) installWithHooks(req request.AppInstallCreate, executeScript
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
installApp := func(t *task.Task) error {
|
installApp := func(t *task.Task) (err error) {
|
||||||
if err = copyData(t, app, appDetail, appInstall, req); err != nil {
|
if err = copyData(t, app, appDetail, appInstall, req); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -339,6 +339,11 @@ func operateAppWithLifecycleScripts(install model.AppInstall, req request.AppIns
|
|||||||
|
|
||||||
operationTask, err := task.NewTaskWithOps(install.Name, taskType, task.TaskScopeApp, req.TaskID, install.ID)
|
operationTask, err := task.NewTaskWithOps(install.Name, taskType, task.TaskScopeApp, req.TaskID, install.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
install.Status = constant.StatusUpErr
|
||||||
|
install.Message = err.Error()
|
||||||
|
if saveErr := appInstallRepo.Save(context.Background(), &install); saveErr != nil {
|
||||||
|
return fmt.Errorf("%w; save failed operation status: %v", err, saveErr)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
operation := string(req.Operate)
|
operation := string(req.Operate)
|
||||||
@@ -567,11 +572,15 @@ func (a *AppInstallService) SyncAll(systemInit bool) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for _, i := range allList {
|
for _, i := range allList {
|
||||||
if i.Status == constant.StatusInstalling || i.Status == constant.StatusUpgrading || i.Status == constant.StatusRebuilding || i.Status == constant.StatusUninstalling {
|
if appInstallOperationInterruptedOnRestart(i.Status) {
|
||||||
if systemInit {
|
if systemInit {
|
||||||
i.Status = constant.StatusError
|
i.Status = appInstallOperationFailureStatus(i.Status)
|
||||||
i.Message = "1Panel restart causes the task to terminate"
|
i.Message = constant.InterruptedMsg
|
||||||
_ = appInstallRepo.Save(context.Background(), &i)
|
if err := appInstallRepo.Save(context.Background(), &i); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else if err := syncAppInstallStatus(&i, false); err != nil {
|
||||||
|
global.LOG.Errorf("sync install app[%s] error,mgs: %s", i.Name, err.Error())
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -931,10 +940,34 @@ func (a *AppInstallService) GetParams(id uint) (*response.AppConfig, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func syncAppInstallStatus(appInstall *model.AppInstall, force bool) error {
|
func syncAppInstallStatus(appInstall *model.AppInstall, force bool) error {
|
||||||
|
operation := ""
|
||||||
|
switch appInstall.Status {
|
||||||
|
case constant.StatusInstalling:
|
||||||
|
operation = task.TaskInstall
|
||||||
|
case constant.StatusUpgrading:
|
||||||
|
operation = task.TaskUpgrade
|
||||||
|
case constant.StatusRebuilding:
|
||||||
|
operation = task.TaskBuild
|
||||||
|
case constant.StatusUninstalling:
|
||||||
|
operation = task.TaskUninstall
|
||||||
|
case constant.StatusStarting, constant.StatusWaiting:
|
||||||
|
operation = task.TaskUpdate
|
||||||
|
case constant.StatusRestarting:
|
||||||
|
operation = task.TaskRestart
|
||||||
|
}
|
||||||
|
if operation != "" {
|
||||||
|
if err := reconcileAppInstallTaskFailure(appInstall, operation, global.DB, global.TaskDB); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
switch appInstall.Status {
|
switch appInstall.Status {
|
||||||
case constant.StatusInstalling, constant.StatusRebuilding, constant.StatusUpgrading, constant.StatusUninstalling,
|
case constant.StatusInstalling, constant.StatusRebuilding, constant.StatusUpgrading, constant.StatusUninstalling,
|
||||||
constant.StatusStarting, constant.StatusRestarting, constant.StatusWaiting:
|
constant.StatusStarting, constant.StatusRestarting, constant.StatusWaiting:
|
||||||
return nil
|
return nil
|
||||||
|
case constant.StatusInstallErr, constant.StatusUpgradeErr, constant.StatusUpErr:
|
||||||
|
if !force {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cli, err := docker.NewClient()
|
cli, err := docker.NewClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/app/model"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
)
|
||||||
|
|
||||||
|
func appInstallOperationFailureStatus(status string) string {
|
||||||
|
switch status {
|
||||||
|
case constant.StatusInstalling:
|
||||||
|
return constant.StatusInstallErr
|
||||||
|
case constant.StatusUpgrading:
|
||||||
|
return constant.StatusUpgradeErr
|
||||||
|
case constant.StatusUninstalling:
|
||||||
|
return constant.StatusError
|
||||||
|
default:
|
||||||
|
return constant.StatusUpErr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func appInstallOperationPending(status string) bool {
|
||||||
|
switch status {
|
||||||
|
case constant.StatusInstalling, constant.StatusRebuilding, constant.StatusUpgrading, constant.StatusUninstalling,
|
||||||
|
constant.StatusStarting, constant.StatusRestarting, constant.StatusWaiting:
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func appInstallOperationInterruptedOnRestart(status string) bool {
|
||||||
|
// ReStarting can also describe a container's Docker restart policy.
|
||||||
|
return appInstallOperationPending(status) && status != constant.StatusRestarting
|
||||||
|
}
|
||||||
|
|
||||||
|
func reconcileAppInstallTaskFailure(install *model.AppInstall, operation string, appDB, taskDB *gorm.DB) error {
|
||||||
|
if !appInstallOperationPending(install.Status) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
var operationTask model.Task
|
||||||
|
err := taskDB.Where("type = ? AND resource_id = ? AND operate = ?", "App", install.ID, operation).
|
||||||
|
Order("created_at DESC").First(&operationTask).Error
|
||||||
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if operationTask.Status != constant.StatusFailed && operationTask.Status != constant.StatusCanceled {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// A previous operation must not turn a newly queued retry into a failure.
|
||||||
|
if operationTask.CreatedAt.Before(install.UpdatedAt) &&
|
||||||
|
(operationTask.EndAt.IsZero() || operationTask.EndAt.Before(install.UpdatedAt)) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
message := operationTask.ErrorMsg
|
||||||
|
if message == "" {
|
||||||
|
message = "the application operation task failed"
|
||||||
|
}
|
||||||
|
status := appInstallOperationFailureStatus(install.Status)
|
||||||
|
result := appDB.Model(&model.AppInstall{}).
|
||||||
|
Where("id = ? AND status = ? AND updated_at = ?", install.ID, install.Status, install.UpdatedAt).
|
||||||
|
Updates(map[string]interface{}{"status": status, "message": message})
|
||||||
|
if result.Error != nil {
|
||||||
|
return result.Error
|
||||||
|
}
|
||||||
|
if result.RowsAffected > 0 {
|
||||||
|
install.Status = status
|
||||||
|
install.Message = message
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"path/filepath"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/app/model"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||||
|
"github.com/glebarez/sqlite"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
"gorm.io/gorm/clause"
|
||||||
|
"gorm.io/gorm/logger"
|
||||||
|
)
|
||||||
|
|
||||||
|
func operationStatusTestDB(t *testing.T) (*gorm.DB, *gorm.DB, model.AppInstall) {
|
||||||
|
t.Helper()
|
||||||
|
open := func(name string, schema interface{}) *gorm.DB {
|
||||||
|
db, err := gorm.Open(sqlite.Open(filepath.Join(t.TempDir(), name)), &gorm.Config{
|
||||||
|
Logger: logger.Default.LogMode(logger.Silent),
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := db.AutoMigrate(schema); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
t.Cleanup(func() {
|
||||||
|
sqlDB, _ := db.DB()
|
||||||
|
if sqlDB != nil {
|
||||||
|
_ = sqlDB.Close()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return db
|
||||||
|
}
|
||||||
|
appDB := open("apps.db", &model.AppInstall{})
|
||||||
|
taskDB := open("tasks.db", &model.Task{})
|
||||||
|
install := model.AppInstall{
|
||||||
|
Name: "gb10-ds-vision", AppId: 1, AppDetailId: 1,
|
||||||
|
Version: "nvidia-gb10-dspark-0.1.1", ContainerName: "vllm-dspark-1", ServiceName: "vllm-dspark",
|
||||||
|
Status: constant.StatusStarting, Env: `{"MODEL_DIR":"/models/vision"}`,
|
||||||
|
}
|
||||||
|
if err := appDB.Omit(clause.Associations).Create(&install).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
return appDB, taskDB, install
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppInstallFailedTaskRecoversPendingState(t *testing.T) {
|
||||||
|
for _, state := range []string{constant.StatusStarting, constant.StatusWaiting, constant.StatusRestarting, constant.StatusInstalling} {
|
||||||
|
t.Run(state, func(t *testing.T) {
|
||||||
|
appDB, taskDB, install := operationStatusTestDB(t)
|
||||||
|
install.Status = state
|
||||||
|
if err := appDB.Omit(clause.Associations).Save(&install).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
task := model.Task{ID: "failed", Type: "App", Operate: "TaskUpdate", ResourceID: install.ID,
|
||||||
|
Status: constant.StatusFailed, ErrorMsg: "model startup script failed", CreatedAt: install.UpdatedAt.Add(time.Second), EndAt: install.UpdatedAt.Add(2 * time.Second)}
|
||||||
|
if err := taskDB.Create(&task).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := reconcileAppInstallTaskFailure(&install, task.Operate, appDB, taskDB); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
want := constant.StatusUpErr
|
||||||
|
if state == constant.StatusInstalling {
|
||||||
|
want = constant.StatusInstallErr
|
||||||
|
}
|
||||||
|
var stored model.AppInstall
|
||||||
|
if err := appDB.First(&stored, install.ID).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if install.Status != want || stored.Status != want || stored.Message != task.ErrorMsg || stored.Env != install.Env {
|
||||||
|
t.Fatalf("recovered state = %s/%s, message %q, env %q", install.Status, stored.Status, stored.Message, stored.Env)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppInstallPendingStateKeepsActiveAndUnrelatedTasks(t *testing.T) {
|
||||||
|
for _, taskStatus := range []string{constant.StatusExecuting, constant.StatusSuccess, "missing", "previous-failure", "other-resource"} {
|
||||||
|
t.Run(taskStatus, func(t *testing.T) {
|
||||||
|
appDB, taskDB, install := operationStatusTestDB(t)
|
||||||
|
task := model.Task{ID: "task", Type: "App", Operate: "TaskUpdate", ResourceID: install.ID,
|
||||||
|
Status: taskStatus, CreatedAt: install.UpdatedAt.Add(time.Second), EndAt: install.UpdatedAt.Add(2 * time.Second)}
|
||||||
|
if taskStatus == "previous-failure" {
|
||||||
|
task.Status = constant.StatusFailed
|
||||||
|
task.CreatedAt = install.UpdatedAt.Add(-2 * time.Hour)
|
||||||
|
task.EndAt = install.UpdatedAt.Add(-time.Hour)
|
||||||
|
}
|
||||||
|
if taskStatus == "other-resource" {
|
||||||
|
task.Status = constant.StatusFailed
|
||||||
|
task.ResourceID++
|
||||||
|
}
|
||||||
|
if taskStatus != "missing" {
|
||||||
|
if err := taskDB.Create(&task).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err := reconcileAppInstallTaskFailure(&install, task.Operate, appDB, taskDB); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if install.Status != constant.StatusStarting {
|
||||||
|
t.Fatalf("unrelated or active task changed pending state to %s", install.Status)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppInstallRecoveryDoesNotOverwriteConcurrentRetry(t *testing.T) {
|
||||||
|
appDB, taskDB, install := operationStatusTestDB(t)
|
||||||
|
task := model.Task{ID: "failed", Type: "App", Operate: "TaskUpdate", ResourceID: install.ID,
|
||||||
|
Status: constant.StatusCanceled, ErrorMsg: "interrupted", CreatedAt: install.UpdatedAt.Add(time.Second), EndAt: install.UpdatedAt.Add(2 * time.Second)}
|
||||||
|
if err := taskDB.Create(&task).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := appDB.Callback().Update().Before("gorm:update").Register("new-operation", func(db *gorm.DB) {
|
||||||
|
if err := db.Exec("UPDATE app_installs SET updated_at = ?, message = ? WHERE id = ?", install.UpdatedAt.Add(time.Hour), "new attempt", install.ID).Error; err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
}); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if err := reconcileAppInstallTaskFailure(&install, task.Operate, appDB, taskDB); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
var stored model.AppInstall
|
||||||
|
if err := appDB.First(&stored, install.ID).Error; err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if stored.Status != constant.StatusStarting || stored.Message != "new attempt" {
|
||||||
|
t.Fatalf("recovery overwrote a newer operation: %s, %s", stored.Status, stored.Message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestAppInstallRestartRecoveryCoversLifecycleStates(t *testing.T) {
|
||||||
|
for _, state := range []string{constant.StatusStarting, constant.StatusWaiting, constant.StatusInstalling} {
|
||||||
|
if !appInstallOperationInterruptedOnRestart(state) {
|
||||||
|
t.Errorf("restart recovery omitted %s", state)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for _, state := range []string{constant.StatusRunning, constant.StatusStopped, constant.StatusRestarting} {
|
||||||
|
if appInstallOperationInterruptedOnRestart(state) {
|
||||||
|
t.Errorf("restart recovery changes a Docker runtime state: %s", state)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1406,9 +1406,8 @@ func handleErr(install model.AppInstall, err error, out string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func doNotNeedSync(installed model.AppInstall) bool {
|
func doNotNeedSync(installed model.AppInstall) bool {
|
||||||
return installed.Status == constant.StatusInstalling || installed.Status == constant.StatusRebuilding || installed.Status == constant.StatusUpgrading ||
|
return appInstallOperationPending(installed.Status) || installed.Status == constant.StatusSyncing ||
|
||||||
installed.Status == constant.StatusSyncing || installed.Status == constant.StatusUninstalling || installed.Status == constant.StatusInstallErr ||
|
installed.Status == constant.StatusInstallErr || installed.Status == constant.StatusUpgradeErr || installed.Status == constant.StatusUpErr
|
||||||
installed.Status == constant.StatusStarting || installed.Status == constant.StatusRestarting || installed.Status == constant.StatusWaiting
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func synAppInstall(containers map[string]container.Summary, appInstall *model.AppInstall, force bool) {
|
func synAppInstall(containers map[string]container.Summary, appInstall *model.AppInstall, force bool) {
|
||||||
@@ -1502,6 +1501,11 @@ func handleInstalled(appInstallList []model.AppInstall, updated, sync, checkUpda
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, installed := range appInstallList {
|
for _, installed := range appInstallList {
|
||||||
|
if sync && appInstallOperationPending(installed.Status) {
|
||||||
|
if err := syncAppInstallStatus(&installed, false); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
if updated && ignoreUpdate(installed) {
|
if updated && ignoreUpdate(installed) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -383,11 +383,6 @@ func (u *ContainerService) Inspect(req dto.InspectReq) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *ContainerService) Prune(req dto.ContainerPrune) error {
|
func (u *ContainerService) Prune(req dto.ContainerPrune) error {
|
||||||
client, err := docker.NewDockerClient()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer client.Close()
|
|
||||||
name := ""
|
name := ""
|
||||||
switch req.PruneType {
|
switch req.PruneType {
|
||||||
case "container":
|
case "container":
|
||||||
@@ -408,6 +403,14 @@ func (u *ContainerService) Prune(req dto.ContainerPrune) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
taskItem.AddSubTask(i18n.GetMsgByKey("TaskClean"), func(t *task.Task) error {
|
taskItem.AddSubTask(i18n.GetMsgByKey("TaskClean"), func(t *task.Task) error {
|
||||||
|
if err := t.TaskCtx.Err(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
client, err := docker.NewDockerClient()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer client.Close()
|
||||||
pruneFilters := filters.NewArgs()
|
pruneFilters := filters.NewArgs()
|
||||||
if req.WithTagAll {
|
if req.WithTagAll {
|
||||||
pruneFilters.Add("dangling", "false")
|
pruneFilters.Add("dangling", "false")
|
||||||
@@ -431,10 +434,7 @@ func (u *ContainerService) Prune(req dto.ContainerPrune) error {
|
|||||||
}
|
}
|
||||||
SpaceReclaimed = int(rep.SpaceReclaimed)
|
SpaceReclaimed = int(rep.SpaceReclaimed)
|
||||||
case "network":
|
case "network":
|
||||||
_, err := client.NetworksPrune(context.Background(), pruneFilters)
|
return cleanUnusedNetworks(t, client)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
case "volume":
|
case "volume":
|
||||||
versions, err := client.ServerVersion(context.Background())
|
versions, err := client.ServerVersion(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -2,16 +2,24 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/1Panel-dev/1Panel/agent/app/dto"
|
"github.com/1Panel-dev/1Panel/agent/app/dto"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/app/task"
|
||||||
"github.com/1Panel-dev/1Panel/agent/buserr"
|
"github.com/1Panel-dev/1Panel/agent/buserr"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/i18n"
|
||||||
"github.com/1Panel-dev/1Panel/agent/utils/docker"
|
"github.com/1Panel-dev/1Panel/agent/utils/docker"
|
||||||
|
"github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/api/types/network"
|
"github.com/docker/docker/api/types/network"
|
||||||
|
"github.com/docker/docker/client"
|
||||||
|
"github.com/docker/docker/errdefs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var networkCleanupSlot = make(chan struct{}, 1)
|
||||||
|
|
||||||
func (u *ContainerService) PageNetwork(req dto.SearchWithPage) (int64, interface{}, error) {
|
func (u *ContainerService) PageNetwork(req dto.SearchWithPage) (int64, interface{}, error) {
|
||||||
client, err := docker.NewDockerClient()
|
client, err := docker.NewDockerClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -172,3 +180,114 @@ func (u *ContainerService) CreateNetwork(req dto.NetworkCreate) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func cleanUnusedNetworks(t *task.Task, cli *client.Client) error {
|
||||||
|
ctx := t.TaskCtx
|
||||||
|
select {
|
||||||
|
case networkCleanupSlot <- struct{}{}:
|
||||||
|
defer func() { <-networkCleanupSlot }()
|
||||||
|
case <-ctx.Done():
|
||||||
|
return ctx.Err()
|
||||||
|
}
|
||||||
|
if err := ctx.Err(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
networks, err := cli.NetworkList(ctx, network.ListOptions{})
|
||||||
|
if err != nil {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return ctx.Err()
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
deleted, skipped, failed := 0, 0, 0
|
||||||
|
defer func() {
|
||||||
|
t.Log(i18n.GetMsgWithMap("NetworkCleanupSummary", map[string]interface{}{
|
||||||
|
"deleted": deleted, "skipped": skipped, "failed": failed,
|
||||||
|
}))
|
||||||
|
}()
|
||||||
|
var used map[string]bool
|
||||||
|
sort.Slice(networks, func(i, j int) bool { return networks[i].Name < networks[j].Name })
|
||||||
|
for _, n := range networks {
|
||||||
|
if err := ctx.Err(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
switch n.Name {
|
||||||
|
case "none", "host", "bridge", "1panel-network":
|
||||||
|
skipped++
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if n.Scope != "local" || n.Ingress || n.ConfigOnly {
|
||||||
|
skipped++
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
values := map[string]interface{}{"name": n.Name, "id": n.ID}
|
||||||
|
if used == nil {
|
||||||
|
containers, err := cli.ContainerList(ctx, container.ListOptions{All: true})
|
||||||
|
if err != nil {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return ctx.Err()
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
used = make(map[string]bool)
|
||||||
|
for _, c := range containers {
|
||||||
|
if c.NetworkSettings == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
for name, endpoint := range c.NetworkSettings.Networks {
|
||||||
|
used[name] = true
|
||||||
|
if endpoint != nil {
|
||||||
|
used[endpoint.NetworkID] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if used[n.Name] || used[n.ID] {
|
||||||
|
skipped++
|
||||||
|
t.Log(i18n.GetMsgWithMap("NetworkCleanupConnected", values))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
inspected, err := cli.NetworkInspect(ctx, n.ID, network.InspectOptions{})
|
||||||
|
if err != nil {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return ctx.Err()
|
||||||
|
}
|
||||||
|
if errdefs.IsNotFound(err) {
|
||||||
|
skipped++
|
||||||
|
} else {
|
||||||
|
failed++
|
||||||
|
t.Logf("Failed to inspect network [%s] (%s): %v", n.Name, n.ID, err)
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if len(inspected.Containers) > 0 {
|
||||||
|
skipped++
|
||||||
|
t.Log(i18n.GetMsgWithMap("NetworkCleanupConnected", values))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if err := cli.NetworkRemove(ctx, n.ID); err != nil {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return ctx.Err()
|
||||||
|
}
|
||||||
|
switch {
|
||||||
|
case errdefs.IsNotFound(err):
|
||||||
|
skipped++
|
||||||
|
case errdefs.IsConflict(err):
|
||||||
|
skipped++
|
||||||
|
t.Log(i18n.GetMsgWithMap("NetworkCleanupConnected", values))
|
||||||
|
default:
|
||||||
|
failed++
|
||||||
|
t.Logf("Failed to remove network [%s] (%s): %v", n.Name, n.ID, err)
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
deleted++
|
||||||
|
}
|
||||||
|
if err := ctx.Err(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if failed > 0 {
|
||||||
|
return errors.New(i18n.GetMsgByKey("NetworkCleanupPartialFailure"))
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -108,9 +108,7 @@ func (s *FirewallService) LoadBaseInfo(chainGroup string) (dto.FirewallSubsystem
|
|||||||
status.Reason = constant.FirewallBackendNotInstalled
|
status.Reason = constant.FirewallBackendNotInstalled
|
||||||
return status, nil
|
return status, nil
|
||||||
}
|
}
|
||||||
status.IsExist = true
|
return status, err
|
||||||
status.Message = err.Error()
|
|
||||||
return status, nil
|
|
||||||
}
|
}
|
||||||
status.IsExist = true
|
status.IsExist = true
|
||||||
runtimeStatus, err := lifecycle.LoadStatus(client)
|
runtimeStatus, err := lifecycle.LoadStatus(client)
|
||||||
|
|||||||
@@ -1185,15 +1185,17 @@ func loadForwardingFirewallOverview(manager forwarding.Adapter, families []strin
|
|||||||
}
|
}
|
||||||
ipv6, ipv6Err := loadForwardingFamilyInfo(manager, constant.FirewallFamilyIPv6)
|
ipv6, ipv6Err := loadForwardingFamilyInfo(manager, constant.FirewallFamilyIPv6)
|
||||||
if ipv6.Available {
|
if ipv6.Available {
|
||||||
interfaces, err := forwarding.IPv6RAInterfaces(os.ReadFile)
|
interfaces, err := forwarding.IPv6RAInterfaces(os.ReadFile, forwarding.LoadDockerIPv4BridgePorts)
|
||||||
var pathError *os.PathError
|
var pathError *os.PathError
|
||||||
switch {
|
switch {
|
||||||
case errors.As(err, &pathError) && errors.Is(err, os.ErrNotExist) && pathError.Path == "/proc/net/if_inet6":
|
case errors.As(err, &pathError) && errors.Is(err, os.ErrNotExist) && pathError.Path == "/proc/net/if_inet6":
|
||||||
ipv6.Available, ipv6.Initialized, ipv6.Bound = false, false, false
|
ipv6.Available, ipv6.Initialized, ipv6.Bound = false, false, false
|
||||||
case err != nil:
|
case err != nil:
|
||||||
|
global.LOG.Warnf("IPv6 forwarding RA check failed: %v", err)
|
||||||
ipv6.Reason = "ipv6_ra_check_failed"
|
ipv6.Reason = "ipv6_ra_check_failed"
|
||||||
ipv6.Bound = false
|
ipv6.Bound = false
|
||||||
case len(interfaces) > 0:
|
case len(interfaces) > 0:
|
||||||
|
global.LOG.Warnf("IPv6 forwarding RA risk: interfaces %s may depend on RA/SLAAC with accept_ra=1", strings.Join(interfaces, ", "))
|
||||||
ipv6.Reason, ipv6.RAInterfaces = "ipv6_ra_required", interfaces
|
ipv6.Reason, ipv6.RAInterfaces = "ipv6_ra_required", interfaces
|
||||||
ipv6.Bound = false
|
ipv6.Bound = false
|
||||||
case !ipv6.Bound:
|
case !ipv6.Bound:
|
||||||
|
|||||||
@@ -9,13 +9,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/1Panel-dev/1Panel/agent/app/dto"
|
"github.com/1Panel-dev/1Panel/agent/app/dto"
|
||||||
"github.com/1Panel-dev/1Panel/agent/app/task"
|
"github.com/1Panel-dev/1Panel/agent/app/task"
|
||||||
"github.com/1Panel-dev/1Panel/agent/constant"
|
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||||
"github.com/1Panel-dev/1Panel/agent/global"
|
|
||||||
"github.com/1Panel-dev/1Panel/agent/utils/cmd"
|
|
||||||
"github.com/1Panel-dev/1Panel/agent/utils/firewall"
|
"github.com/1Panel-dev/1Panel/agent/utils/firewall"
|
||||||
"github.com/1Panel-dev/1Panel/agent/utils/firewall/filter"
|
"github.com/1Panel-dev/1Panel/agent/utils/firewall/filter"
|
||||||
"github.com/1Panel-dev/1Panel/agent/utils/firewall/forwarding"
|
"github.com/1Panel-dev/1Panel/agent/utils/firewall/forwarding"
|
||||||
@@ -82,23 +79,6 @@ func (s *ForwardingService) LoadBaseInfo(ctx context.Context) (dto.FirewallSubsy
|
|||||||
baseInfo.PingStatus = firewall.LoadPingStatus()
|
baseInfo.PingStatus = firewall.LoadPingStatus()
|
||||||
baseInfo.IsInit, baseInfo.IsBind = status.IsInit, status.IsBind
|
baseInfo.IsInit, baseInfo.IsBind = status.IsInit, status.IsBind
|
||||||
baseInfo.IPv4, baseInfo.IPv6 = status.IPv4, status.IPv6
|
baseInfo.IPv4, baseInfo.IPv6 = status.IPv4, status.IPv6
|
||||||
for _, family := range []struct {
|
|
||||||
command string
|
|
||||||
status *dto.FirewallBackendFamilyStatus
|
|
||||||
}{
|
|
||||||
{"iptables", &baseInfo.IPv4},
|
|
||||||
{"ip6tables", &baseInfo.IPv6},
|
|
||||||
} {
|
|
||||||
if family.command == "ip6tables" && !baseInfo.IPv6Enabled {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
policy, err := loadForwardPolicy(ctx, family.command)
|
|
||||||
if err != nil {
|
|
||||||
global.LOG.Warnf("inspect %s FORWARD policy: %v", family.command, err)
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
family.status.ForwardPolicy = policy
|
|
||||||
}
|
|
||||||
return baseInfo, nil
|
return baseInfo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -308,26 +288,3 @@ func (s *ForwardingService) Restore(ctx context.Context) error {
|
|||||||
func NewIForwardingService() IForwardingService {
|
func NewIForwardingService() IForwardingService {
|
||||||
return newForwardingService()
|
return newForwardingService()
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadForwardPolicy(ctx context.Context, command string) (string, error) {
|
|
||||||
if !cmd.Which(command) {
|
|
||||||
command += "-nft"
|
|
||||||
if !cmd.Which(command) {
|
|
||||||
return "", nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
output, err := cmd.NewCommandMgr(cmd.WithContext(ctx), cmd.WithTimeout(5*time.Second)).RunWithOptionalSudoAndStdout(command, "-t", "filter", "-w", "2", "-S", "FORWARD")
|
|
||||||
if err != nil {
|
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
for _, line := range strings.Split(output, "\n") {
|
|
||||||
fields := strings.Fields(line)
|
|
||||||
if len(fields) == 3 && fields[0] == "-P" && fields[1] == "FORWARD" {
|
|
||||||
if fields[2] != "ACCEPT" && fields[2] != "DROP" {
|
|
||||||
return "", fmt.Errorf("unexpected FORWARD policy: %s", fields[2])
|
|
||||||
}
|
|
||||||
return fields[2], nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "", errors.New("FORWARD default policy was not found")
|
|
||||||
}
|
|
||||||
|
|||||||
+30
-16
@@ -5,7 +5,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -28,6 +27,7 @@ import (
|
|||||||
"github.com/docker/docker/api/types/container"
|
"github.com/docker/docker/api/types/container"
|
||||||
"github.com/docker/docker/api/types/image"
|
"github.com/docker/docker/api/types/image"
|
||||||
"github.com/docker/docker/api/types/registry"
|
"github.com/docker/docker/api/types/registry"
|
||||||
|
"github.com/docker/docker/pkg/jsonmessage"
|
||||||
"github.com/moby/go-archive"
|
"github.com/moby/go-archive"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -325,18 +325,16 @@ func (u *ImageService) ImageLoad(req dto.ImageLoad) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
client, err := docker.NewDockerClient()
|
|
||||||
if err != nil {
|
|
||||||
taskItem.Log("Failed to create Docker client: " + err.Error())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
defer client.Close()
|
|
||||||
|
|
||||||
for _, itemPath := range req.Paths {
|
for _, itemPath := range req.Paths {
|
||||||
currentPath := itemPath
|
currentPath := itemPath
|
||||||
itemName := path.Base(currentPath)
|
itemName := path.Base(currentPath)
|
||||||
taskItem.AddSubTask(i18n.GetWithName("TaskImport", itemName), func(t *task.Task) error {
|
taskItem.AddSubTask(i18n.GetWithName("TaskImport", itemName), func(t *task.Task) error {
|
||||||
taskItem.Logf("----------------- %s -----------------", itemName)
|
taskItem.Logf("----------------- %s -----------------", itemName)
|
||||||
|
client, err := docker.NewDockerClient()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer client.Close()
|
||||||
file, err := os.Open(currentPath)
|
file, err := os.Open(currentPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -347,14 +345,7 @@ func (u *ImageService) ImageLoad(req dto.ImageLoad) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
content, err := io.ReadAll(res.Body)
|
return consumeImageLoadResponse(res.Body, taskItem.Log)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if strings.Contains(string(content), "Error") {
|
|
||||||
return errors.New(string(content))
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}, nil)
|
}, nil)
|
||||||
}
|
}
|
||||||
_ = taskItem.Execute()
|
_ = taskItem.Execute()
|
||||||
@@ -362,6 +353,29 @@ func (u *ImageService) ImageLoad(req dto.ImageLoad) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Docker may report load failures in a successful HTTP response's JSON stream.
|
||||||
|
func consumeImageLoadResponse(reader io.Reader, log func(string)) error {
|
||||||
|
decoder := json.NewDecoder(reader)
|
||||||
|
for {
|
||||||
|
var message jsonmessage.JSONMessage
|
||||||
|
if err := decoder.Decode(&message); err != nil {
|
||||||
|
if errors.Is(err, io.EOF) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if message.Error != nil && message.Error.Message != "" {
|
||||||
|
return message.Error
|
||||||
|
}
|
||||||
|
if message.ErrorMessage != "" {
|
||||||
|
return errors.New(message.ErrorMessage)
|
||||||
|
}
|
||||||
|
if text := strings.TrimSpace(message.Stream); text != "" {
|
||||||
|
log(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (u *ImageService) ImageSave(req dto.ImageSave) error {
|
func (u *ImageService) ImageSave(req dto.ImageSave) error {
|
||||||
taskItem, err := task.NewTaskWithOps(req.Name, task.TaskExport, task.TaskScopeImage, req.TaskID, 1)
|
taskItem, err := task.NewTaskWithOps(req.Name, task.TaskExport, task.TaskScopeImage, req.TaskID, 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -57,7 +57,10 @@ func (u *TaskLogService) ReadByLine(req request.TaskLogReadReq) (*response.FileL
|
|||||||
if req.TaskID != "" {
|
if req.TaskID != "" {
|
||||||
opts = append(opts, taskRepo.WithByID(req.TaskID))
|
opts = append(opts, taskRepo.WithByID(req.TaskID))
|
||||||
} else {
|
} else {
|
||||||
opts = append(opts, repo.WithOrderRuleBy("created_at", "desc"), repo.WithByType(req.TaskType), taskRepo.WithOperate(req.TaskOperate), taskRepo.WithResourceID(req.ResourceID))
|
opts = append(opts, repo.WithOrderRuleBy("created_at", "desc"), repo.WithByType(req.TaskType), taskRepo.WithResourceID(req.ResourceID))
|
||||||
|
if req.TaskOperate != "" {
|
||||||
|
opts = append(opts, taskRepo.WithOperate(req.TaskOperate))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
taskModel, err := taskRepo.GetFirst(opts...)
|
taskModel, err := taskRepo.GetFirst(opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -258,7 +258,15 @@ func (s *SubTask) Execute() error {
|
|||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
s.RootTask.Log(i18n.GetWithName("TaskTimeout", subTaskName))
|
s.RootTask.Log(i18n.GetWithName("TaskTimeout", subTaskName))
|
||||||
err = errors.New("timeout!")
|
err = errors.New("timeout!")
|
||||||
|
if s.RootTask.Task.Type == TaskScopeVm {
|
||||||
|
<-done
|
||||||
|
}
|
||||||
case err = <-done:
|
case err = <-done:
|
||||||
|
if s.RootTask.Task.Type == TaskScopeVm && ctx.Err() != nil {
|
||||||
|
s.RootTask.Log(i18n.GetWithName("TaskTimeout", subTaskName))
|
||||||
|
err = errors.New("timeout!")
|
||||||
|
break
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.RootTask.Log(i18n.GetWithNameAndErr("SubTaskFailed", subTaskName, err))
|
s.RootTask.Log(i18n.GetWithNameAndErr("SubTaskFailed", subTaskName, err))
|
||||||
if err.Error() == i18n.GetMsgByKey("ErrShutDown") {
|
if err.Error() == i18n.GetMsgByKey("ErrShutDown") {
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'Build Cache'
|
|||||||
Volume: 'Volume'
|
Volume: 'Volume'
|
||||||
Network: "Network"
|
Network: "Network"
|
||||||
PruneStart: 'Cleaning in progress'
|
PruneStart: 'Cleaning in progress'
|
||||||
|
NetworkCleanupConnected: "Skipped network [{{ .name }}] ({{ .id }}): containers connected or network in use; not deleted"
|
||||||
|
NetworkCleanupSummary: "Network cleanup finished: deleted {{ .deleted }}, skipped {{ .skipped }}, failed {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "Some networks could not be cleaned; see the task log"
|
||||||
ContainerBackupPrepare: 'Prepare container backup workspace'
|
ContainerBackupPrepare: 'Prepare container backup workspace'
|
||||||
ContainerBackupStop: 'Stop container before backup'
|
ContainerBackupStop: 'Stop container before backup'
|
||||||
ContainerBackupInspect: 'Backup container inspect and network'
|
ContainerBackupInspect: 'Backup container inspect and network'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "IPv4 forwarding is disabled. Set net.ipv4.ip_f
|
|||||||
ErrFirewallRuleSavedApplyFailed: "The new rule configuration was saved, but applying it to the firewall failed. Retry by synchronizing: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "The new rule configuration was saved, but applying it to the firewall failed. Retry by synchronizing: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "A UFW rule with the same match conditions and a different action already exists. Edit the existing rule instead."
|
ErrFirewallRuleConflict: "A UFW rule with the same match conditions and a different action already exists. Edit the existing rule instead."
|
||||||
ErrForwardInterfaceNotFound: "Network interface {{ .name }} specified by the forwarding rule does not exist. Check the interface name and retry."
|
ErrForwardInterfaceNotFound: "Network interface {{ .name }} specified by the forwarding rule does not exist. Check the interface name and retry."
|
||||||
|
ErrIPv6RARisk: "IPv6 forwarding is blocked to prevent possible network loss. See the documentation and system logs for details."
|
||||||
|
ErrIPv6RACheckFailed: "IPv6 forwarding is blocked because the network configuration could not be checked. See the system logs for details."
|
||||||
|
|
||||||
ErrSSHPublicKey: "Enter a valid SSH public key"
|
ErrSSHPublicKey: "Enter a valid SSH public key"
|
||||||
ErrSSHPrivateKey: "Invalid SSH private key or incorrect passphrase; encrypted keys require the original passphrase"
|
ErrSSHPrivateKey: "Invalid SSH private key or incorrect passphrase; encrypted keys require the original passphrase"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'Caché de compilación'
|
|||||||
Volume: 'Volumen de almacenamiento'
|
Volume: 'Volumen de almacenamiento'
|
||||||
Network: 'Red'
|
Network: 'Red'
|
||||||
PruneStart: 'Limpiando en progreso espere...'
|
PruneStart: 'Limpiando en progreso espere...'
|
||||||
|
NetworkCleanupConnected: "Se omitió la red [{{ .name }}] ({{ .id }}): hay contenedores conectados o la red está en uso; no se eliminó"
|
||||||
|
NetworkCleanupSummary: "Limpieza de redes finalizada: eliminadas {{ .deleted }}, omitidas {{ .skipped }}, fallidas {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "No se pudieron limpiar algunas redes; consulte el registro de la tarea"
|
||||||
ContainerBackupPrepare: 'Preparar espacio de respaldo del contenedor'
|
ContainerBackupPrepare: 'Preparar espacio de respaldo del contenedor'
|
||||||
ContainerBackupStop: 'Detener contenedor antes del respaldo'
|
ContainerBackupStop: 'Detener contenedor antes del respaldo'
|
||||||
ContainerBackupInspect: 'Respaldar inspect y red del contenedor'
|
ContainerBackupInspect: 'Respaldar inspect y red del contenedor'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "El reenvío IPv4 está desactivado. Configure
|
|||||||
ErrFirewallRuleSavedApplyFailed: "Se guardó la configuración de la nueva regla, pero no se pudo aplicar al cortafuegos. Vuelva a intentarlo mediante la sincronización: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "Se guardó la configuración de la nueva regla, pero no se pudo aplicar al cortafuegos. Vuelva a intentarlo mediante la sincronización: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "Ya existe una regla UFW con las mismas condiciones y una acción diferente. Edite la regla existente."
|
ErrFirewallRuleConflict: "Ya existe una regla UFW con las mismas condiciones y una acción diferente. Edite la regla existente."
|
||||||
ErrForwardInterfaceNotFound: "La interfaz de red {{ .name }} indicada en la regla de reenvío no existe. Compruebe el nombre e inténtelo de nuevo."
|
ErrForwardInterfaceNotFound: "La interfaz de red {{ .name }} indicada en la regla de reenvío no existe. Compruebe el nombre e inténtelo de nuevo."
|
||||||
|
ErrIPv6RARisk: "El reenvío IPv6 está bloqueado para evitar una posible pérdida de conectividad. Consulte la documentación y los registros del sistema."
|
||||||
|
ErrIPv6RACheckFailed: "El reenvío IPv6 está bloqueado porque no se pudo comprobar la configuración de red. Consulte los registros del sistema."
|
||||||
|
|
||||||
ErrSSHPublicKey: "Introduce una clave pública SSH válida"
|
ErrSSHPublicKey: "Introduce una clave pública SSH válida"
|
||||||
ErrSSHPrivateKey: "Clave privada SSH no válida o contraseña incorrecta; las claves cifradas requieren la contraseña original"
|
ErrSSHPrivateKey: "Clave privada SSH no válida o contraseña incorrecta; las claves cifradas requieren la contraseña original"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'کش ساخت'
|
|||||||
Volume: 'حجم'
|
Volume: 'حجم'
|
||||||
Network: "شبکه"
|
Network: "شبکه"
|
||||||
PruneStart: 'پاکسازی در حال انجام است'
|
PruneStart: 'پاکسازی در حال انجام است'
|
||||||
|
NetworkCleanupConnected: "از شبکه [{{ .name }}] ({{ .id }}) صرفنظر شد: کانتینر متصل دارد یا در حال استفاده است؛ حذف نشد"
|
||||||
|
NetworkCleanupSummary: "پاکسازی شبکهها پایان یافت: حذفشده {{ .deleted }}، ردشده {{ .skipped }}، ناموفق {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "پاکسازی برخی شبکهها ناموفق بود؛ گزارش وظیفه را بررسی کنید"
|
||||||
ContainerBackupPrepare: 'آمادهسازی فضای کاری پشتیبان کانتینر'
|
ContainerBackupPrepare: 'آمادهسازی فضای کاری پشتیبان کانتینر'
|
||||||
ContainerBackupStop: 'توقف کانتینر قبل از پشتیبانگیری'
|
ContainerBackupStop: 'توقف کانتینر قبل از پشتیبانگیری'
|
||||||
ContainerBackupInspect: 'بررسی و شبکه کانتینر پشتیبان'
|
ContainerBackupInspect: 'بررسی و شبکه کانتینر پشتیبان'
|
||||||
@@ -719,6 +722,8 @@ ErrDockerIPv4ForwardingDisabled: "ارسال IPv4 غیرفعال است. پیش
|
|||||||
ErrFirewallRuleSavedApplyFailed: "پیکربندی قانون جدید ذخیره شد، اما اعمال آن در دیوار آتش ناموفق بود. با همگامسازی دوباره تلاش کنید: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "پیکربندی قانون جدید ذخیره شد، اما اعمال آن در دیوار آتش ناموفق بود. با همگامسازی دوباره تلاش کنید: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "یک قانون UFW با شرایط تطبیق یکسان و عملکرد متفاوت از قبل وجود دارد. قانون موجود را ویرایش کنید."
|
ErrFirewallRuleConflict: "یک قانون UFW با شرایط تطبیق یکسان و عملکرد متفاوت از قبل وجود دارد. قانون موجود را ویرایش کنید."
|
||||||
ErrForwardInterfaceNotFound: "رابط شبکه {{ .name }} مشخصشده در قانون انتقال وجود ندارد. نام رابط را بررسی کرده و دوباره تلاش کنید."
|
ErrForwardInterfaceNotFound: "رابط شبکه {{ .name }} مشخصشده در قانون انتقال وجود ندارد. نام رابط را بررسی کرده و دوباره تلاش کنید."
|
||||||
|
ErrIPv6RARisk: "فعالسازی هدایت IPv6 به دلیل خطر قطع شبکه مسدود شد. مستندات و گزارشهای سیستم را بررسی کنید."
|
||||||
|
ErrIPv6RACheckFailed: "فعالسازی هدایت IPv6 به دلیل عدم امکان بررسی پیکربندی شبکه مسدود شد. جزئیات در گزارشهای سیستم موجود است."
|
||||||
|
|
||||||
ErrSSHPublicKey: "یک کلید عمومی SSH معتبر وارد کنید"
|
ErrSSHPublicKey: "یک کلید عمومی SSH معتبر وارد کنید"
|
||||||
ErrSSHPrivateKey: "کلید خصوصی SSH نامعتبر یا عبارت عبور نادرست است؛ کلیدهای رمزگذاریشده به عبارت عبور اصلی نیاز دارند"
|
ErrSSHPrivateKey: "کلید خصوصی SSH نامعتبر یا عبارت عبور نادرست است؛ کلیدهای رمزگذاریشده به عبارت عبور اصلی نیاز دارند"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'ビルドキャッシュ'
|
|||||||
Volume: 'ストレージボリューム'
|
Volume: 'ストレージボリューム'
|
||||||
Network: 'ネットワーク'
|
Network: 'ネットワーク'
|
||||||
PruneStart: 'クリーンアップ中、しばらくお待ちください...'
|
PruneStart: 'クリーンアップ中、しばらくお待ちください...'
|
||||||
|
NetworkCleanupConnected: "ネットワーク [{{ .name }}] ({{ .id }}) をスキップしました:コンテナが接続されているか使用中のため、削除しませんでした"
|
||||||
|
NetworkCleanupSummary: "ネットワークのクリーンアップが完了しました:削除 {{ .deleted }} 件、スキップ {{ .skipped }} 件、失敗 {{ .failed }} 件"
|
||||||
|
NetworkCleanupPartialFailure: "一部のネットワークをクリーンアップできませんでした。タスクログを確認してください"
|
||||||
ContainerBackupPrepare: 'コンテナバックアップ作業領域を準備'
|
ContainerBackupPrepare: 'コンテナバックアップ作業領域を準備'
|
||||||
ContainerBackupStop: 'バックアップ前にコンテナを停止'
|
ContainerBackupStop: 'バックアップ前にコンテナを停止'
|
||||||
ContainerBackupInspect: 'コンテナ inspect とネットワーク情報をバックアップ'
|
ContainerBackupInspect: 'コンテナ inspect とネットワーク情報をバックアップ'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "IPv4 転送が無効です。Docker のファ
|
|||||||
ErrFirewallRuleSavedApplyFailed: "新しいルール設定は保存されましたが、ファイアウォールへの適用に失敗しました。同期で再試行してください:{{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "新しいルール設定は保存されましたが、ファイアウォールへの適用に失敗しました。同期で再試行してください:{{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "UFW に同じ一致条件でアクションが異なるルールが既に存在します。既存のルールを編集してください。"
|
ErrFirewallRuleConflict: "UFW に同じ一致条件でアクションが異なるルールが既に存在します。既存のルールを編集してください。"
|
||||||
ErrForwardInterfaceNotFound: "転送ルールで指定されたネットワークインターフェース {{ .name }} は存在しません。名前を確認して再試行してください。"
|
ErrForwardInterfaceNotFound: "転送ルールで指定されたネットワークインターフェース {{ .name }} は存在しません。名前を確認して再試行してください。"
|
||||||
|
ErrIPv6RARisk: "ネットワーク切断のおそれがあるため、IPv6 転送の有効化をブロックしました。ドキュメントとシステムログをご確認ください。"
|
||||||
|
ErrIPv6RACheckFailed: "ネットワーク設定を確認できないため、IPv6 転送の有効化をブロックしました。詳細はシステムログをご確認ください。"
|
||||||
|
|
||||||
ErrSSHPublicKey: "有効な SSH 公開鍵を入力してください"
|
ErrSSHPublicKey: "有効な SSH 公開鍵を入力してください"
|
||||||
ErrSSHPrivateKey: "SSH 秘密鍵の形式が無効か、パスフレーズが間違っています。暗号化された鍵には元のパスフレーズが必要です"
|
ErrSSHPrivateKey: "SSH 秘密鍵の形式が無効か、パスフレーズが間違っています。暗号化された鍵には元のパスフレーズが必要です"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: '빌드 캐시'
|
|||||||
Volume: '스토리지 볼륨'
|
Volume: '스토리지 볼륨'
|
||||||
Network: '네트워크'
|
Network: '네트워크'
|
||||||
PruneStart: '정리 중입니다. 잠시만 기다려주세요...'
|
PruneStart: '정리 중입니다. 잠시만 기다려주세요...'
|
||||||
|
NetworkCleanupConnected: "네트워크 [{{ .name }}] ({{ .id }}) 건너뜀: 연결된 컨테이너가 있거나 사용 중이므로 삭제하지 않음"
|
||||||
|
NetworkCleanupSummary: "네트워크 정리 완료: 삭제 {{ .deleted }}개, 건너뜀 {{ .skipped }}개, 실패 {{ .failed }}개"
|
||||||
|
NetworkCleanupPartialFailure: "일부 네트워크를 정리하지 못했습니다. 작업 로그를 확인하세요"
|
||||||
ContainerBackupPrepare: '컨테이너 백업 작업 공간 준비'
|
ContainerBackupPrepare: '컨테이너 백업 작업 공간 준비'
|
||||||
ContainerBackupStop: '백업 전에 컨테이너 중지'
|
ContainerBackupStop: '백업 전에 컨테이너 중지'
|
||||||
ContainerBackupInspect: '컨테이너 inspect 및 네트워크 정보 백업'
|
ContainerBackupInspect: '컨테이너 inspect 및 네트워크 정보 백업'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "IPv4 전달이 비활성화되어 있습니다
|
|||||||
ErrFirewallRuleSavedApplyFailed: "새 규칙 설정이 저장되었지만 방화벽에 적용하지 못했습니다. 동기화하여 다시 시도하세요: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "새 규칙 설정이 저장되었지만 방화벽에 적용하지 못했습니다. 동기화하여 다시 시도하세요: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "UFW에 일치 조건이 같지만 동작이 다른 규칙이 이미 있습니다. 기존 규칙을 편집하세요."
|
ErrFirewallRuleConflict: "UFW에 일치 조건이 같지만 동작이 다른 규칙이 이미 있습니다. 기존 규칙을 편집하세요."
|
||||||
ErrForwardInterfaceNotFound: "전달 규칙에 지정된 네트워크 인터페이스 {{ .name }}이 존재하지 않습니다. 이름을 확인한 후 다시 시도하세요."
|
ErrForwardInterfaceNotFound: "전달 규칙에 지정된 네트워크 인터페이스 {{ .name }}이 존재하지 않습니다. 이름을 확인한 후 다시 시도하세요."
|
||||||
|
ErrIPv6RARisk: "네트워크 연결이 끊길 위험이 있어 IPv6 전달 활성화를 차단했습니다. 문서와 시스템 로그를 확인하세요."
|
||||||
|
ErrIPv6RACheckFailed: "네트워크 구성을 확인할 수 없어 IPv6 전달 활성화를 차단했습니다. 자세한 내용은 시스템 로그를 확인하세요."
|
||||||
|
|
||||||
ErrSSHPublicKey: "유효한 SSH 공개 키를 입력하세요"
|
ErrSSHPublicKey: "유효한 SSH 공개 키를 입력하세요"
|
||||||
ErrSSHPrivateKey: "SSH 개인 키 형식이 잘못되었거나 암호가 틀립니다. 암호화된 키에는 원래 암호가 필요합니다"
|
ErrSSHPrivateKey: "SSH 개인 키 형식이 잘못되었거나 암호가 틀립니다. 암호화된 키에는 원래 암호가 필요합니다"
|
||||||
|
|||||||
@@ -290,6 +290,9 @@ BuildCache: 'ແຄດການສ້າງ'
|
|||||||
Volume: 'ວໍລຸມ (Volume)'
|
Volume: 'ວໍລຸມ (Volume)'
|
||||||
Network: "ເຄືອຂ່າຍ"
|
Network: "ເຄືອຂ່າຍ"
|
||||||
PruneStart: 'ກຳລັງດຳເນີນການທຳຄວາມສະອາດ'
|
PruneStart: 'ກຳລັງດຳເນີນການທຳຄວາມສະອາດ'
|
||||||
|
NetworkCleanupConnected: "ຂ້າມເຄືອຂ່າຍ [{{ .name }}] ({{ .id }}): ມີຄອນເທນເນີເຊື່ອມຕໍ່ຢູ່ ຫຼື ເຄືອຂ່າຍກຳລັງຖືກໃຊ້ງານ; ບໍ່ໄດ້ລຶບ"
|
||||||
|
NetworkCleanupSummary: "ການລ້າງເຄືອຂ່າຍສຳເລັດ: ລຶບແລ້ວ {{ .deleted }}, ຂ້າມ {{ .skipped }}, ລົ້ມເຫຼວ {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "ບໍ່ສາມາດລ້າງບາງເຄືອຂ່າຍໄດ້; ກະລຸນາເບິ່ງບັນທຶກວຽກ"
|
||||||
ContainerBackupPrepare: 'ກຽມພື້ນທີ່ເຮັດວຽກສຳລັບສຳຮອງຂໍ້ມູນຄອນເທນເນີ'
|
ContainerBackupPrepare: 'ກຽມພື້ນທີ່ເຮັດວຽກສຳລັບສຳຮອງຂໍ້ມູນຄອນເທນເນີ'
|
||||||
ContainerBackupStop: 'ຢຸດຄອນເທນເນີກ່ອນການສຳຮອງຂໍ້ມູນ'
|
ContainerBackupStop: 'ຢຸດຄອນເທນເນີກ່ອນການສຳຮອງຂໍ້ມູນ'
|
||||||
ContainerBackupInspect: 'ກວດສອບຄອນເທນເນີ ແລະ ເຄືອຂ່າຍສຳລັບການສຳຮອງຂໍ້ມູນ'
|
ContainerBackupInspect: 'ກວດສອບຄອນເທນເນີ ແລະ ເຄືອຂ່າຍສຳລັບການສຳຮອງຂໍ້ມູນ'
|
||||||
@@ -709,6 +712,8 @@ ErrDockerIPv4ForwardingDisabled: "ການສົ່ງຕໍ່ IPv4 ຖືກ
|
|||||||
ErrFirewallRuleSavedApplyFailed: "ບັນທຶກການຕັ້ງຄ່າກົດໃໝ່ແລ້ວ ແຕ່ນຳໃຊ້ກັບໄຟວໍບໍ່ສຳເລັດ. ລອງອີກຄັ້ງດ້ວຍການຊິງຂໍ້ມູນ: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "ບັນທຶກການຕັ້ງຄ່າກົດໃໝ່ແລ້ວ ແຕ່ນຳໃຊ້ກັບໄຟວໍບໍ່ສຳເລັດ. ລອງອີກຄັ້ງດ້ວຍການຊິງຂໍ້ມູນ: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "ມີກົດ UFW ທີ່ມີເງື່ອນໄຂກົງກັນແຕ່ການດຳເນີນການຕ່າງກັນແລ້ວ. ກະລຸນາແກ້ໄຂກົດທີ່ມີຢູ່."
|
ErrFirewallRuleConflict: "ມີກົດ UFW ທີ່ມີເງື່ອນໄຂກົງກັນແຕ່ການດຳເນີນການຕ່າງກັນແລ້ວ. ກະລຸນາແກ້ໄຂກົດທີ່ມີຢູ່."
|
||||||
ErrForwardInterfaceNotFound: "ບໍ່ພົບອິນເຕີເຟດເຄືອຂ່າຍ {{ .name }} ທີ່ລະບຸໃນກົດສົ່ງຕໍ່. ກະລຸນາກວດສອບຊື່ ແລ້ວລອງໃໝ່."
|
ErrForwardInterfaceNotFound: "ບໍ່ພົບອິນເຕີເຟດເຄືອຂ່າຍ {{ .name }} ທີ່ລະບຸໃນກົດສົ່ງຕໍ່. ກະລຸນາກວດສອບຊື່ ແລ້ວລອງໃໝ່."
|
||||||
|
ErrIPv6RARisk: "ການສົ່ງຕໍ່ IPv6 ຖືກບລັອກເພື່ອປ້ອງກັນຄວາມສ່ຽງທີ່ເຄືອຂ່າຍຈະຂາດການເຊື່ອມຕໍ່. ເບິ່ງເອກະສານ ແລະ ບັນທຶກລະບົບ."
|
||||||
|
ErrIPv6RACheckFailed: "ການສົ່ງຕໍ່ IPv6 ຖືກບລັອກເນື່ອງຈາກບໍ່ສາມາດກວດສອບການຕັ້ງຄ່າເຄືອຂ່າຍໄດ້. ເບິ່ງລາຍລະອຽດໃນບັນທຶກລະບົບ."
|
||||||
|
|
||||||
ErrSSHPublicKey: "ກະລຸນາປ້ອນຄີສາທາລະນະ SSH ທີ່ຖືກຕ້ອງ"
|
ErrSSHPublicKey: "ກະລຸນາປ້ອນຄີສາທາລະນະ SSH ທີ່ຖືກຕ້ອງ"
|
||||||
ErrSSHPrivateKey: "ຄີສ່ວນຕົວ SSH ບໍ່ຖືກຕ້ອງ ຫຼື ລະຫັດຜ່ານຜິດ; ຄີທີ່ເຂົ້າລະຫັດຕ້ອງໃຊ້ລະຫັດຜ່ານເດີມ"
|
ErrSSHPrivateKey: "ຄີສ່ວນຕົວ SSH ບໍ່ຖືກຕ້ອງ ຫຼື ລະຫັດຜ່ານຜິດ; ຄີທີ່ເຂົ້າລະຫັດຕ້ອງໃຊ້ລະຫັດຜ່ານເດີມ"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'Cache binaan'
|
|||||||
Volume: 'Jilid storan'
|
Volume: 'Jilid storan'
|
||||||
Network: 'Rangkaian'
|
Network: 'Rangkaian'
|
||||||
PruneStart: 'Pembersihan sedang dijalankan, sila tunggu...'
|
PruneStart: 'Pembersihan sedang dijalankan, sila tunggu...'
|
||||||
|
NetworkCleanupConnected: "Rangkaian [{{ .name }}] ({{ .id }}) dilangkau: terdapat kontena yang disambungkan atau rangkaian sedang digunakan; tidak dipadamkan"
|
||||||
|
NetworkCleanupSummary: "Pembersihan rangkaian selesai: dipadamkan {{ .deleted }}, dilangkau {{ .skipped }}, gagal {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "Sesetengah rangkaian tidak dapat dibersihkan; semak log tugas"
|
||||||
ContainerBackupPrepare: 'Sediakan ruang kerja sandaran kontena'
|
ContainerBackupPrepare: 'Sediakan ruang kerja sandaran kontena'
|
||||||
ContainerBackupStop: 'Hentikan kontena sebelum sandaran'
|
ContainerBackupStop: 'Hentikan kontena sebelum sandaran'
|
||||||
ContainerBackupInspect: 'Sandarkan inspect dan rangkaian kontena'
|
ContainerBackupInspect: 'Sandarkan inspect dan rangkaian kontena'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "Pemajuan IPv4 dilumpuhkan. Tetapkan net.ipv4.i
|
|||||||
ErrFirewallRuleSavedApplyFailed: "Konfigurasi peraturan baharu telah disimpan, tetapi gagal digunakan pada tembok api. Cuba lagi melalui penyegerakan: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "Konfigurasi peraturan baharu telah disimpan, tetapi gagal digunakan pada tembok api. Cuba lagi melalui penyegerakan: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "Peraturan UFW dengan syarat padanan yang sama tetapi tindakan berbeza sudah wujud. Sila edit peraturan sedia ada."
|
ErrFirewallRuleConflict: "Peraturan UFW dengan syarat padanan yang sama tetapi tindakan berbeza sudah wujud. Sila edit peraturan sedia ada."
|
||||||
ErrForwardInterfaceNotFound: "Antara muka rangkaian {{ .name }} yang dinyatakan dalam peraturan pemajuan tidak wujud. Semak namanya dan cuba lagi."
|
ErrForwardInterfaceNotFound: "Antara muka rangkaian {{ .name }} yang dinyatakan dalam peraturan pemajuan tidak wujud. Semak namanya dan cuba lagi."
|
||||||
|
ErrIPv6RARisk: "Pemajuan IPv6 disekat bagi mengelakkan risiko kehilangan sambungan rangkaian. Rujuk dokumentasi dan log sistem."
|
||||||
|
ErrIPv6RACheckFailed: "Pemajuan IPv6 disekat kerana konfigurasi rangkaian tidak dapat diperiksa. Lihat log sistem untuk butiran."
|
||||||
|
|
||||||
ErrSSHPublicKey: "Masukkan kunci awam SSH yang sah"
|
ErrSSHPublicKey: "Masukkan kunci awam SSH yang sah"
|
||||||
ErrSSHPrivateKey: "Kunci peribadi SSH tidak sah atau frasa laluan salah; kunci yang disulitkan memerlukan frasa laluan asal"
|
ErrSSHPrivateKey: "Kunci peribadi SSH tidak sah atau frasa laluan salah; kunci yang disulitkan memerlukan frasa laluan asal"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'Cache de construção'
|
|||||||
Volume: 'Volume de armazenamento'
|
Volume: 'Volume de armazenamento'
|
||||||
Network: 'Rede'
|
Network: 'Rede'
|
||||||
PruneStart: 'Limpando em andamento aguarde...'
|
PruneStart: 'Limpando em andamento aguarde...'
|
||||||
|
NetworkCleanupConnected: "Rede [{{ .name }}] ({{ .id }}) ignorada: há contêineres conectados ou a rede está em uso; não foi excluída"
|
||||||
|
NetworkCleanupSummary: "Limpeza de redes concluída: excluídas {{ .deleted }}, ignoradas {{ .skipped }}, falhas {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "Não foi possível limpar algumas redes; consulte o log da tarefa"
|
||||||
ContainerBackupPrepare: 'Preparar área de backup do contêiner'
|
ContainerBackupPrepare: 'Preparar área de backup do contêiner'
|
||||||
ContainerBackupStop: 'Parar contêiner antes do backup'
|
ContainerBackupStop: 'Parar contêiner antes do backup'
|
||||||
ContainerBackupInspect: 'Fazer backup do inspect e rede do contêiner'
|
ContainerBackupInspect: 'Fazer backup do inspect e rede do contêiner'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "O encaminhamento IPv4 está desativado. Defina
|
|||||||
ErrFirewallRuleSavedApplyFailed: "A configuração da nova regra foi salva, mas não pôde ser aplicada ao firewall. Tente novamente por meio da sincronização: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "A configuração da nova regra foi salva, mas não pôde ser aplicada ao firewall. Tente novamente por meio da sincronização: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "Já existe uma regra UFW com as mesmas condições e uma ação diferente. Edite a regra existente."
|
ErrFirewallRuleConflict: "Já existe uma regra UFW com as mesmas condições e uma ação diferente. Edite a regra existente."
|
||||||
ErrForwardInterfaceNotFound: "A interface de rede {{ .name }} especificada na regra de encaminhamento não existe. Verifique o nome e tente novamente."
|
ErrForwardInterfaceNotFound: "A interface de rede {{ .name }} especificada na regra de encaminhamento não existe. Verifique o nome e tente novamente."
|
||||||
|
ErrIPv6RARisk: "O encaminhamento IPv6 foi bloqueado para evitar uma possível perda de conexão. Consulte a documentação e os logs do sistema."
|
||||||
|
ErrIPv6RACheckFailed: "O encaminhamento IPv6 foi bloqueado porque não foi possível verificar a configuração de rede. Consulte os logs do sistema."
|
||||||
|
|
||||||
ErrSSHPublicKey: "Informe uma chave pública SSH válida"
|
ErrSSHPublicKey: "Informe uma chave pública SSH válida"
|
||||||
ErrSSHPrivateKey: "Chave privada SSH inválida ou senha incorreta; chaves criptografadas exigem a senha original"
|
ErrSSHPrivateKey: "Chave privada SSH inválida ou senha incorreta; chaves criptografadas exigem a senha original"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'Кэш сборки'
|
|||||||
Volume: 'Том хранилища'
|
Volume: 'Том хранилища'
|
||||||
Network: 'Сеть'
|
Network: 'Сеть'
|
||||||
PruneStart: 'Очистка выполняется, пожалуйста, подождите...'
|
PruneStart: 'Очистка выполняется, пожалуйста, подождите...'
|
||||||
|
NetworkCleanupConnected: "Сеть [{{ .name }}] ({{ .id }}) пропущена: подключены контейнеры или сеть используется; не удалена"
|
||||||
|
NetworkCleanupSummary: "Очистка сетей завершена: удалено {{ .deleted }}, пропущено {{ .skipped }}, ошибок {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "Не удалось очистить некоторые сети; проверьте журнал задачи"
|
||||||
ContainerBackupPrepare: 'Подготовить рабочую область резервной копии контейнера'
|
ContainerBackupPrepare: 'Подготовить рабочую область резервной копии контейнера'
|
||||||
ContainerBackupStop: 'Остановить контейнер перед резервным копированием'
|
ContainerBackupStop: 'Остановить контейнер перед резервным копированием'
|
||||||
ContainerBackupInspect: 'Сделать резервную копию inspect и сети контейнера'
|
ContainerBackupInspect: 'Сделать резервную копию inspect и сети контейнера'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "Пересылка IPv4 отключена. П
|
|||||||
ErrFirewallRuleSavedApplyFailed: "Настройки нового правила сохранены, но применить их к межсетевому экрану не удалось. Повторите попытку с помощью синхронизации: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "Настройки нового правила сохранены, но применить их к межсетевому экрану не удалось. Повторите попытку с помощью синхронизации: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "В UFW уже есть правило с такими же условиями и другим действием. Отредактируйте существующее правило."
|
ErrFirewallRuleConflict: "В UFW уже есть правило с такими же условиями и другим действием. Отредактируйте существующее правило."
|
||||||
ErrForwardInterfaceNotFound: "Сетевой интерфейс {{ .name }}, указанный в правиле перенаправления, не существует. Проверьте имя и повторите попытку."
|
ErrForwardInterfaceNotFound: "Сетевой интерфейс {{ .name }}, указанный в правиле перенаправления, не существует. Проверьте имя и повторите попытку."
|
||||||
|
ErrIPv6RARisk: "Включение переадресации IPv6 заблокировано из-за риска потери связи. См. документацию и системные журналы."
|
||||||
|
ErrIPv6RACheckFailed: "Включение переадресации IPv6 заблокировано: не удалось проверить настройки сети. Подробности в системных журналах."
|
||||||
|
|
||||||
ErrSSHPublicKey: "Введите действительный открытый ключ SSH"
|
ErrSSHPublicKey: "Введите действительный открытый ключ SSH"
|
||||||
ErrSSHPrivateKey: "Недопустимый закрытый ключ SSH или неверная парольная фраза; для зашифрованных ключей требуется исходная парольная фраза"
|
ErrSSHPrivateKey: "Недопустимый закрытый ключ SSH или неверная парольная фраза; для зашифрованных ключей требуется исходная парольная фраза"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: 'Derleme önbelleği'
|
|||||||
Volume: 'Depolama hacmi'
|
Volume: 'Depolama hacmi'
|
||||||
Network: 'Ağ'
|
Network: 'Ağ'
|
||||||
PruneStart: 'Temizlik devam ediyor, lütfen bekleyin...'
|
PruneStart: 'Temizlik devam ediyor, lütfen bekleyin...'
|
||||||
|
NetworkCleanupConnected: "Ağ [{{ .name }}] ({{ .id }}) atlandı: bağlı konteynerler var veya ağ kullanımda; silinmedi"
|
||||||
|
NetworkCleanupSummary: "Ağ temizliği tamamlandı: silinen {{ .deleted }}, atlanan {{ .skipped }}, başarısız {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "Bazı ağlar temizlenemedi; görev günlüğünü kontrol edin"
|
||||||
ContainerBackupPrepare: 'Konteyner yedekleme çalışma alanını hazırla'
|
ContainerBackupPrepare: 'Konteyner yedekleme çalışma alanını hazırla'
|
||||||
ContainerBackupStop: 'Yedeklemeden önce konteyneri durdur'
|
ContainerBackupStop: 'Yedeklemeden önce konteyneri durdur'
|
||||||
ContainerBackupInspect: 'Konteyner inspect ve ağ bilgisini yedekle'
|
ContainerBackupInspect: 'Konteyner inspect ve ağ bilgisini yedekle'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "IPv4 yönlendirmesi devre dışı. Docker güv
|
|||||||
ErrFirewallRuleSavedApplyFailed: "Yeni kural yapılandırması kaydedildi, ancak güvenlik duvarına uygulanamadı. Eşitleme yaparak yeniden deneyin: {{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "Yeni kural yapılandırması kaydedildi, ancak güvenlik duvarına uygulanamadı. Eşitleme yaparak yeniden deneyin: {{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "UFW içinde aynı eşleşme koşullarına sahip, farklı bir eylem uygulayan bir kural zaten var. Mevcut kuralı düzenleyin."
|
ErrFirewallRuleConflict: "UFW içinde aynı eşleşme koşullarına sahip, farklı bir eylem uygulayan bir kural zaten var. Mevcut kuralı düzenleyin."
|
||||||
ErrForwardInterfaceNotFound: "Yönlendirme kuralında belirtilen {{ .name }} ağ arayüzü mevcut değil. Arayüz adını kontrol edip yeniden deneyin."
|
ErrForwardInterfaceNotFound: "Yönlendirme kuralında belirtilen {{ .name }} ağ arayüzü mevcut değil. Arayüz adını kontrol edip yeniden deneyin."
|
||||||
|
ErrIPv6RARisk: "Ağ bağlantısının kesilme riski nedeniyle IPv6 yönlendirmesi engellendi. Belgeleri ve sistem günlüklerini inceleyin."
|
||||||
|
ErrIPv6RACheckFailed: "Ağ yapılandırması denetlenemediği için IPv6 yönlendirmesi engellendi. Ayrıntılar için sistem günlüklerini inceleyin."
|
||||||
|
|
||||||
ErrSSHPublicKey: "Geçerli bir SSH açık anahtarı girin"
|
ErrSSHPublicKey: "Geçerli bir SSH açık anahtarı girin"
|
||||||
ErrSSHPrivateKey: "SSH özel anahtarı geçersiz veya parola yanlış; şifreli anahtarlar mevcut parolayı gerektirir"
|
ErrSSHPrivateKey: "SSH özel anahtarı geçersiz veya parola yanlış; şifreli anahtarlar mevcut parolayı gerektirir"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: '構建快取'
|
|||||||
Volume: '磁碟區'
|
Volume: '磁碟區'
|
||||||
Network: '網路'
|
Network: '網路'
|
||||||
PruneStart: '清理中,請稍候...'
|
PruneStart: '清理中,請稍候...'
|
||||||
|
NetworkCleanupConnected: "跳過網路 [{{ .name }}] ({{ .id }}):仍有容器連接或正在使用,未刪除"
|
||||||
|
NetworkCleanupSummary: "網路清理完成:已刪除 {{ .deleted }},已跳過 {{ .skipped }},失敗 {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "部分網路清理失敗,請查看任務日誌"
|
||||||
ContainerBackupPrepare: '準備容器備份工作目錄'
|
ContainerBackupPrepare: '準備容器備份工作目錄'
|
||||||
ContainerBackupStop: '備份前停止容器'
|
ContainerBackupStop: '備份前停止容器'
|
||||||
ContainerBackupInspect: '備份容器 Inspect 與網路資訊'
|
ContainerBackupInspect: '備份容器 Inspect 與網路資訊'
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "IPv4 轉送尚未啟用,請先設定 net.ipv
|
|||||||
ErrFirewallRuleSavedApplyFailed: "新規則設定已儲存,但套用至防火牆失敗。可透過同步重試:{{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "新規則設定已儲存,但套用至防火牆失敗。可透過同步重試:{{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "UFW 中已存在比對條件相同但動作不同的規則,請編輯既有規則。"
|
ErrFirewallRuleConflict: "UFW 中已存在比對條件相同但動作不同的規則,請編輯既有規則。"
|
||||||
ErrForwardInterfaceNotFound: "轉發規則指定的網卡 {{ .name }} 不存在,請檢查網卡名稱後重試。"
|
ErrForwardInterfaceNotFound: "轉發規則指定的網卡 {{ .name }} 不存在,請檢查網卡名稱後重試。"
|
||||||
|
ErrIPv6RARisk: "IPv6 轉送可能導致網路中斷,已阻止啟用。請參閱文件,詳情見系統日誌。"
|
||||||
|
ErrIPv6RACheckFailed: "無法檢查 IPv6 網路設定,已阻止啟用轉送。詳情見系統日誌。"
|
||||||
|
|
||||||
ErrSSHPublicKey: "請輸入有效的 SSH 公鑰"
|
ErrSSHPublicKey: "請輸入有效的 SSH 公鑰"
|
||||||
ErrSSHPrivateKey: "SSH 私鑰格式無效或密碼錯誤;加密私鑰需要填寫原密碼"
|
ErrSSHPrivateKey: "SSH 私鑰格式無效或密碼錯誤;加密私鑰需要填寫原密碼"
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ BuildCache: "构建缓存"
|
|||||||
Volume: "存储卷"
|
Volume: "存储卷"
|
||||||
Network: "网络"
|
Network: "网络"
|
||||||
PruneStart: "清理中,请稍候..."
|
PruneStart: "清理中,请稍候..."
|
||||||
|
NetworkCleanupConnected: "跳过网络 [{{ .name }}] ({{ .id }}):仍有容器连接或正在使用,未删除"
|
||||||
|
NetworkCleanupSummary: "网络清理完成:已删除 {{ .deleted }},已跳过 {{ .skipped }},失败 {{ .failed }}"
|
||||||
|
NetworkCleanupPartialFailure: "部分网络清理失败,请查看任务日志"
|
||||||
ContainerBackupPrepare: "准备容器备份工作目录"
|
ContainerBackupPrepare: "准备容器备份工作目录"
|
||||||
ContainerBackupStop: "备份前停止容器"
|
ContainerBackupStop: "备份前停止容器"
|
||||||
ContainerBackupInspect: "备份容器 Inspect 与网络信息"
|
ContainerBackupInspect: "备份容器 Inspect 与网络信息"
|
||||||
@@ -718,6 +721,8 @@ ErrDockerIPv4ForwardingDisabled: "IPv4 转发未开启,请先设置 net.ipv4.i
|
|||||||
ErrFirewallRuleSavedApplyFailed: "新规则配置已保存,但应用到防火墙失败。可通过同步重试:{{ .detail }}"
|
ErrFirewallRuleSavedApplyFailed: "新规则配置已保存,但应用到防火墙失败。可通过同步重试:{{ .detail }}"
|
||||||
ErrFirewallRuleConflict: "UFW 中已存在匹配条件相同但动作不同的规则,请编辑已有规则。"
|
ErrFirewallRuleConflict: "UFW 中已存在匹配条件相同但动作不同的规则,请编辑已有规则。"
|
||||||
ErrForwardInterfaceNotFound: "转发规则指定的网卡 {{ .name }} 不存在,请检查网卡名称后重试。"
|
ErrForwardInterfaceNotFound: "转发规则指定的网卡 {{ .name }} 不存在,请检查网卡名称后重试。"
|
||||||
|
ErrIPv6RARisk: "IPv6 转发存在断网风险,已阻止启用。请参阅文档,详情见系统日志。"
|
||||||
|
ErrIPv6RACheckFailed: "无法检查 IPv6 网络配置,已阻止启用转发。详情见系统日志。"
|
||||||
|
|
||||||
ErrSSHPublicKey: "请输入有效的 SSH 公钥"
|
ErrSSHPublicKey: "请输入有效的 SSH 公钥"
|
||||||
ErrSSHPrivateKey: "SSH 私钥格式无效或密码错误;加密私钥需要填写原密码"
|
ErrSSHPrivateKey: "SSH 私钥格式无效或密码错误;加密私钥需要填写原密码"
|
||||||
|
|||||||
@@ -251,6 +251,10 @@ func (c *CommandHelper) buildPipeCommands(ctx context.Context, commands []PipeCo
|
|||||||
cmdItem.SysProcAttr = &syscall.SysProcAttr{
|
cmdItem.SysProcAttr = &syscall.SysProcAttr{
|
||||||
Setpgid: true,
|
Setpgid: true,
|
||||||
}
|
}
|
||||||
|
cmdItem.Cancel = func() error {
|
||||||
|
_ = syscall.Kill(-cmdItem.Process.Pid, syscall.SIGKILL)
|
||||||
|
return cmdItem.Process.Kill()
|
||||||
|
}
|
||||||
cmds = append(cmds, cmdItem)
|
cmds = append(cmds, cmdItem)
|
||||||
}
|
}
|
||||||
return cmds
|
return cmds
|
||||||
@@ -335,6 +339,12 @@ func (c *CommandHelper) run(name string, arg ...string) (string, error) {
|
|||||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||||
Setpgid: true,
|
Setpgid: true,
|
||||||
}
|
}
|
||||||
|
if newContext != nil {
|
||||||
|
cmd.Cancel = func() error {
|
||||||
|
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
||||||
|
return cmd.Process.Kill()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
customWriter := &CustomWriter{taskItem: c.taskItem}
|
customWriter := &CustomWriter{taskItem: c.taskItem}
|
||||||
var stdout, stderr bytes.Buffer
|
var stdout, stderr bytes.Buffer
|
||||||
@@ -398,6 +408,9 @@ func (c *CommandHelper) run(name string, arg ...string) (string, error) {
|
|||||||
}()
|
}()
|
||||||
select {
|
select {
|
||||||
case err := <-done:
|
case err := <-done:
|
||||||
|
if newContext != nil && newContext.Err() != nil {
|
||||||
|
return "", c.pipeResultErr(newContext, err)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return handleErr(&stdout, &stderr, c.IgnoreExist1, err)
|
return handleErr(&stdout, &stderr, c.IgnoreExist1, err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package forwarding
|
package forwarding
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@@ -8,19 +10,27 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/buserr"
|
||||||
"github.com/1Panel-dev/1Panel/agent/constant"
|
"github.com/1Panel-dev/1Panel/agent/constant"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/global"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/utils/cmd"
|
||||||
|
"github.com/1Panel-dev/1Panel/agent/utils/docker"
|
||||||
|
"github.com/docker/docker/api/types/network"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ensureFamilyForwardingSysctls(system forwardingSystem, family string) error {
|
func ensureFamilyForwardingSysctls(system forwardingSystem, family string) error {
|
||||||
withIPv6 := family == FamilyIPv6
|
withIPv6 := family == FamilyIPv6
|
||||||
if withIPv6 {
|
if withIPv6 {
|
||||||
interfaces, err := IPv6RAInterfaces(system.ReadFile)
|
interfaces, err := IPv6RAInterfaces(system.ReadFile, LoadDockerIPv4BridgePorts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("check IPv6 Router Advertisement: %w", err)
|
global.LOG.Warnf("IPv6 forwarding blocked: failed to check Router Advertisement: %v", err)
|
||||||
|
return buserr.New("ErrIPv6RACheckFailed")
|
||||||
}
|
}
|
||||||
if len(interfaces) > 0 {
|
if len(interfaces) > 0 {
|
||||||
return fmt.Errorf("IPv6 forwarding blocked: interfaces %s may depend on RA/SLAAC with accept_ra=1; persist accept_ra=2 on interfaces that require RA before retrying", strings.Join(interfaces, ", "))
|
global.LOG.Warnf("IPv6 forwarding blocked: interfaces %s may depend on RA/SLAAC with accept_ra=1; review the network configuration and persist accept_ra=2 on interfaces that require RA before retrying", strings.Join(interfaces, ", "))
|
||||||
|
return buserr.New("ErrIPv6RARisk")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
paths := []string{"/proc/sys/net/ipv4/ip_forward"}
|
paths := []string{"/proc/sys/net/ipv4/ip_forward"}
|
||||||
@@ -43,7 +53,7 @@ func ensureFamilyForwardingSysctls(system forwardingSystem, family string) error
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func IPv6RAInterfaces(readFile func(string) ([]byte, error)) ([]string, error) {
|
func IPv6RAInterfaces(readFile func(string) ([]byte, error), loadDockerPorts func() (map[string]bool, error)) ([]string, error) {
|
||||||
addresses, err := readFile("/proc/net/if_inet6")
|
addresses, err := readFile("/proc/net/if_inet6")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -67,21 +77,16 @@ func IPv6RAInterfaces(readFile func(string) ([]byte, error)) ([]string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if _, exists := globalAddresses[name]; !exists {
|
globalAddresses[name] = globalAddresses[name] || fields[3] == "00"
|
||||||
globalAddresses[name] = false
|
if fields[3] == "00" && flags&permanentAddress == 0 {
|
||||||
}
|
raInterfaces[name] = true
|
||||||
if fields[3] == "00" {
|
|
||||||
globalAddresses[name] = true
|
|
||||||
if flags&permanentAddress == 0 {
|
|
||||||
raInterfaces[name] = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
routes, err := readFile("/proc/net/ipv6_route")
|
routes, err := readFile("/proc/net/ipv6_route")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
const raRouteFlags = 0x00010000 | 0x00800000
|
const raRouteFlags = 0x00010000 | 0x00080000 | 0x00800000
|
||||||
for _, line := range strings.Split(string(routes), "\n") {
|
for _, line := range strings.Split(string(routes), "\n") {
|
||||||
fields := strings.Fields(line)
|
fields := strings.Fields(line)
|
||||||
if len(fields) == 0 {
|
if len(fields) == 0 {
|
||||||
@@ -98,12 +103,15 @@ func IPv6RAInterfaces(readFile func(string) ([]byte, error)) ([]string, error) {
|
|||||||
raInterfaces[fields[9]] = true
|
raInterfaces[fields[9]] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
uncertainInterfaces := make(map[string]bool)
|
||||||
for name, hasGlobalAddress := range globalAddresses {
|
for name, hasGlobalAddress := range globalAddresses {
|
||||||
if !hasGlobalAddress {
|
if !hasGlobalAddress && !raInterfaces[name] {
|
||||||
raInterfaces[name] = true
|
raInterfaces[name] = true
|
||||||
|
uncertainInterfaces[name] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var interfaces []string
|
var interfaces []string
|
||||||
|
checkDockerPorts := false
|
||||||
for name := range raInterfaces {
|
for name := range raInterfaces {
|
||||||
if name == "lo" {
|
if name == "lo" {
|
||||||
continue
|
continue
|
||||||
@@ -118,15 +126,104 @@ func IPv6RAInterfaces(readFile func(string) ([]byte, error)) ([]string, error) {
|
|||||||
switch strings.TrimSpace(string(value)) {
|
switch strings.TrimSpace(string(value)) {
|
||||||
case "1":
|
case "1":
|
||||||
interfaces = append(interfaces, name)
|
interfaces = append(interfaces, name)
|
||||||
|
checkDockerPorts = checkDockerPorts || uncertainInterfaces[name]
|
||||||
case "0", "2":
|
case "0", "2":
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid accept_ra value for %s", name)
|
return nil, fmt.Errorf("invalid accept_ra value for %s", name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if checkDockerPorts {
|
||||||
|
ports, err := loadDockerPorts()
|
||||||
|
if err != nil {
|
||||||
|
global.LOG.Warnf("IPv6 forwarding RA check: cannot exclude Docker bridge ports: %v", err)
|
||||||
|
} else {
|
||||||
|
kept := interfaces[:0]
|
||||||
|
for _, name := range interfaces {
|
||||||
|
if !uncertainInterfaces[name] || !ports[name] {
|
||||||
|
kept = append(kept, name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
interfaces = kept
|
||||||
|
}
|
||||||
|
}
|
||||||
sort.Strings(interfaces)
|
sort.Strings(interfaces)
|
||||||
return interfaces, nil
|
return interfaces, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func LoadDockerIPv4BridgePorts() (map[string]bool, error) {
|
||||||
|
cli, err := docker.NewDockerClient()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer cli.Close()
|
||||||
|
if !strings.HasPrefix(cli.DaemonHost(), "unix://") {
|
||||||
|
return nil, errors.New("cannot verify local bridge ports using a remote Docker daemon")
|
||||||
|
}
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||||
|
defer cancel()
|
||||||
|
info, err := cli.Info(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
for _, option := range info.SecurityOptions {
|
||||||
|
if option == "name=rootless" {
|
||||||
|
return nil, errors.New("cannot verify host bridge ports using a rootless Docker daemon")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
networks, err := cli.NetworkList(ctx, network.ListOptions{})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
output, err := cmd.NewCommandMgr(cmd.WithContext(ctx), cmd.WithTimeout(5*time.Second)).RunWithOptionalSudoAndStdout("ip", "-details", "-json", "link", "show")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return dockerIPv4BridgePorts(networks, output)
|
||||||
|
}
|
||||||
|
|
||||||
|
func dockerIPv4BridgePorts(networks []network.Summary, linkJSON string) (map[string]bool, error) {
|
||||||
|
bridges := make(map[string]bool)
|
||||||
|
for _, item := range networks {
|
||||||
|
if item.Driver != "bridge" || item.EnableIPv6 || item.ConfigOnly {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
name := item.Options["com.docker.network.bridge.name"]
|
||||||
|
if name == "" {
|
||||||
|
if item.Options["com.docker.network.bridge.default_bridge"] == "true" {
|
||||||
|
name = "docker0"
|
||||||
|
} else if len(item.ID) >= 12 {
|
||||||
|
name = "br-" + item.ID[:12]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if name != "" {
|
||||||
|
bridges[name] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var links []struct {
|
||||||
|
Name string `json:"ifname"`
|
||||||
|
Master string `json:"master"`
|
||||||
|
LinkInfo struct {
|
||||||
|
Kind string `json:"info_kind"`
|
||||||
|
} `json:"linkinfo"`
|
||||||
|
}
|
||||||
|
if err := json.Unmarshal([]byte(linkJSON), &links); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
confirmedBridges := make(map[string]bool)
|
||||||
|
for _, link := range links {
|
||||||
|
if link.LinkInfo.Kind == "bridge" && bridges[link.Name] {
|
||||||
|
confirmedBridges[link.Name] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ports := make(map[string]bool)
|
||||||
|
for _, link := range links {
|
||||||
|
if link.LinkInfo.Kind == "veth" && confirmedBridges[link.Master] {
|
||||||
|
ports[link.Name] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ports, nil
|
||||||
|
}
|
||||||
|
|
||||||
func enableFamilyForwardingSysctls(content, family string) string {
|
func enableFamilyForwardingSysctls(content, family string) string {
|
||||||
lines := strings.Split(strings.TrimRight(content, "\n"), "\n")
|
lines := strings.Split(strings.TrimRight(content, "\n"), "\n")
|
||||||
wanted := map[string]string{"net.ipv4.ip_forward": "net.ipv4.ip_forward = 1"}
|
wanted := map[string]string{"net.ipv4.ip_forward": "net.ipv4.ip_forward = 1"}
|
||||||
|
|||||||
@@ -36389,9 +36389,6 @@ const docTemplate = `{
|
|||||||
"bound": {
|
"bound": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"forwardPolicy": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"initialized": {
|
"initialized": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36385,9 +36385,6 @@
|
|||||||
"bound": {
|
"bound": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"forwardPolicy": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"initialized": {
|
"initialized": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
|||||||
+15
-4
@@ -230,6 +230,10 @@ func (c *CommandHelper) buildPipeCommands(ctx context.Context, commands []PipeCo
|
|||||||
cmdItem.SysProcAttr = &syscall.SysProcAttr{
|
cmdItem.SysProcAttr = &syscall.SysProcAttr{
|
||||||
Setpgid: true,
|
Setpgid: true,
|
||||||
}
|
}
|
||||||
|
cmdItem.Cancel = func() error {
|
||||||
|
_ = syscall.Kill(-cmdItem.Process.Pid, syscall.SIGKILL)
|
||||||
|
return cmdItem.Process.Kill()
|
||||||
|
}
|
||||||
cmds = append(cmds, cmdItem)
|
cmds = append(cmds, cmdItem)
|
||||||
}
|
}
|
||||||
return cmds
|
return cmds
|
||||||
@@ -305,6 +309,12 @@ func (c *CommandHelper) run(name string, arg ...string) (string, error) {
|
|||||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||||
Setpgid: true,
|
Setpgid: true,
|
||||||
}
|
}
|
||||||
|
if newContext != nil {
|
||||||
|
cmd.Cancel = func() error {
|
||||||
|
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
||||||
|
return cmd.Process.Kill()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
customWriter := &CustomWriter{taskItem: c.taskItem}
|
customWriter := &CustomWriter{taskItem: c.taskItem}
|
||||||
var stdout, stderr bytes.Buffer
|
var stdout, stderr bytes.Buffer
|
||||||
@@ -357,11 +367,12 @@ func (c *CommandHelper) run(name string, arg ...string) (string, error) {
|
|||||||
}()
|
}()
|
||||||
select {
|
select {
|
||||||
case err := <-done:
|
case err := <-done:
|
||||||
if c.preserveErrorCause && newContext != nil && newContext.Err() != nil {
|
if newContext != nil && newContext.Err() != nil {
|
||||||
if cmd.Process != nil && cmd.Process.Pid > 0 {
|
resultErr := c.pipeResultErr(newContext, err)
|
||||||
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
|
if c.preserveErrorCause {
|
||||||
|
resultErr = &commandError{message: resultErr.Error(), cause: newContext.Err()}
|
||||||
}
|
}
|
||||||
return "", newContext.Err()
|
return "", resultErr
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
out, resultErr := handleErr(&stdout, &stderr, c.IgnoreExist1, err)
|
out, resultErr := handleErr(&stdout, &stderr, c.IgnoreExist1, err)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ export namespace Firewall {
|
|||||||
initialized: boolean;
|
initialized: boolean;
|
||||||
bound: boolean;
|
bound: boolean;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
forwardPolicy?: 'ACCEPT' | 'DROP';
|
|
||||||
raInterfaces?: string[];
|
raInterfaces?: string[];
|
||||||
}
|
}
|
||||||
export interface BackendGroup {
|
export interface BackendGroup {
|
||||||
|
|||||||
@@ -311,6 +311,7 @@ export namespace Website {
|
|||||||
email: string;
|
email: string;
|
||||||
url: string;
|
url: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
keyType: string;
|
||||||
useProxy: boolean;
|
useProxy: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,8 +144,13 @@ export const imagePull = (params: Container.ImagePull) => {
|
|||||||
export const imagePush = (params: Container.ImagePush) => {
|
export const imagePush = (params: Container.ImagePush) => {
|
||||||
return http.post<string>(`/containers/image/push`, params);
|
return http.post<string>(`/containers/image/push`, params);
|
||||||
};
|
};
|
||||||
export const imageLoad = (params: Container.ImageLoad) => {
|
export const imageLoad = (params: Container.ImageLoad, currentNode?: string) => {
|
||||||
return http.post(`/containers/image/load`, params, TimeoutEnum.T_10M);
|
return http.post(
|
||||||
|
`/containers/image/load`,
|
||||||
|
params,
|
||||||
|
TimeoutEnum.T_10M,
|
||||||
|
currentNode ? { CurrentNode: currentNode } : undefined,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
export const imageSave = (params: Container.ImageSave) => {
|
export const imageSave = (params: Container.ImageSave) => {
|
||||||
return http.post(`/containers/image/save`, params, TimeoutEnum.T_10M);
|
return http.post(`/containers/image/save`, params, TimeoutEnum.T_10M);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from 'vue';
|
import { onActivated, ref, watch } from 'vue';
|
||||||
defineOptions({ name: 'TableSearch' });
|
defineOptions({ name: 'TableSearch' });
|
||||||
|
|
||||||
const emit = defineEmits(['search', 'update:searchName']);
|
const emit = defineEmits(['search', 'update:searchName']);
|
||||||
@@ -42,6 +42,10 @@ watch(
|
|||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onActivated(() => {
|
||||||
|
searchInfo.value = props.searchName;
|
||||||
|
});
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
emit('update:searchName', searchInfo.value);
|
emit('update:searchName', searchInfo.value);
|
||||||
emit('search');
|
emit('search');
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, ref, useAttrs } from 'vue';
|
import { computed, onDeactivated, onMounted, ref, useAttrs } from 'vue';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
import { flattenVNodes, type FuTableOperationButton } from '@/components/table/shared';
|
import { flattenVNodes, type FuTableOperationButton } from '@/components/table/shared';
|
||||||
import { useCardColumns } from './useCardColumns';
|
import { useCardColumns } from './useCardColumns';
|
||||||
@@ -459,6 +459,8 @@ watch([currentViewMode, tableData, () => props.syncCardContentHeight], scheduleC
|
|||||||
flush: 'post',
|
flush: 'post',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onDeactivated(clearSelects);
|
||||||
|
|
||||||
watch([() => props.paginationConfig?.currentPage, () => props.paginationConfig?.pageSize], clearSelects, {
|
watch([() => props.paginationConfig?.currentPage, () => props.paginationConfig?.pageSize], clearSelects, {
|
||||||
flush: 'sync',
|
flush: 'sync',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
import { reactive, type UnwrapNestedRefs } from 'vue';
|
import { reactive, type UnwrapNestedRefs } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
|
||||||
import { getPageState } from '@/utils/page-state-cache';
|
|
||||||
|
|
||||||
|
/** A new page visit starts from its defaults instead of restoring the previous page number. */
|
||||||
export const usePageState = <T extends object>(factory: () => T): UnwrapNestedRefs<T> => {
|
export const usePageState = <T extends object>(factory: () => T): UnwrapNestedRefs<T> => {
|
||||||
const route = useRoute();
|
return reactive(factory());
|
||||||
const { currentNode } = useGlobalStore();
|
|
||||||
const key = `${currentNode.value}:${String(route.name || route.path)}`;
|
|
||||||
return reactive(getPageState(key, factory));
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
import { storeToRefs } from 'pinia';
|
|
||||||
import { watch, type Ref } from 'vue';
|
|
||||||
import GlobalStore from '@/store/modules/global';
|
|
||||||
|
|
||||||
type SearchValue = string | number | undefined;
|
|
||||||
type SearchFields = Record<string, Ref<SearchValue>>;
|
|
||||||
|
|
||||||
export const useSearchPersistence = (page: string, fields: SearchFields, scope?: () => SearchValue) => {
|
|
||||||
const { currentNode } = storeToRefs(GlobalStore());
|
|
||||||
const defaults = Object.fromEntries(Object.entries(fields).map(([name, field]) => [name, field.value]));
|
|
||||||
let initialized = false;
|
|
||||||
let restoring = false;
|
|
||||||
let activeKey: string | undefined;
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => {
|
|
||||||
const context = scope?.();
|
|
||||||
if (scope && context === undefined) return undefined;
|
|
||||||
return `1panel:search:v1:${JSON.stringify([currentNode.value, page, context ?? ''])}`;
|
|
||||||
},
|
|
||||||
(key) => {
|
|
||||||
activeKey = key;
|
|
||||||
let saved: Record<string, unknown> = {};
|
|
||||||
try {
|
|
||||||
const parsed = activeKey ? JSON.parse(localStorage.getItem(activeKey) || '{}') : {};
|
|
||||||
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) saved = parsed;
|
|
||||||
} catch {}
|
|
||||||
restoring = true;
|
|
||||||
for (const [name, field] of Object.entries(fields)) {
|
|
||||||
const value = saved[name];
|
|
||||||
const initial = defaults[name];
|
|
||||||
let fallback = initial;
|
|
||||||
if (initialized) {
|
|
||||||
fallback = typeof initial === 'string' ? '' : undefined;
|
|
||||||
}
|
|
||||||
const valid =
|
|
||||||
(typeof value === 'string' || (typeof value === 'number' && Number.isFinite(value))) &&
|
|
||||||
(fallback === undefined || typeof value === typeof fallback);
|
|
||||||
if (value === null) {
|
|
||||||
field.value = typeof initial === 'string' ? '' : undefined;
|
|
||||||
} else if (valid) {
|
|
||||||
field.value = value as SearchValue;
|
|
||||||
} else {
|
|
||||||
field.value = fallback;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
restoring = false;
|
|
||||||
initialized = true;
|
|
||||||
},
|
|
||||||
{ immediate: true, flush: 'sync' },
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => Object.fromEntries(Object.entries(fields).map(([name, field]) => [name, field.value ?? null])),
|
|
||||||
(value) => {
|
|
||||||
if (restoring || !activeKey) return;
|
|
||||||
try {
|
|
||||||
localStorage.setItem(activeKey, JSON.stringify(value));
|
|
||||||
} catch {}
|
|
||||||
},
|
|
||||||
{ flush: 'sync' },
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
import { onActivated, onDeactivated } from 'vue';
|
||||||
|
import GlobalStore from '@/store/modules/global';
|
||||||
|
import { bindSearchReset, type SearchFields } from '@/utils/search-reset';
|
||||||
|
|
||||||
|
interface SearchResetOptions {
|
||||||
|
scope?: () => string | number | undefined;
|
||||||
|
onRevisit: () => unknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useSearchReset = (fields: SearchFields, options: SearchResetOptions) => {
|
||||||
|
const { currentNode } = storeToRefs(GlobalStore());
|
||||||
|
const reset = bindSearchReset(options.scope ? [currentNode, options.scope] : [currentNode], fields);
|
||||||
|
let deactivated = false;
|
||||||
|
onDeactivated(() => {
|
||||||
|
deactivated = true;
|
||||||
|
});
|
||||||
|
onActivated(() => {
|
||||||
|
if (!deactivated) return;
|
||||||
|
deactivated = false;
|
||||||
|
reset();
|
||||||
|
return options.onRevisit();
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -570,6 +570,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'Stop keeping page session',
|
cancelKeepAlive: 'Stop keeping page session',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'User Center',
|
||||||
|
exitSystem: 'Log Out',
|
||||||
logout: 'Logout',
|
logout: 'Logout',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1065,6 +1067,13 @@ const message = {
|
|||||||
whiteListHelper: 'Restrict access to only IPs in the whitelist',
|
whiteListHelper: 'Restrict access to only IPs in the whitelist',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway supports standalone deployment',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI Gateway now supports standalone deployment. The built-in AI Gateway in 1Panel will no longer receive updates. We recommend installing the standalone version from the App Store. You can also continue using the current version.',
|
||||||
|
deploymentNoticeContinue: 'Understood, continue using',
|
||||||
|
deploymentNoticeAppStore: 'Go to App Store',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'You do not have access to the App Store. Contact your administrator to install the standalone version.',
|
||||||
title: 'AI Gateway',
|
title: 'AI Gateway',
|
||||||
apiReference: 'API Reference',
|
apiReference: 'API Reference',
|
||||||
notInstalled: 'Not installed',
|
notInstalled: 'Not installed',
|
||||||
@@ -1869,6 +1878,11 @@ const message = {
|
|||||||
imageName: 'Image name',
|
imageName: 'Image name',
|
||||||
pull: 'Pull',
|
pull: 'Pull',
|
||||||
path: 'Path',
|
path: 'Path',
|
||||||
|
imageUploadDrop: 'Drop an image file here, or click to upload',
|
||||||
|
imageUploadHelper:
|
||||||
|
'Any file format is allowed. Docker validates the contents. Uploaded files are retained for retrying imports or manual deletion.',
|
||||||
|
imageUploadEmpty: 'The file is empty. Select a valid image archive.',
|
||||||
|
imageImportSubmitted: 'Image import task submitted. Check the task log for the result.',
|
||||||
importImage: 'Import',
|
importImage: 'Import',
|
||||||
buildArgs: 'Build Arguments',
|
buildArgs: 'Build Arguments',
|
||||||
imageBuild: 'Build',
|
imageBuild: 'Build',
|
||||||
@@ -4306,8 +4320,6 @@ const message = {
|
|||||||
dockerGuard: 'Container Port Guard',
|
dockerGuard: 'Container Port Guard',
|
||||||
systemFirewall: 'Host firewall',
|
systemFirewall: 'Host firewall',
|
||||||
systemFirewallHelper: 'Controls host port access and inbound firewall rules.',
|
systemFirewallHelper: 'Controls host port access and inbound firewall rules.',
|
||||||
forwardPolicyDropWarning:
|
|
||||||
'This server restricts network forwarding. Port forwarding rules may not take effect.',
|
|
||||||
forwardingHelper: 'Manages port-forwarding rules.',
|
forwardingHelper: 'Manages port-forwarding rules.',
|
||||||
dockerFirewallHelper: 'Selects how 1Panel manages container port protection.',
|
dockerFirewallHelper: 'Selects how 1Panel manages container port protection.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, experimental',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, experimental',
|
||||||
@@ -4390,9 +4402,9 @@ const message = {
|
|||||||
'Host INPUT rules do not directly protect this Docker published port. Click to open Container Port Guard.',
|
'Host INPUT rules do not directly protect this Docker published port. Click to open Container Port Guard.',
|
||||||
notInitialized: 'Not initialized',
|
notInitialized: 'Not initialized',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'IPv6 forwarding is blocked: interfaces {0} have accept_ra=1 and may rely on RA/SLAAC. Review the network configuration, persist accept_ra=2 on interfaces that need RA, then retry.',
|
'IPv6 forwarding is blocked to prevent possible network loss. See the documentation and system logs for details.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'Cannot check IPv6 RA configuration. Enabling IPv6 forwarding is blocked. Check the system network configuration and retry.',
|
'IPv6 forwarding is blocked because the network configuration could not be checked. See the system logs for details.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'IPv6 forwarding is not enabled. It will be checked and enabled when IPv6 rules are added or restored.',
|
'IPv6 forwarding is not enabled. It will be checked and enabled when IPv6 rules are added or restored.',
|
||||||
familyUnsupported: 'The system does not support {0}',
|
familyUnsupported: 'The system does not support {0}',
|
||||||
|
|||||||
@@ -570,6 +570,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'Dejar de mantener la sesión de la página',
|
cancelKeepAlive: 'Dejar de mantener la sesión de la página',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'Centro de usuario',
|
||||||
|
exitSystem: 'Cerrar sesión',
|
||||||
logout: 'Cerrar sesión',
|
logout: 'Cerrar sesión',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1069,6 +1071,13 @@ const message = {
|
|||||||
whiteListHelper: 'Restringir el acceso solo a las IP incluidas en la lista blanca',
|
whiteListHelper: 'Restringir el acceso solo a las IP incluidas en la lista blanca',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway admite la implementación independiente',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI Gateway ahora admite la implementación independiente. AI Gateway integrado en 1Panel dejará de recibir actualizaciones. Recomendamos instalar la versión independiente desde la tienda de aplicaciones. También puede seguir usando la versión actual.',
|
||||||
|
deploymentNoticeContinue: 'Entendido, seguir usando',
|
||||||
|
deploymentNoticeAppStore: 'Ir a la tienda de aplicaciones',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'No tiene acceso a la tienda de aplicaciones. Contacte con su administrador para instalar la versión independiente.',
|
||||||
title: 'Gateway de IA',
|
title: 'Gateway de IA',
|
||||||
apiReference: 'Referencia de API',
|
apiReference: 'Referencia de API',
|
||||||
notInstalled: 'No instalado',
|
notInstalled: 'No instalado',
|
||||||
@@ -1893,6 +1902,12 @@ const message = {
|
|||||||
imageName: 'Nombre de la imagen',
|
imageName: 'Nombre de la imagen',
|
||||||
pull: 'Descargar',
|
pull: 'Descargar',
|
||||||
path: 'Ruta',
|
path: 'Ruta',
|
||||||
|
imageUploadDrop: 'Arrastre un archivo de imagen aquí o haga clic para subirlo',
|
||||||
|
imageUploadHelper:
|
||||||
|
'Se permite cualquier formato de archivo. Docker valida el contenido. Los archivos subidos se conservan para reintentar la importación o eliminarlos manualmente.',
|
||||||
|
imageUploadEmpty: 'El archivo está vacío. Seleccione un archivo de imagen válido.',
|
||||||
|
imageImportSubmitted:
|
||||||
|
'Tarea de importación de imagen enviada. Consulte el registro de la tarea para ver el resultado.',
|
||||||
importImage: 'Importar',
|
importImage: 'Importar',
|
||||||
buildArgs: 'Argumentos de Construcción',
|
buildArgs: 'Argumentos de Construcción',
|
||||||
imageBuild: 'Construir',
|
imageBuild: 'Construir',
|
||||||
@@ -4357,8 +4372,6 @@ const message = {
|
|||||||
dockerGuard: 'Protección de puertos de contenedores',
|
dockerGuard: 'Protección de puertos de contenedores',
|
||||||
systemFirewall: 'Firewall del host',
|
systemFirewall: 'Firewall del host',
|
||||||
systemFirewallHelper: 'Controla el acceso a los puertos del host y las reglas de entrada.',
|
systemFirewallHelper: 'Controla el acceso a los puertos del host y las reglas de entrada.',
|
||||||
forwardPolicyDropWarning:
|
|
||||||
'Este servidor restringe el reenvío de red. Es posible que las reglas de reenvío de puertos no surtan efecto.',
|
|
||||||
forwardingHelper: 'Gestiona las reglas de reenvío de puertos.',
|
forwardingHelper: 'Gestiona las reglas de reenvío de puertos.',
|
||||||
dockerFirewallHelper: 'Selecciona cómo gestiona 1Panel la protección de puertos de contenedores.',
|
dockerFirewallHelper: 'Selecciona cómo gestiona 1Panel la protección de puertos de contenedores.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, experimental',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, experimental',
|
||||||
@@ -4443,9 +4456,9 @@ const message = {
|
|||||||
'Las reglas INPUT del host no protegen directamente este puerto publicado por Docker. Haz clic para abrir la protección de puertos de contenedores.',
|
'Las reglas INPUT del host no protegen directamente este puerto publicado por Docker. Haz clic para abrir la protección de puertos de contenedores.',
|
||||||
notInitialized: 'No inicializado',
|
notInitialized: 'No inicializado',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'El reenvío IPv6 está bloqueado: las interfaces {0} tienen accept_ra=1 y pueden depender de RA/SLAAC. Revise la configuración de red, configure accept_ra=2 de forma persistente en las interfaces que necesitan RA y vuelva a intentarlo.',
|
'El reenvío IPv6 está bloqueado para evitar una posible pérdida de conectividad. Consulte la documentación y los registros del sistema.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'No se puede comprobar la configuración RA de IPv6. Se ha bloqueado la activación del reenvío IPv6. Revise la configuración de red y vuelva a intentarlo.',
|
'El reenvío IPv6 está bloqueado porque no se pudo comprobar la configuración de red. Consulte los registros del sistema.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'El reenvío IPv6 no está habilitado. Se comprobará y habilitará al añadir o restaurar reglas IPv6.',
|
'El reenvío IPv6 no está habilitado. Se comprobará y habilitará al añadir o restaurar reglas IPv6.',
|
||||||
familyUnsupported: 'El sistema no admite {0}',
|
familyUnsupported: 'El sistema no admite {0}',
|
||||||
|
|||||||
@@ -565,6 +565,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'لغو حفظ نشست صفحه',
|
cancelKeepAlive: 'لغو حفظ نشست صفحه',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'مرکز کاربری',
|
||||||
|
exitSystem: 'خروج از سیستم',
|
||||||
logout: 'خروج',
|
logout: 'خروج',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1051,6 +1053,13 @@ const message = {
|
|||||||
whiteListHelper: 'دسترسی را فقط به IPهای موجود در لیست سفید محدود کنید',
|
whiteListHelper: 'دسترسی را فقط به IPهای موجود در لیست سفید محدود کنید',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'درگاه هوش مصنوعی از استقرار مستقل پشتیبانی میکند',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'درگاه هوش مصنوعی اکنون از استقرار مستقل پشتیبانی میکند. درگاه هوش مصنوعی داخلی 1Panel دیگر بهروزرسانی دریافت نخواهد کرد. توصیه میکنیم نسخه مستقل را از فروشگاه برنامه نصب کنید. همچنین میتوانید به استفاده از نسخه فعلی ادامه دهید.',
|
||||||
|
deploymentNoticeContinue: 'متوجه شدم، ادامه استفاده',
|
||||||
|
deploymentNoticeAppStore: 'رفتن به فروشگاه برنامه',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'شما به فروشگاه برنامه دسترسی ندارید. برای نصب نسخه مستقل با مدیر تماس بگیرید.',
|
||||||
title: 'دروازه AI',
|
title: 'دروازه AI',
|
||||||
apiReference: 'راهنمای API',
|
apiReference: 'راهنمای API',
|
||||||
notInstalled: 'نصب نشده',
|
notInstalled: 'نصب نشده',
|
||||||
@@ -1853,6 +1862,11 @@ const message = {
|
|||||||
imageName: 'نام تصویر',
|
imageName: 'نام تصویر',
|
||||||
pull: 'دریافت',
|
pull: 'دریافت',
|
||||||
path: 'مسیر',
|
path: 'مسیر',
|
||||||
|
imageUploadDrop: 'فایل ایمیج را اینجا بکشید یا برای بارگذاری کلیک کنید',
|
||||||
|
imageUploadHelper:
|
||||||
|
'همه قالبهای فایل مجاز هستند. Docker محتوای فایل را اعتبارسنجی میکند. فایلهای بارگذاریشده برای تلاش مجدد جهت وارد کردن یا حذف دستی نگه داشته میشوند.',
|
||||||
|
imageUploadEmpty: 'فایل خالی است. یک فایل ایمیج معتبر انتخاب کنید.',
|
||||||
|
imageImportSubmitted: 'وظیفه وارد کردن ایمیج ثبت شد. برای مشاهده نتیجه، گزارش وظیفه را بررسی کنید.',
|
||||||
importImage: 'واردات',
|
importImage: 'واردات',
|
||||||
buildArgs: 'آرگومانهای ساخت',
|
buildArgs: 'آرگومانهای ساخت',
|
||||||
imageBuild: 'ساخت',
|
imageBuild: 'ساخت',
|
||||||
@@ -4271,7 +4285,6 @@ const message = {
|
|||||||
dockerGuard: 'محافظت از پورت کانتینر',
|
dockerGuard: 'محافظت از پورت کانتینر',
|
||||||
systemFirewall: 'فایروال میزبان',
|
systemFirewall: 'فایروال میزبان',
|
||||||
systemFirewallHelper: 'دسترسی پورتهای میزبان و قوانین ورودی را کنترل میکند.',
|
systemFirewallHelper: 'دسترسی پورتهای میزبان و قوانین ورودی را کنترل میکند.',
|
||||||
forwardPolicyDropWarning: 'این سرور هدایت ترافیک شبکه را محدود کرده است. ممکن است قوانین هدایت پورت کار نکنند.',
|
|
||||||
forwardingHelper: 'قوانین انتقال پورت را مدیریت میکند.',
|
forwardingHelper: 'قوانین انتقال پورت را مدیریت میکند.',
|
||||||
dockerFirewallHelper: 'روش مدیریت محافظت از پورت کانتینر در 1Panel را انتخاب میکند.',
|
dockerFirewallHelper: 'روش مدیریت محافظت از پورت کانتینر در 1Panel را انتخاب میکند.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0، آزمایشی',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0، آزمایشی',
|
||||||
@@ -4355,10 +4368,9 @@ const message = {
|
|||||||
dockerInputNotProtected:
|
dockerInputNotProtected:
|
||||||
'قوانین INPUT میزبان مستقیماً از این پورت منتشرشده Docker محافظت نمیکنند. برای باز کردن محافظت از پورت کانتینر کلیک کنید.',
|
'قوانین INPUT میزبان مستقیماً از این پورت منتشرشده Docker محافظت نمیکنند. برای باز کردن محافظت از پورت کانتینر کلیک کنید.',
|
||||||
notInitialized: 'راهاندازی نشده',
|
notInitialized: 'راهاندازی نشده',
|
||||||
ipv6RARisk:
|
ipv6RARisk: 'فعالسازی هدایت IPv6 به دلیل خطر قطع شبکه مسدود شد. مستندات و گزارشهای سیستم را بررسی کنید.',
|
||||||
'هدایت IPv6 مسدود شد: رابطهای {0} دارای accept_ra=1 هستند و ممکن است به RA/SLAAC وابسته باشند. تنظیمات شبکه را بررسی کنید، برای رابطهای نیازمند RA مقدار accept_ra=2 را بهصورت پایدار تنظیم کنید و دوباره تلاش کنید.',
|
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'بررسی تنظیمات RA در IPv6 ممکن نیست. فعالسازی هدایت IPv6 مسدود شده است. تنظیمات شبکه سیستم را بررسی کرده و دوباره تلاش کنید.',
|
'فعالسازی هدایت IPv6 به دلیل عدم امکان بررسی پیکربندی شبکه مسدود شد. جزئیات در گزارشهای سیستم موجود است.',
|
||||||
ipv6ForwardingOnDemand: 'هدایت IPv6 فعال نیست. هنگام افزودن یا بازیابی قوانین IPv6 بررسی و فعال خواهد شد.',
|
ipv6ForwardingOnDemand: 'هدایت IPv6 فعال نیست. هنگام افزودن یا بازیابی قوانین IPv6 بررسی و فعال خواهد شد.',
|
||||||
familyUnsupported: 'سیستم از {0} پشتیبانی نمیکند',
|
familyUnsupported: 'سیستم از {0} پشتیبانی نمیکند',
|
||||||
familyChainIssue: '{0} · زنجیره {1} · {2}',
|
familyChainIssue: '{0} · زنجیره {1} · {2}',
|
||||||
|
|||||||
@@ -568,6 +568,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'ページセッションの保持を解除',
|
cancelKeepAlive: 'ページセッションの保持を解除',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'ユーザーセンター',
|
||||||
|
exitSystem: 'ログアウト',
|
||||||
logout: 'ログアウト',
|
logout: 'ログアウト',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1054,6 +1056,13 @@ const message = {
|
|||||||
whiteListHelper: 'ホワイトリスト内のIPのみアクセスを許可する',
|
whiteListHelper: 'ホワイトリスト内のIPのみアクセスを許可する',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI ゲートウェイの独立したデプロイに対応',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI ゲートウェイは独立したデプロイに対応しました。1Panel 内蔵の AI ゲートウェイは今後更新されません。アプリストアから独立版をインストールすることをお勧めします。現在のバージョンを引き続き使用することもできます。',
|
||||||
|
deploymentNoticeContinue: '了解して使用を継続',
|
||||||
|
deploymentNoticeAppStore: 'アプリストアへ',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'アプリストアへのアクセス権限がありません。管理者に独立版のインストールを依頼してください。',
|
||||||
title: 'AI ゲートウェイ',
|
title: 'AI ゲートウェイ',
|
||||||
apiReference: 'API リファレンス',
|
apiReference: 'API リファレンス',
|
||||||
notInstalled: '未インストール',
|
notInstalled: '未インストール',
|
||||||
@@ -1850,6 +1859,11 @@ const message = {
|
|||||||
imageName: '画像名',
|
imageName: '画像名',
|
||||||
pull: '引く',
|
pull: '引く',
|
||||||
path: 'パス',
|
path: 'パス',
|
||||||
|
imageUploadDrop: 'イメージファイルをここにドラッグするか、クリックしてアップロードしてください',
|
||||||
|
imageUploadHelper:
|
||||||
|
'ファイル形式に制限はありません。Docker が内容を検証します。アップロードしたファイルは保持されるため、インポートを再試行したり、手動で削除したりできます。',
|
||||||
|
imageUploadEmpty: 'ファイルが空です。有効なイメージファイルを選択してください。',
|
||||||
|
imageImportSubmitted: 'イメージのインポートタスクを送信しました。結果はタスクログで確認してください。',
|
||||||
importImage: '輸入',
|
importImage: '輸入',
|
||||||
buildArgs: 'ビルド引数',
|
buildArgs: 'ビルド引数',
|
||||||
imageBuild: '建てる',
|
imageBuild: '建てる',
|
||||||
@@ -4294,8 +4308,6 @@ const message = {
|
|||||||
dockerGuard: 'コンテナポート保護',
|
dockerGuard: 'コンテナポート保護',
|
||||||
systemFirewall: 'ホストファイアウォール',
|
systemFirewall: 'ホストファイアウォール',
|
||||||
systemFirewallHelper: 'ホストのポートアクセスと受信ルールを管理します。',
|
systemFirewallHelper: 'ホストのポートアクセスと受信ルールを管理します。',
|
||||||
forwardPolicyDropWarning:
|
|
||||||
'このサーバーではネットワーク転送が制限されているため、ポート転送ルールが機能しない可能性があります。',
|
|
||||||
forwardingHelper: 'ポート転送ルールを管理します。',
|
forwardingHelper: 'ポート転送ルールを管理します。',
|
||||||
dockerFirewallHelper: '1Panel のコンテナポート保護の管理方法を選択します。',
|
dockerFirewallHelper: '1Panel のコンテナポート保護の管理方法を選択します。',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0、実験的',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0、実験的',
|
||||||
@@ -4377,9 +4389,9 @@ const message = {
|
|||||||
'ホストの INPUT ルールでは、この Docker 公開ポートを直接保護できません。クリックしてコンテナポート保護を開きます。',
|
'ホストの INPUT ルールでは、この Docker 公開ポートを直接保護できません。クリックしてコンテナポート保護を開きます。',
|
||||||
notInitialized: '未初期化',
|
notInitialized: '未初期化',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'IPv6 転送がブロックされています。インターフェース {0} は accept_ra=1 で、RA/SLAAC に依存している可能性があります。ネットワーク設定を確認し、RA が必要なインターフェースで accept_ra=2 を永続的に設定してから再試行してください。',
|
'ネットワーク切断のおそれがあるため、IPv6 転送の有効化をブロックしました。ドキュメントとシステムログをご確認ください。',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'IPv6 RA 設定を確認できないため、IPv6 転送の有効化をブロックしました。システムのネットワーク設定を確認して再試行してください。',
|
'ネットワーク設定を確認できないため、IPv6 転送の有効化をブロックしました。詳細はシステムログをご確認ください。',
|
||||||
ipv6ForwardingOnDemand: 'IPv6 転送は無効です。IPv6 ルールの追加または復元時に確認して有効化します。',
|
ipv6ForwardingOnDemand: 'IPv6 転送は無効です。IPv6 ルールの追加または復元時に確認して有効化します。',
|
||||||
familyUnsupported: 'システムは {0} をサポートしていません',
|
familyUnsupported: 'システムは {0} をサポートしていません',
|
||||||
familyChainIssue: '{0} · {1} チェーン · {2}',
|
familyChainIssue: '{0} · {1} チェーン · {2}',
|
||||||
|
|||||||
@@ -562,6 +562,8 @@ const message = {
|
|||||||
cancelKeepAlive: '페이지 세션 유지 해제',
|
cancelKeepAlive: '페이지 세션 유지 해제',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: '사용자 센터',
|
||||||
|
exitSystem: '로그아웃',
|
||||||
logout: '로그아웃',
|
logout: '로그아웃',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1043,6 +1045,12 @@ const message = {
|
|||||||
whiteListHelper: '화이트리스트에 있는 IP만 접근 허용',
|
whiteListHelper: '화이트리스트에 있는 IP만 접근 허용',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI 게이트웨이 독립 배포 지원',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI 게이트웨이가 독립 배포를 지원합니다. 1Panel 내장 AI 게이트웨이는 더 이상 업데이트되지 않습니다. 앱 스토어에서 독립 버전을 설치하는 것을 권장합니다. 현재 버전을 계속 사용할 수도 있습니다.',
|
||||||
|
deploymentNoticeContinue: '확인, 계속 사용',
|
||||||
|
deploymentNoticeAppStore: '앱 스토어로 이동',
|
||||||
|
deploymentNoticeNoAppPermission: '앱 스토어 접근 권한이 없습니다. 관리자에게 독립 버전 설치를 요청하세요.',
|
||||||
title: 'AI 게이트웨이',
|
title: 'AI 게이트웨이',
|
||||||
apiReference: 'API 안내',
|
apiReference: 'API 안내',
|
||||||
notInstalled: '설치되지 않음',
|
notInstalled: '설치되지 않음',
|
||||||
@@ -1833,6 +1841,11 @@ const message = {
|
|||||||
imageName: '이미지 이름',
|
imageName: '이미지 이름',
|
||||||
pull: '풀',
|
pull: '풀',
|
||||||
path: '경로',
|
path: '경로',
|
||||||
|
imageUploadDrop: '이미지 파일을 여기로 끌어 놓거나 클릭하여 업로드하세요',
|
||||||
|
imageUploadHelper:
|
||||||
|
'파일 형식에는 제한이 없습니다. Docker가 내용을 검증합니다. 업로드한 파일은 보관되므로 가져오기를 다시 시도하거나 수동으로 삭제할 수 있습니다.',
|
||||||
|
imageUploadEmpty: '빈 파일입니다. 유효한 이미지 파일을 선택하세요.',
|
||||||
|
imageImportSubmitted: '이미지 가져오기 작업이 제출되었습니다. 작업 로그에서 결과를 확인하세요.',
|
||||||
importImage: '가져오기',
|
importImage: '가져오기',
|
||||||
buildArgs: '빌드 인수',
|
buildArgs: '빌드 인수',
|
||||||
imageBuild: '이미지 빌드',
|
imageBuild: '이미지 빌드',
|
||||||
@@ -4215,7 +4228,6 @@ const message = {
|
|||||||
dockerGuard: '컨테이너 포트 보호',
|
dockerGuard: '컨테이너 포트 보호',
|
||||||
systemFirewall: '호스트 방화벽',
|
systemFirewall: '호스트 방화벽',
|
||||||
systemFirewallHelper: '호스트 포트 접근과 인바운드 규칙을 관리합니다.',
|
systemFirewallHelper: '호스트 포트 접근과 인바운드 규칙을 관리합니다.',
|
||||||
forwardPolicyDropWarning: '현재 서버에서 네트워크 전달이 제한되어 포트 전달 규칙이 작동하지 않을 수 있습니다.',
|
|
||||||
forwardingHelper: '포트 포워딩 규칙을 관리합니다.',
|
forwardingHelper: '포트 포워딩 규칙을 관리합니다.',
|
||||||
dockerFirewallHelper: '1Panel 컨테이너 포트 보호 관리 방식을 선택합니다.',
|
dockerFirewallHelper: '1Panel 컨테이너 포트 보호 관리 방식을 선택합니다.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, 실험적',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, 실험적',
|
||||||
@@ -4296,9 +4308,9 @@ const message = {
|
|||||||
'호스트 INPUT 규칙은 이 Docker 게시 포트를 직접 보호하지 않습니다. 클릭하여 컨테이너 포트 보호를 여세요.',
|
'호스트 INPUT 규칙은 이 Docker 게시 포트를 직접 보호하지 않습니다. 클릭하여 컨테이너 포트 보호를 여세요.',
|
||||||
notInitialized: '초기화되지 않음',
|
notInitialized: '초기화되지 않음',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'IPv6 전달이 차단되었습니다. 인터페이스 {0}의 accept_ra=1 설정으로 인해 RA/SLAAC에 의존할 수 있습니다. 네트워크 설정을 확인하고 RA가 필요한 인터페이스에 accept_ra=2를 영구 설정한 후 다시 시도하세요.',
|
'네트워크 연결이 끊길 위험이 있어 IPv6 전달 활성화를 차단했습니다. 문서와 시스템 로그를 확인하세요.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'IPv6 RA 설정을 확인할 수 없어 IPv6 전달 활성화를 차단했습니다. 시스템 네트워크 설정을 확인한 후 다시 시도하세요.',
|
'네트워크 구성을 확인할 수 없어 IPv6 전달 활성화를 차단했습니다. 자세한 내용은 시스템 로그를 확인하세요.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'IPv6 전달이 활성화되지 않았습니다. IPv6 규칙을 추가하거나 복원할 때 확인 후 활성화됩니다.',
|
'IPv6 전달이 활성화되지 않았습니다. IPv6 규칙을 추가하거나 복원할 때 확인 후 활성화됩니다.',
|
||||||
familyUnsupported: '시스템에서 {0}을 지원하지 않습니다',
|
familyUnsupported: '시스템에서 {0}을 지원하지 않습니다',
|
||||||
|
|||||||
@@ -563,6 +563,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'ຍົກເລີກການຮັກສາເຊັດຊັນໜ້າ',
|
cancelKeepAlive: 'ຍົກເລີກການຮັກສາເຊັດຊັນໜ້າ',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'ສູນຜູ້ໃຊ້',
|
||||||
|
exitSystem: 'ອອກຈາກລະບົບ',
|
||||||
logout: 'ອອກຈາກລະບົບ',
|
logout: 'ອອກຈາກລະບົບ',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1040,6 +1042,13 @@ const message = {
|
|||||||
whiteListHelper: 'ຈຳກັດການເຂົ້າເຖິງສະເພາະ IP ໃນລາຍຊື່ທີ່ອະນຸຍາດ',
|
whiteListHelper: 'ຈຳກັດການເຂົ້າເຖິງສະເພາະ IP ໃນລາຍຊື່ທີ່ອະນຸຍາດ',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway ຮອງຮັບການຕິດຕັ້ງແບບແຍກຕ່າງຫາກ',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI Gateway ຮອງຮັບການຕິດຕັ້ງແບບແຍກຕ່າງຫາກແລ້ວ. AI Gateway ທີ່ມາພ້ອມກັບ 1Panel ຈະບໍ່ໄດ້ຮັບການອັບເດດອີກ. ແນະນຳໃຫ້ຕິດຕັ້ງລຸ້ນແຍກຕ່າງຫາກຈາກຮ້ານແອັບ. ທ່ານຍັງສາມາດໃຊ້ລຸ້ນປັດຈຸບັນຕໍ່ໄດ້.',
|
||||||
|
deploymentNoticeContinue: 'ຮັບຊາບ, ໃຊ້ຕໍ່',
|
||||||
|
deploymentNoticeAppStore: 'ໄປທີ່ຮ້ານແອັບ',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'ທ່ານບໍ່ມີສິດເຂົ້າເຖິງຮ້ານແອັບ. ກະລຸນາຕິດຕໍ່ຜູ້ດູແລເພື່ອຕິດຕັ້ງລຸ້ນແຍກຕ່າງຫາກ.',
|
||||||
title: 'AI Gateway',
|
title: 'AI Gateway',
|
||||||
apiReference: 'ຄູ່ມື API',
|
apiReference: 'ຄູ່ມື API',
|
||||||
notInstalled: 'ຍັງບໍ່ໄດ້ຕິດຕັ້ງ',
|
notInstalled: 'ຍັງບໍ່ໄດ້ຕິດຕັ້ງ',
|
||||||
@@ -1822,6 +1831,11 @@ const message = {
|
|||||||
imageName: 'ຊື່ Image',
|
imageName: 'ຊື່ Image',
|
||||||
pull: 'ດຶງຂໍ້ມູນ (Pull)',
|
pull: 'ດຶງຂໍ້ມູນ (Pull)',
|
||||||
path: 'ເສັ້ນທາງ',
|
path: 'ເສັ້ນທາງ',
|
||||||
|
imageUploadDrop: 'ລາກໄຟລ໌ອິມເມຈມາວາງບ່ອນນີ້ ຫຼື ຄລິກເພື່ອອັບໂຫຼດ',
|
||||||
|
imageUploadHelper:
|
||||||
|
'ບໍ່ຈຳກັດຮູບແບບໄຟລ໌. Docker ຈະກວດສອບເນື້ອຫາ. ໄຟລ໌ທີ່ອັບໂຫຼດຈະຖືກເກັບໄວ້ ເພື່ອໃຫ້ສາມາດລອງນຳເຂົ້າອີກຄັ້ງ ຫຼື ລຶບດ້ວຍຕົນເອງ.',
|
||||||
|
imageUploadEmpty: 'ໄຟລ໌ຫວ່າງເປົ່າ. ກະລຸນາເລືອກໄຟລ໌ອິມເມຈທີ່ຖືກຕ້ອງ.',
|
||||||
|
imageImportSubmitted: 'ສົ່ງວຽກນຳເຂົ້າອິມເມຈແລ້ວ. ກະລຸນາເບິ່ງບັນທຶກວຽກເພື່ອກວດສອບຜົນ.',
|
||||||
importImage: 'ນຳເຂົ້າ',
|
importImage: 'ນຳເຂົ້າ',
|
||||||
buildArgs: 'Build Arguments',
|
buildArgs: 'Build Arguments',
|
||||||
imageBuild: 'ສ້າງ (Build)',
|
imageBuild: 'ສ້າງ (Build)',
|
||||||
@@ -4182,7 +4196,6 @@ const message = {
|
|||||||
dockerGuard: 'ການປ້ອງກັນພອດຄອນເທນເນີ',
|
dockerGuard: 'ການປ້ອງກັນພອດຄອນເທນເນີ',
|
||||||
systemFirewall: 'ໄຟວໍໂຮສ',
|
systemFirewall: 'ໄຟວໍໂຮສ',
|
||||||
systemFirewallHelper: 'ຄວບຄຸມການເຂົ້າເຖິງພອດໂຮສ ແລະ ກົດຂາເຂົ້າ.',
|
systemFirewallHelper: 'ຄວບຄຸມການເຂົ້າເຖິງພອດໂຮສ ແລະ ກົດຂາເຂົ້າ.',
|
||||||
forwardPolicyDropWarning: 'ເຊີບເວີນີ້ຈຳກັດການສົ່ງຕໍ່ເຄືອຂ່າຍ. ກົດການສົ່ງຕໍ່ພອດອາດບໍ່ເຮັດວຽກ.',
|
|
||||||
forwardingHelper: 'ຈັດການກົດການສົ່ງຕໍ່ພອດ.',
|
forwardingHelper: 'ຈັດການກົດການສົ່ງຕໍ່ພອດ.',
|
||||||
dockerFirewallHelper: 'ເລືອກວິທີທີ່ 1Panel ຈັດການການປ້ອງກັນພອດຄອນເທນເນີ.',
|
dockerFirewallHelper: 'ເລືອກວິທີທີ່ 1Panel ຈັດການການປ້ອງກັນພອດຄອນເທນເນີ.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, ທົດລອງ',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, ທົດລອງ',
|
||||||
@@ -4260,9 +4273,9 @@ const message = {
|
|||||||
'ກົດ INPUT ຂອງໂຮສບໍ່ໄດ້ປ້ອງກັນພອດ Docker ນີ້ໂດຍກົງ. ຄລິກເພື່ອເປີດການປ້ອງກັນພອດຄອນເທນເນີ.',
|
'ກົດ INPUT ຂອງໂຮສບໍ່ໄດ້ປ້ອງກັນພອດ Docker ນີ້ໂດຍກົງ. ຄລິກເພື່ອເປີດການປ້ອງກັນພອດຄອນເທນເນີ.',
|
||||||
notInitialized: 'ຍັງບໍ່ໄດ້ເລີ່ມຕົ້ນ',
|
notInitialized: 'ຍັງບໍ່ໄດ້ເລີ່ມຕົ້ນ',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'ການສົ່ງຕໍ່ IPv6 ຖືກບລັອກ: ອິນເຕີເຟດ {0} ມີ accept_ra=1 ແລະອາດອາໄສ RA/SLAAC. ກວດສອບການຕັ້ງຄ່າເຄືອຂ່າຍ, ຕັ້ງ accept_ra=2 ແບບຖາວອນໃຫ້ອິນເຕີເຟດທີ່ຕ້ອງການ RA ແລ້ວລອງໃໝ່.',
|
'ການສົ່ງຕໍ່ IPv6 ຖືກບລັອກເພື່ອປ້ອງກັນຄວາມສ່ຽງທີ່ເຄືອຂ່າຍຈະຂາດການເຊື່ອມຕໍ່. ເບິ່ງເອກະສານ ແລະ ບັນທຶກລະບົບ.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'ບໍ່ສາມາດກວດສອບການຕັ້ງຄ່າ IPv6 RA ໄດ້. ການເປີດໃຊ້ການສົ່ງຕໍ່ IPv6 ຖືກບລັອກ. ກວດສອບການຕັ້ງຄ່າເຄືອຂ່າຍແລ້ວລອງໃໝ່.',
|
'ການສົ່ງຕໍ່ IPv6 ຖືກບລັອກເນື່ອງຈາກບໍ່ສາມາດກວດສອບການຕັ້ງຄ່າເຄືອຂ່າຍໄດ້. ເບິ່ງລາຍລະອຽດໃນບັນທຶກລະບົບ.',
|
||||||
ipv6ForwardingOnDemand: 'ຍັງບໍ່ໄດ້ເປີດໃຊ້ການສົ່ງຕໍ່ IPv6. ລະບົບຈະກວດສອບແລະເປີດໃຊ້ເມື່ອເພີ່ມຫຼືກູ້ຄືນກົດ IPv6.',
|
ipv6ForwardingOnDemand: 'ຍັງບໍ່ໄດ້ເປີດໃຊ້ການສົ່ງຕໍ່ IPv6. ລະບົບຈະກວດສອບແລະເປີດໃຊ້ເມື່ອເພີ່ມຫຼືກູ້ຄືນກົດ IPv6.',
|
||||||
familyUnsupported: 'ລະບົບບໍ່ຮອງຮັບ {0}',
|
familyUnsupported: 'ລະບົບບໍ່ຮອງຮັບ {0}',
|
||||||
familyChainIssue: '{0} · chain {1} · {2}',
|
familyChainIssue: '{0} · chain {1} · {2}',
|
||||||
|
|||||||
@@ -575,6 +575,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'Hentikan pengekalan sesi halaman',
|
cancelKeepAlive: 'Hentikan pengekalan sesi halaman',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'Pusat Pengguna',
|
||||||
|
exitSystem: 'Log keluar',
|
||||||
logout: 'Log keluar',
|
logout: 'Log keluar',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1077,6 +1079,13 @@ const message = {
|
|||||||
whiteListHelper: 'Hadkan akses kepada hanya IP dalam senarai putih',
|
whiteListHelper: 'Hadkan akses kepada hanya IP dalam senarai putih',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway menyokong penggunaan kendiri',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI Gateway kini menyokong penggunaan kendiri. AI Gateway terbina dalam 1Panel tidak lagi akan menerima kemas kini. Kami mengesyorkan pemasangan versi kendiri daripada gedung aplikasi. Anda juga boleh terus menggunakan versi semasa.',
|
||||||
|
deploymentNoticeContinue: 'Faham, terus gunakan',
|
||||||
|
deploymentNoticeAppStore: 'Pergi ke gedung aplikasi',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'Anda tidak mempunyai akses ke gedung aplikasi. Hubungi pentadbir untuk memasang versi kendiri.',
|
||||||
title: 'Gateway AI',
|
title: 'Gateway AI',
|
||||||
apiReference: 'Rujukan API',
|
apiReference: 'Rujukan API',
|
||||||
notInstalled: 'Belum dipasang',
|
notInstalled: 'Belum dipasang',
|
||||||
@@ -1882,6 +1891,11 @@ const message = {
|
|||||||
imageName: 'Nama imej',
|
imageName: 'Nama imej',
|
||||||
pull: 'Tarik',
|
pull: 'Tarik',
|
||||||
path: 'Laluan',
|
path: 'Laluan',
|
||||||
|
imageUploadDrop: 'Seret fail imej ke sini atau klik untuk memuat naik',
|
||||||
|
imageUploadHelper:
|
||||||
|
'Semua format fail dibenarkan. Docker mengesahkan kandungannya. Fail yang dimuat naik disimpan untuk mencuba semula import atau dipadam secara manual.',
|
||||||
|
imageUploadEmpty: 'Fail kosong. Pilih arkib imej yang sah.',
|
||||||
|
imageImportSubmitted: 'Tugas import imej telah dihantar. Semak log tugas untuk melihat hasilnya.',
|
||||||
importImage: 'Import',
|
importImage: 'Import',
|
||||||
buildArgs: 'Argumen Binaan',
|
buildArgs: 'Argumen Binaan',
|
||||||
imageBuild: 'Bina',
|
imageBuild: 'Bina',
|
||||||
@@ -4374,8 +4388,6 @@ const message = {
|
|||||||
dockerGuard: 'Perlindungan port bekas',
|
dockerGuard: 'Perlindungan port bekas',
|
||||||
systemFirewall: 'Tembok api hos',
|
systemFirewall: 'Tembok api hos',
|
||||||
systemFirewallHelper: 'Mengawal akses port hos dan peraturan masuk.',
|
systemFirewallHelper: 'Mengawal akses port hos dan peraturan masuk.',
|
||||||
forwardPolicyDropWarning:
|
|
||||||
'Pelayan ini mengehadkan pemajuan rangkaian. Peraturan pemajuan port mungkin tidak berfungsi.',
|
|
||||||
forwardingHelper: 'Mengurus peraturan pemajuan port.',
|
forwardingHelper: 'Mengurus peraturan pemajuan port.',
|
||||||
dockerFirewallHelper: 'Memilih cara 1Panel mengurus perlindungan port bekas.',
|
dockerFirewallHelper: 'Memilih cara 1Panel mengurus perlindungan port bekas.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, percubaan',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, percubaan',
|
||||||
@@ -4459,9 +4471,9 @@ const message = {
|
|||||||
'Peraturan INPUT hos tidak melindungi port terbitan Docker ini secara langsung. Klik untuk membuka perlindungan port bekas.',
|
'Peraturan INPUT hos tidak melindungi port terbitan Docker ini secara langsung. Klik untuk membuka perlindungan port bekas.',
|
||||||
notInitialized: 'Belum dimulakan',
|
notInitialized: 'Belum dimulakan',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'Pemajuan IPv6 disekat: antara muka {0} mempunyai accept_ra=1 dan mungkin bergantung pada RA/SLAAC. Semak konfigurasi rangkaian, tetapkan accept_ra=2 secara kekal pada antara muka yang memerlukan RA, kemudian cuba lagi.',
|
'Pemajuan IPv6 disekat bagi mengelakkan risiko kehilangan sambungan rangkaian. Rujuk dokumentasi dan log sistem.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'Konfigurasi RA IPv6 tidak dapat diperiksa. Pengaktifan pemajuan IPv6 disekat. Semak konfigurasi rangkaian sistem dan cuba lagi.',
|
'Pemajuan IPv6 disekat kerana konfigurasi rangkaian tidak dapat diperiksa. Lihat log sistem untuk butiran.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'Pemajuan IPv6 belum diaktifkan. Ia akan diperiksa dan diaktifkan apabila peraturan IPv6 ditambah atau dipulihkan.',
|
'Pemajuan IPv6 belum diaktifkan. Ia akan diperiksa dan diaktifkan apabila peraturan IPv6 ditambah atau dipulihkan.',
|
||||||
familyUnsupported: 'Sistem tidak menyokong {0}',
|
familyUnsupported: 'Sistem tidak menyokong {0}',
|
||||||
|
|||||||
@@ -568,6 +568,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'Parar de manter a sessão da página',
|
cancelKeepAlive: 'Parar de manter a sessão da página',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'Central do usuário',
|
||||||
|
exitSystem: 'Sair',
|
||||||
logout: 'Logout',
|
logout: 'Logout',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1072,6 +1074,13 @@ const message = {
|
|||||||
'Após ativar, você pode desativar o acesso externo à porta em Loja de Apps - Instalado - Ollama - Parâmetros para melhorar a segurança.',
|
'Após ativar, você pode desativar o acesso externo à porta em Loja de Apps - Instalado - Ollama - Parâmetros para melhorar a segurança.',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway permite implantação independente',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'O AI Gateway agora permite implantação independente. O AI Gateway integrado ao 1Panel não receberá mais atualizações. Recomendamos instalar a versão independente pela loja de aplicativos. Você também pode continuar usando a versão atual.',
|
||||||
|
deploymentNoticeContinue: 'Entendido, continuar usando',
|
||||||
|
deploymentNoticeAppStore: 'Ir à loja de aplicativos',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'Você não tem acesso à loja de aplicativos. Contate o administrador para instalar a versão independente.',
|
||||||
title: 'Gateway de IA',
|
title: 'Gateway de IA',
|
||||||
apiReference: 'Referência da API',
|
apiReference: 'Referência da API',
|
||||||
notInstalled: 'Não instalado',
|
notInstalled: 'Não instalado',
|
||||||
@@ -1884,6 +1893,11 @@ const message = {
|
|||||||
imageName: 'Nome da imagem',
|
imageName: 'Nome da imagem',
|
||||||
pull: 'Puxar',
|
pull: 'Puxar',
|
||||||
path: 'Caminho',
|
path: 'Caminho',
|
||||||
|
imageUploadDrop: 'Arraste um arquivo de imagem para cá ou clique para enviar',
|
||||||
|
imageUploadHelper:
|
||||||
|
'Qualquer formato de arquivo é permitido. O Docker valida o conteúdo. Os arquivos enviados são mantidos para novas tentativas de importação ou exclusão manual.',
|
||||||
|
imageUploadEmpty: 'O arquivo está vazio. Selecione um arquivo de imagem válido.',
|
||||||
|
imageImportSubmitted: 'Tarefa de importação de imagem enviada. Consulte o log da tarefa para ver o resultado.',
|
||||||
importImage: 'Importar',
|
importImage: 'Importar',
|
||||||
buildArgs: 'Argumentos de Build',
|
buildArgs: 'Argumentos de Build',
|
||||||
imageBuild: 'Construção de imagem',
|
imageBuild: 'Construção de imagem',
|
||||||
@@ -4395,8 +4409,6 @@ const message = {
|
|||||||
dockerGuard: 'Proteção de portas de contêineres',
|
dockerGuard: 'Proteção de portas de contêineres',
|
||||||
systemFirewall: 'Firewall do host',
|
systemFirewall: 'Firewall do host',
|
||||||
systemFirewallHelper: 'Controla o acesso às portas do host e as regras de entrada.',
|
systemFirewallHelper: 'Controla o acesso às portas do host e as regras de entrada.',
|
||||||
forwardPolicyDropWarning:
|
|
||||||
'Este servidor restringe o encaminhamento de rede. As regras de encaminhamento de portas podem não funcionar.',
|
|
||||||
forwardingHelper: 'Gerencia regras de encaminhamento de portas.',
|
forwardingHelper: 'Gerencia regras de encaminhamento de portas.',
|
||||||
dockerFirewallHelper: 'Seleciona como o 1Panel gerencia a proteção de portas de contêineres.',
|
dockerFirewallHelper: 'Seleciona como o 1Panel gerencia a proteção de portas de contêineres.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, experimental',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, experimental',
|
||||||
@@ -4482,9 +4494,9 @@ const message = {
|
|||||||
'As regras INPUT do host não protegem diretamente esta porta publicada pelo Docker. Clique para abrir a proteção de portas de contêineres.',
|
'As regras INPUT do host não protegem diretamente esta porta publicada pelo Docker. Clique para abrir a proteção de portas de contêineres.',
|
||||||
notInitialized: 'Não inicializado',
|
notInitialized: 'Não inicializado',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'O encaminhamento IPv6 foi bloqueado: as interfaces {0} têm accept_ra=1 e podem depender de RA/SLAAC. Verifique a configuração de rede, configure accept_ra=2 de forma persistente nas interfaces que precisam de RA e tente novamente.',
|
'O encaminhamento IPv6 foi bloqueado para evitar uma possível perda de conexão. Consulte a documentação e os logs do sistema.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'Não foi possível verificar a configuração RA do IPv6. A ativação do encaminhamento IPv6 foi bloqueada. Verifique a configuração de rede e tente novamente.',
|
'O encaminhamento IPv6 foi bloqueado porque não foi possível verificar a configuração de rede. Consulte os logs do sistema.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'O encaminhamento IPv6 não está ativado. Ele será verificado e ativado ao adicionar ou restaurar regras IPv6.',
|
'O encaminhamento IPv6 não está ativado. Ele será verificado e ativado ao adicionar ou restaurar regras IPv6.',
|
||||||
familyUnsupported: 'O sistema não oferece suporte a {0}',
|
familyUnsupported: 'O sistema não oferece suporte a {0}',
|
||||||
|
|||||||
@@ -566,6 +566,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'Не сохранять сеанс страницы',
|
cancelKeepAlive: 'Не сохранять сеанс страницы',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'Центр пользователя',
|
||||||
|
exitSystem: 'Выйти из системы',
|
||||||
logout: 'Выход',
|
logout: 'Выход',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1065,6 +1067,13 @@ const message = {
|
|||||||
whiteListHelper: 'Ограничить доступ только для IP-адресов из белого списка',
|
whiteListHelper: 'Ограничить доступ только для IP-адресов из белого списка',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway поддерживает отдельное развёртывание',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI Gateway теперь поддерживает отдельное развёртывание. Встроенный AI Gateway в 1Panel больше не будет получать обновления. Рекомендуем установить отдельную версию из магазина приложений. Вы также можете продолжить использовать текущую версию.',
|
||||||
|
deploymentNoticeContinue: 'Понятно, продолжить использование',
|
||||||
|
deploymentNoticeAppStore: 'Перейти в магазин приложений',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'У вас нет доступа к магазину приложений. Обратитесь к администратору для установки отдельной версии.',
|
||||||
title: 'AI-шлюз',
|
title: 'AI-шлюз',
|
||||||
apiReference: 'Справочник API',
|
apiReference: 'Справочник API',
|
||||||
notInstalled: 'Не установлен',
|
notInstalled: 'Не установлен',
|
||||||
@@ -1874,6 +1883,11 @@ const message = {
|
|||||||
imageName: 'Имя образа',
|
imageName: 'Имя образа',
|
||||||
pull: 'Загрузить',
|
pull: 'Загрузить',
|
||||||
path: 'Путь',
|
path: 'Путь',
|
||||||
|
imageUploadDrop: 'Перетащите файл образа сюда или нажмите для загрузки',
|
||||||
|
imageUploadHelper:
|
||||||
|
'Допускаются файлы любого формата. Docker проверяет содержимое. Загруженные файлы сохраняются для повторного импорта или удаления вручную.',
|
||||||
|
imageUploadEmpty: 'Файл пуст. Выберите корректный архив образа.',
|
||||||
|
imageImportSubmitted: 'Задача импорта образа отправлена. Результат можно посмотреть в журнале задачи.',
|
||||||
importImage: 'Импорт',
|
importImage: 'Импорт',
|
||||||
buildArgs: 'Аргументы Сборки',
|
buildArgs: 'Аргументы Сборки',
|
||||||
imageBuild: 'Сборка',
|
imageBuild: 'Сборка',
|
||||||
@@ -4361,8 +4375,6 @@ const message = {
|
|||||||
dockerGuard: 'Защита портов контейнеров',
|
dockerGuard: 'Защита портов контейнеров',
|
||||||
systemFirewall: 'Брандмауэр хоста',
|
systemFirewall: 'Брандмауэр хоста',
|
||||||
systemFirewallHelper: 'Управляет доступом к портам хоста и входящими правилами.',
|
systemFirewallHelper: 'Управляет доступом к портам хоста и входящими правилами.',
|
||||||
forwardPolicyDropWarning:
|
|
||||||
'На этом сервере ограничена пересылка сетевого трафика. Правила перенаправления портов могут не работать.',
|
|
||||||
forwardingHelper: 'Управляет правилами перенаправления портов.',
|
forwardingHelper: 'Управляет правилами перенаправления портов.',
|
||||||
dockerFirewallHelper: 'Выбирает способ управления защитой портов контейнеров в 1Panel.',
|
dockerFirewallHelper: 'Выбирает способ управления защитой портов контейнеров в 1Panel.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, экспериментально',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, экспериментально',
|
||||||
@@ -4447,9 +4459,9 @@ const message = {
|
|||||||
'Правила INPUT хоста не защищают этот опубликованный Docker-порт напрямую. Нажмите, чтобы открыть защиту портов контейнеров.',
|
'Правила INPUT хоста не защищают этот опубликованный Docker-порт напрямую. Нажмите, чтобы открыть защиту портов контейнеров.',
|
||||||
notInitialized: 'Не инициализировано',
|
notInitialized: 'Не инициализировано',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'Пересылка IPv6 заблокирована: интерфейсы {0} имеют accept_ra=1 и могут зависеть от RA/SLAAC. Проверьте настройки сети, сохраните accept_ra=2 для интерфейсов, которым нужен RA, и повторите попытку.',
|
'Включение переадресации IPv6 заблокировано из-за риска потери связи. См. документацию и системные журналы.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'Не удалось проверить настройки RA для IPv6. Включение пересылки IPv6 заблокировано. Проверьте настройки сети и повторите попытку.',
|
'Включение переадресации IPv6 заблокировано: не удалось проверить настройки сети. Подробности в системных журналах.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'Пересылка IPv6 не включена. Проверка и включение выполняются при добавлении или восстановлении правил IPv6.',
|
'Пересылка IPv6 не включена. Проверка и включение выполняются при добавлении или восстановлении правил IPv6.',
|
||||||
familyUnsupported: 'Система не поддерживает {0}',
|
familyUnsupported: 'Система не поддерживает {0}',
|
||||||
|
|||||||
@@ -570,6 +570,8 @@ const message = {
|
|||||||
cancelKeepAlive: 'Sayfa oturumunu korumayı bırak',
|
cancelKeepAlive: 'Sayfa oturumunu korumayı bırak',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: 'Kullanıcı Merkezi',
|
||||||
|
exitSystem: 'Çıkış yap',
|
||||||
logout: 'Çıkış',
|
logout: 'Çıkış',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1076,6 +1078,13 @@ const message = {
|
|||||||
whiteListHelper: 'Erişimi yalnızca beyaz listedeki IPlerle sınırlayın',
|
whiteListHelper: 'Erişimi yalnızca beyaz listedeki IPlerle sınırlayın',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI Gateway bağımsız dağıtımı destekliyor',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI Gateway artık bağımsız dağıtımı destekliyor. 1Panel içindeki AI Gateway artık güncelleme almayacak. Uygulama mağazasından bağımsız sürümü yüklemenizi öneririz. Mevcut sürümü kullanmaya da devam edebilirsiniz.',
|
||||||
|
deploymentNoticeContinue: 'Anladım, kullanmaya devam et',
|
||||||
|
deploymentNoticeAppStore: 'Uygulama mağazasına git',
|
||||||
|
deploymentNoticeNoAppPermission:
|
||||||
|
'Uygulama mağazasına erişim izniniz yok. Bağımsız sürümü yüklemek için yöneticinizle iletişime geçin.',
|
||||||
title: 'AI Ağ Geçidi',
|
title: 'AI Ağ Geçidi',
|
||||||
apiReference: 'API Referansı',
|
apiReference: 'API Referansı',
|
||||||
notInstalled: 'Kurulu değil',
|
notInstalled: 'Kurulu değil',
|
||||||
@@ -1883,6 +1892,11 @@ const message = {
|
|||||||
imageName: 'İmaj adı',
|
imageName: 'İmaj adı',
|
||||||
pull: 'Çek',
|
pull: 'Çek',
|
||||||
path: 'Yol',
|
path: 'Yol',
|
||||||
|
imageUploadDrop: 'Bir imaj dosyasını buraya sürükleyin veya yüklemek için tıklayın',
|
||||||
|
imageUploadHelper:
|
||||||
|
'Tüm dosya biçimlerine izin verilir. Docker içeriği doğrular. Yüklenen dosyalar, içe aktarmayı yeniden denemek veya elle silmek için saklanır.',
|
||||||
|
imageUploadEmpty: 'Dosya boş. Geçerli bir imaj arşivi seçin.',
|
||||||
|
imageImportSubmitted: 'İmajı içe aktarma görevi gönderildi. Sonuç için görev günlüğünü kontrol edin.',
|
||||||
importImage: 'İçe aktar',
|
importImage: 'İçe aktar',
|
||||||
buildArgs: 'Derleme Argümanları',
|
buildArgs: 'Derleme Argümanları',
|
||||||
imageBuild: 'Oluştur',
|
imageBuild: 'Oluştur',
|
||||||
@@ -4379,7 +4393,6 @@ const message = {
|
|||||||
dockerGuard: 'Konteyner portu koruması',
|
dockerGuard: 'Konteyner portu koruması',
|
||||||
systemFirewall: 'Ana makine güvenlik duvarı',
|
systemFirewall: 'Ana makine güvenlik duvarı',
|
||||||
systemFirewallHelper: 'Ana makine port erişimini ve gelen kuralları yönetir.',
|
systemFirewallHelper: 'Ana makine port erişimini ve gelen kuralları yönetir.',
|
||||||
forwardPolicyDropWarning: 'Bu sunucu ağ yönlendirmesini kısıtlıyor. Port yönlendirme kuralları çalışmayabilir.',
|
|
||||||
forwardingHelper: 'Port yönlendirme kurallarını yönetir.',
|
forwardingHelper: 'Port yönlendirme kurallarını yönetir.',
|
||||||
dockerFirewallHelper: '1Panel konteyner portu korumasının nasıl yönetileceğini seçer.',
|
dockerFirewallHelper: '1Panel konteyner portu korumasının nasıl yönetileceğini seçer.',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0, deneysel',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0, deneysel',
|
||||||
@@ -4466,9 +4479,9 @@ const message = {
|
|||||||
'Ana makine INPUT kuralları bu Docker yayımlanmış portunu doğrudan korumaz. Konteyner portu korumasını açmak için tıklayın.',
|
'Ana makine INPUT kuralları bu Docker yayımlanmış portunu doğrudan korumaz. Konteyner portu korumasını açmak için tıklayın.',
|
||||||
notInitialized: 'Başlatılmadı',
|
notInitialized: 'Başlatılmadı',
|
||||||
ipv6RARisk:
|
ipv6RARisk:
|
||||||
'IPv6 yönlendirme engellendi: {0} arayüzlerinde accept_ra=1 ayarlı ve bu arayüzler RA/SLAAC kullanıyor olabilir. Ağ yapılandırmasını kontrol edin, RA gereken arayüzlerde accept_ra=2 ayarını kalıcı olarak uygulayın ve yeniden deneyin.',
|
'Ağ bağlantısının kesilme riski nedeniyle IPv6 yönlendirmesi engellendi. Belgeleri ve sistem günlüklerini inceleyin.',
|
||||||
ipv6RACheckFailed:
|
ipv6RACheckFailed:
|
||||||
'IPv6 RA yapılandırması kontrol edilemedi. IPv6 yönlendirmeyi etkinleştirme engellendi. Sistem ağ yapılandırmasını kontrol edip yeniden deneyin.',
|
'Ağ yapılandırması denetlenemediği için IPv6 yönlendirmesi engellendi. Ayrıntılar için sistem günlüklerini inceleyin.',
|
||||||
ipv6ForwardingOnDemand:
|
ipv6ForwardingOnDemand:
|
||||||
'IPv6 yönlendirme etkin değil. IPv6 kuralları eklenirken veya geri yüklenirken kontrol edilip etkinleştirilecektir.',
|
'IPv6 yönlendirme etkin değil. IPv6 kuralları eklenirken veya geri yüklenirken kontrol edilip etkinleştirilecektir.',
|
||||||
familyUnsupported: 'Sistem {0} desteğini sunmuyor',
|
familyUnsupported: 'Sistem {0} desteğini sunmuyor',
|
||||||
|
|||||||
@@ -548,6 +548,8 @@ const message = {
|
|||||||
cancelKeepAlive: '取消保持頁面工作階段',
|
cancelKeepAlive: '取消保持頁面工作階段',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: '使用者中心',
|
||||||
|
exitSystem: '登出系統',
|
||||||
logout: '登出',
|
logout: '登出',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1006,6 +1008,12 @@ const message = {
|
|||||||
whiteListHelper: '限制僅白名單中的 IP 可瀏覽',
|
whiteListHelper: '限制僅白名單中的 IP 可瀏覽',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI 網關已支援獨立部署',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI 網關現已支援獨立部署,1Panel 內建 AI 網關後續將不再更新。建議前往應用程式商店安裝獨立版本,您也可以繼續使用目前版本。',
|
||||||
|
deploymentNoticeContinue: '已知悉,繼續使用',
|
||||||
|
deploymentNoticeAppStore: '前往應用程式商店',
|
||||||
|
deploymentNoticeNoAppPermission: '您沒有應用程式商店存取權限,請聯絡管理員安裝獨立版本。',
|
||||||
title: 'AI 閘道',
|
title: 'AI 閘道',
|
||||||
apiReference: '介面說明',
|
apiReference: '介面說明',
|
||||||
notInstalled: '未安裝',
|
notInstalled: '未安裝',
|
||||||
@@ -1773,6 +1781,10 @@ const message = {
|
|||||||
delInsecureHelper: '刪除授信需要重新啟動 docker 服務,是否刪除?',
|
delInsecureHelper: '刪除授信需要重新啟動 docker 服務,是否刪除?',
|
||||||
pull: '拉取',
|
pull: '拉取',
|
||||||
path: '路徑',
|
path: '路徑',
|
||||||
|
imageUploadDrop: '拖曳映像檔案至此處,或點擊上傳',
|
||||||
|
imageUploadHelper: '不限制檔案格式,由 Docker 驗證內容。上傳的檔案會保留,可重試匯入或手動刪除。',
|
||||||
|
imageUploadEmpty: '不能上傳空檔案,請選擇有效的映像檔案。',
|
||||||
|
imageImportSubmitted: '映像匯入任務已提交,請查看任務日誌',
|
||||||
importImage: '匯入映像',
|
importImage: '匯入映像',
|
||||||
imageBuild: '構建映像',
|
imageBuild: '構建映像',
|
||||||
buildArgs: '構建參數',
|
buildArgs: '構建參數',
|
||||||
@@ -4020,7 +4032,6 @@ const message = {
|
|||||||
dockerGuard: '容器連接埠防護',
|
dockerGuard: '容器連接埠防護',
|
||||||
systemFirewall: '主機防火牆',
|
systemFirewall: '主機防火牆',
|
||||||
systemFirewallHelper: '用於管理主機連接埠存取和入站規則。',
|
systemFirewallHelper: '用於管理主機連接埠存取和入站規則。',
|
||||||
forwardPolicyDropWarning: '目前伺服器限制了網路轉送,轉送規則可能無法生效。',
|
|
||||||
forwardingHelper: '用於管理連接埠轉發規則。',
|
forwardingHelper: '用於管理連接埠轉發規則。',
|
||||||
dockerFirewallHelper: '用於選擇 1Panel 容器連接埠防護的管理方式。',
|
dockerFirewallHelper: '用於選擇 1Panel 容器連接埠防護的管理方式。',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0,實驗性',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0,實驗性',
|
||||||
@@ -4092,9 +4103,8 @@ const message = {
|
|||||||
dockerInputUseHostFirewall: '此連接埠需要透過主機防火牆設定存取規則,請前往主機防火牆進行設定。',
|
dockerInputUseHostFirewall: '此連接埠需要透過主機防火牆設定存取規則,請前往主機防火牆進行設定。',
|
||||||
dockerInputNotProtected: '主機 INPUT 規則無法直接保護此 Docker 發佈連接埠,點擊前往容器連接埠防護。',
|
dockerInputNotProtected: '主機 INPUT 規則無法直接保護此 Docker 發佈連接埠,點擊前往容器連接埠防護。',
|
||||||
notInitialized: '未初始化',
|
notInitialized: '未初始化',
|
||||||
ipv6RARisk:
|
ipv6RARisk: 'IPv6 轉送可能導致網路中斷,已阻止啟用。請參閱文件,詳情見系統日誌。',
|
||||||
'IPv6 轉送已阻止:網路介面 {0} 的 accept_ra=1,可能依賴 RA/SLAAC。請確認網路設定,為需要接收 RA 的介面持久化設定 accept_ra=2 後重試。',
|
ipv6RACheckFailed: '無法檢查 IPv6 網路設定,已阻止啟用轉送。詳情見系統日誌。',
|
||||||
ipv6RACheckFailed: '無法檢查 IPv6 RA 設定,已阻止啟用 IPv6 轉送。請檢查系統網路設定後重試。',
|
|
||||||
ipv6ForwardingOnDemand: 'IPv6 轉送尚未啟用,將在新增或還原 IPv6 規則時檢查並啟用。',
|
ipv6ForwardingOnDemand: 'IPv6 轉送尚未啟用,將在新增或還原 IPv6 規則時檢查並啟用。',
|
||||||
familyUnsupported: '系統不支援 {0}',
|
familyUnsupported: '系統不支援 {0}',
|
||||||
familyChainIssue: '{0} · {1} 鏈 · {2}',
|
familyChainIssue: '{0} · {1} 鏈 · {2}',
|
||||||
|
|||||||
@@ -552,6 +552,8 @@ const message = {
|
|||||||
cancelKeepAlive: '取消保持页面会话',
|
cancelKeepAlive: '取消保持页面会话',
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
|
userCenter: '用户中心',
|
||||||
|
exitSystem: '退出系统',
|
||||||
logout: '退出登录',
|
logout: '退出登录',
|
||||||
},
|
},
|
||||||
database: {
|
database: {
|
||||||
@@ -1019,6 +1021,12 @@ const message = {
|
|||||||
whiteListHelper: '限制仅白名单中的 IP 可访问',
|
whiteListHelper: '限制仅白名单中的 IP 可访问',
|
||||||
},
|
},
|
||||||
aiProxy: {
|
aiProxy: {
|
||||||
|
deploymentNoticeTitle: 'AI 网关已支持独立部署',
|
||||||
|
deploymentNoticeDescription:
|
||||||
|
'AI 网关现已支持独立部署,1Panel 内置 AI 网关后续将不再更新。建议前往应用商店安装独立版本,您也可以继续使用当前版本。',
|
||||||
|
deploymentNoticeContinue: '已知晓,继续使用',
|
||||||
|
deploymentNoticeAppStore: '前往应用商店',
|
||||||
|
deploymentNoticeNoAppPermission: '您没有应用商店访问权限,请联系管理员安装独立版本。',
|
||||||
title: 'AI 网关',
|
title: 'AI 网关',
|
||||||
apiReference: '接口说明',
|
apiReference: '接口说明',
|
||||||
notInstalled: '未安装',
|
notInstalled: '未安装',
|
||||||
@@ -1793,6 +1801,10 @@ const message = {
|
|||||||
delInsecureHelper: '删除授信需要重启 docker 服务,是否删除?',
|
delInsecureHelper: '删除授信需要重启 docker 服务,是否删除?',
|
||||||
pull: '拉取',
|
pull: '拉取',
|
||||||
path: '路径',
|
path: '路径',
|
||||||
|
imageUploadDrop: '拖拽镜像文件到此处,或点击上传',
|
||||||
|
imageUploadHelper: '不限制文件格式,由 Docker 校验内容。上传的文件会保留,可重试导入或手动删除。',
|
||||||
|
imageUploadEmpty: '不能上传空文件,请选择有效的镜像文件。',
|
||||||
|
imageImportSubmitted: '镜像导入任务已提交,请查看任务日志',
|
||||||
importImage: '导入镜像',
|
importImage: '导入镜像',
|
||||||
imageBuild: '构建镜像',
|
imageBuild: '构建镜像',
|
||||||
buildArgs: '构建参数',
|
buildArgs: '构建参数',
|
||||||
@@ -4066,7 +4078,6 @@ const message = {
|
|||||||
dockerGuard: '容器端口防护',
|
dockerGuard: '容器端口防护',
|
||||||
systemFirewall: '主机防火墙',
|
systemFirewall: '主机防火墙',
|
||||||
systemFirewallHelper: '用于管理主机端口访问和入站规则。',
|
systemFirewallHelper: '用于管理主机端口访问和入站规则。',
|
||||||
forwardPolicyDropWarning: '当前服务器限制了网络转发,转发规则可能无法生效。',
|
|
||||||
forwardingHelper: '用于管理端口转发规则。',
|
forwardingHelper: '用于管理端口转发规则。',
|
||||||
dockerFirewallHelper: '用于选择 1Panel 容器端口防护的管理方式。',
|
dockerFirewallHelper: '用于选择 1Panel 容器端口防护的管理方式。',
|
||||||
dockerNftablesRequirement: 'Docker ≥ 29.0.0,实验性',
|
dockerNftablesRequirement: 'Docker ≥ 29.0.0,实验性',
|
||||||
@@ -4138,9 +4149,8 @@ const message = {
|
|||||||
dockerInputUseHostFirewall: '该端口需要通过主机防火墙设置访问规则,请前往主机防火墙进行配置。',
|
dockerInputUseHostFirewall: '该端口需要通过主机防火墙设置访问规则,请前往主机防火墙进行配置。',
|
||||||
dockerInputNotProtected: '宿主机 INPUT 规则不能直接保护此 Docker 发布端口,点击前往容器端口防护。',
|
dockerInputNotProtected: '宿主机 INPUT 规则不能直接保护此 Docker 发布端口,点击前往容器端口防护。',
|
||||||
notInitialized: '未初始化',
|
notInitialized: '未初始化',
|
||||||
ipv6RARisk:
|
ipv6RARisk: 'IPv6 转发存在断网风险,已阻止启用。请参阅文档,详情见系统日志。',
|
||||||
'IPv6 转发已阻止:网卡 {0} 的 accept_ra=1,可能依赖 RA/SLAAC。请确认网络配置,为需要接收 RA 的网卡持久化设置 accept_ra=2 后重试。',
|
ipv6RACheckFailed: '无法检查 IPv6 网络配置,已阻止启用转发。详情见系统日志。',
|
||||||
ipv6RACheckFailed: '无法检查 IPv6 RA 配置,已阻止启用 IPv6 转发。请检查系统网络配置后重试。',
|
|
||||||
ipv6ForwardingOnDemand: 'IPv6 转发尚未启用,将在添加或恢复 IPv6 规则时检查并启用。',
|
ipv6ForwardingOnDemand: 'IPv6 转发尚未启用,将在添加或恢复 IPv6 规则时检查并启用。',
|
||||||
familyUnsupported: '系统不支持 {0}',
|
familyUnsupported: '系统不支持 {0}',
|
||||||
familyChainIssue: '{0} · {1} 链 · {2}',
|
familyChainIssue: '{0} · {1} 链 · {2}',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-model:visible="popoverVisible"
|
v-model:visible="popoverVisible"
|
||||||
placement="right-end"
|
placement="right-start"
|
||||||
:show-arrow="false"
|
:show-arrow="false"
|
||||||
:offset="0"
|
:offset="0"
|
||||||
:width="200"
|
:width="200"
|
||||||
@@ -26,12 +26,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="dropdown-menu" v-loading="loading || switchingNode">
|
<div class="dropdown-menu" v-loading="loading || switchingNode">
|
||||||
<div class="dropdown-item" v-if="currentUser" @click="changeUserInfo">
|
|
||||||
<SvgIcon class="icon" iconName="p-gerenzhongxin1" />
|
|
||||||
{{ currentUser.name }}
|
|
||||||
</div>
|
|
||||||
<el-divider class="divider" />
|
|
||||||
|
|
||||||
<div class="dropdown-item" @click="openTask">
|
<div class="dropdown-item" @click="openTask">
|
||||||
<SvgIcon class="icon" iconName="p-renwuzhongxin1" />
|
<SvgIcon class="icon" iconName="p-renwuzhongxin1" />
|
||||||
{{ $t('menu.msgCenter') }}
|
{{ $t('menu.msgCenter') }}
|
||||||
@@ -74,11 +68,6 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-divider class="divider" />
|
|
||||||
<div class="dropdown-item" @click="logout">
|
|
||||||
<SvgIcon class="icon" iconName="p-tuichudenglu3" />
|
|
||||||
{{ $t('commons.login.logout') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
<NodeDrawer
|
<NodeDrawer
|
||||||
@@ -129,7 +118,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const defaultNodeLimit = 8;
|
const defaultNodeLimit = 8;
|
||||||
|
|
||||||
const emit = defineEmits(['openTask', 'refresh']);
|
const emit = defineEmits(['openTask', 'refresh', 'userChange']);
|
||||||
bus.on('refreshTask', () => {
|
bus.on('refreshTask', () => {
|
||||||
checkTask();
|
checkTask();
|
||||||
});
|
});
|
||||||
@@ -272,6 +261,7 @@ const openNodeDashboard = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
|
popoverVisible.value = false;
|
||||||
ElMessageBox.confirm(i18n.global.t('commons.msg.sureLogOut'), i18n.global.t('commons.msg.infoTitle'), {
|
ElMessageBox.confirm(i18n.global.t('commons.msg.sureLogOut'), i18n.global.t('commons.msg.infoTitle'), {
|
||||||
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
confirmButtonText: i18n.global.t('commons.button.confirm'),
|
||||||
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
cancelButtonText: i18n.global.t('commons.button.cancel'),
|
||||||
@@ -297,13 +287,17 @@ const loadCurrentUser = async (currentNode?: string) => {
|
|||||||
const authInfo = await syncAuthInfo(currentNode);
|
const authInfo = await syncAuthInfo(currentNode);
|
||||||
if (authInfo) {
|
if (authInfo) {
|
||||||
currentUser.value = authInfo;
|
currentUser.value = authInfo;
|
||||||
|
emit('userChange', authInfo);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const changeUserInfo = () => {
|
const changeUserInfo = () => {
|
||||||
|
popoverVisible.value = false;
|
||||||
loadCurrentUser();
|
loadCurrentUser();
|
||||||
userInfoRef.value?.openDrawer();
|
userInfoRef.value?.openDrawer();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
defineExpose({ openUserInfo: changeUserInfo, logout });
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
loadNodes();
|
loadNodes();
|
||||||
checkTask();
|
checkTask();
|
||||||
@@ -318,7 +312,7 @@ onMounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-top: 1px solid var(--panel-footer-border);
|
border-bottom: 1px solid var(--panel-footer-border);
|
||||||
height: 48px;
|
height: 48px;
|
||||||
.icon {
|
.icon {
|
||||||
margin-left: 25px;
|
margin-left: 25px;
|
||||||
|
|||||||
@@ -10,6 +10,14 @@
|
|||||||
<PrimaryMenu />
|
<PrimaryMenu />
|
||||||
</div>
|
</div>
|
||||||
<Logo :isCollapse="isCollapse" />
|
<Logo :isCollapse="isCollapse" />
|
||||||
|
<Collapse
|
||||||
|
ref="nodeSelectorRef"
|
||||||
|
class="node-selector"
|
||||||
|
:version="version"
|
||||||
|
@open-task="openTask"
|
||||||
|
@refresh="search"
|
||||||
|
@user-change="currentUser = $event"
|
||||||
|
/>
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="activeMenu"
|
:default-active="activeMenu"
|
||||||
@@ -23,7 +31,40 @@
|
|||||||
<SubItem :menuList="routerMenus" :level="0" />
|
<SubItem :menuList="routerMenus" :level="0" />
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<Collapse :version="version" @open-task="openTask" @refresh="search" />
|
<el-dropdown
|
||||||
|
v-if="currentUser"
|
||||||
|
class="user-dropdown"
|
||||||
|
trigger="click"
|
||||||
|
placement="right-end"
|
||||||
|
:popper-options="{ modifiers: [{ name: 'flip', enabled: false }] }"
|
||||||
|
:show-arrow="false"
|
||||||
|
:hide-on-click="true"
|
||||||
|
@visible-change="userMenuVisible = $event"
|
||||||
|
@command="handleUserCommand"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="user-entry"
|
||||||
|
:class="{ 'is-active': userMenuVisible }"
|
||||||
|
:aria-label="currentUser.name"
|
||||||
|
:title="currentUser.name"
|
||||||
|
>
|
||||||
|
<SvgIcon class="icon" iconName="p-gerenzhongxin1" />
|
||||||
|
<span v-if="!isCollapse" class="user-name">{{ currentUser.name }}</span>
|
||||||
|
</button>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu class="user-menu">
|
||||||
|
<el-dropdown-item command="userCenter">
|
||||||
|
<SvgIcon class="user-menu-icon" iconName="p-gerenzhongxin1" />
|
||||||
|
<span>{{ $t('header.userCenter') }}</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="logout">
|
||||||
|
<SvgIcon class="user-menu-icon" iconName="p-tuichudenglu3" />
|
||||||
|
<span>{{ $t('header.exitSystem') }}</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -40,12 +81,24 @@ import { getSettingBaseInfo } from '@/api/modules/setting';
|
|||||||
import PrimaryMenu from '@/assets/images/menu-bg.svg?component';
|
import PrimaryMenu from '@/assets/images/menu-bg.svg?component';
|
||||||
import { hasPermissionMetaAccess, hasRouteRoleAccess } from '@/utils/rbac';
|
import { hasPermissionMetaAccess, hasRouteRoleAccess } from '@/utils/rbac';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
|
import type { Login } from '@/api/interface/auth';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const menuStore = MenuStore();
|
const menuStore = MenuStore();
|
||||||
const { currentNode, isAdmin, menuAccordion, permissions } = useGlobalStore();
|
const { currentNode, isAdmin, menuAccordion, permissions } = useGlobalStore();
|
||||||
const version = ref();
|
const version = ref();
|
||||||
|
const nodeSelectorRef = ref<InstanceType<typeof Collapse>>();
|
||||||
|
const currentUser = ref<Login.AuthInfo>();
|
||||||
|
const userMenuVisible = ref(false);
|
||||||
|
|
||||||
|
const handleUserCommand = (command: string) => {
|
||||||
|
if (command === 'userCenter') {
|
||||||
|
nodeSelectorRef.value?.openUserInfo();
|
||||||
|
} else if (command === 'logout') {
|
||||||
|
nodeSelectorRef.value?.logout();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const activeMenu = computed(() => {
|
const activeMenu = computed(() => {
|
||||||
const { meta, path } = route;
|
const { meta, path } = route;
|
||||||
@@ -324,8 +377,14 @@ watch(
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--panel-menu-bg-color) no-repeat top;
|
background: var(--panel-menu-bg-color) no-repeat top;
|
||||||
|
|
||||||
|
.logo,
|
||||||
|
.node-selector {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.el-scrollbar {
|
.el-scrollbar {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
.el-menu {
|
.el-menu {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
@@ -337,4 +396,62 @@ watch(
|
|||||||
.ico {
|
.ico {
|
||||||
height: 20px !important;
|
height: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-dropdown {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-menu {
|
||||||
|
min-width: 160px;
|
||||||
|
|
||||||
|
:deep(.el-dropdown-menu__item) {
|
||||||
|
gap: 8px;
|
||||||
|
padding: 10px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-menu-icon {
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-entry {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 7px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 48px;
|
||||||
|
padding: 0 25px;
|
||||||
|
border: 0;
|
||||||
|
border-top: 1px solid var(--panel-footer-border);
|
||||||
|
background: transparent;
|
||||||
|
color: var(--panel-main-bg-color-1);
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: var(--el-font-size-base);
|
||||||
|
line-height: 1.5;
|
||||||
|
text-align: left;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-name {
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus-visible,
|
||||||
|
&.is-active {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
background: var(--el-menu-item-bg-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { bindSearchReset } from '@/utils/search-reset';
|
||||||
|
import router from '@/routers/router';
|
||||||
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { ref, reactive, toRef } from 'vue';
|
import { ref, reactive, toRef } from 'vue';
|
||||||
import { MsgError } from '@/utils/message';
|
import { MsgError } from '@/utils/message';
|
||||||
@@ -47,12 +49,12 @@ export const ProcessStore = defineStore('ProcessStore', () => {
|
|||||||
port: undefined,
|
port: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
useSearchPersistence('host/process/process', {
|
const { currentNode } = useGlobalStore();
|
||||||
|
bindSearchReset([() => router.currentRoute.value.path, currentNode], {
|
||||||
pid: toRef(psSearch, 'pid'),
|
pid: toRef(psSearch, 'pid'),
|
||||||
name: toRef(psSearch, 'name'),
|
name: toRef(psSearch, 'name'),
|
||||||
username: toRef(psSearch, 'username'),
|
username: toRef(psSearch, 'username'),
|
||||||
});
|
|
||||||
useSearchPersistence('host/process/network', {
|
|
||||||
processID: toRef(netSearch, 'processID'),
|
processID: toRef(netSearch, 'processID'),
|
||||||
processName: toRef(netSearch, 'processName'),
|
processName: toRef(netSearch, 'processName'),
|
||||||
port: toRef(netSearch, 'port'),
|
port: toRef(netSearch, 'port'),
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import { chunkUploadFileData, type FileUploadRequestConfig } from '@/api/modules/files';
|
||||||
|
|
||||||
|
export const CHUNK_SIZE = 5 * 1024 * 1024;
|
||||||
|
const MAX_CHUNK_RETRIES = 3;
|
||||||
|
|
||||||
|
const shouldRetryChunkUpload = (error: unknown) => {
|
||||||
|
const item = error as {
|
||||||
|
code?: string | number;
|
||||||
|
data?: { retryable?: boolean };
|
||||||
|
response?: { status?: number };
|
||||||
|
};
|
||||||
|
if (item?.code === 'ERR_CANCELED') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (typeof item?.data?.retryable === 'boolean') {
|
||||||
|
return item.data.retryable;
|
||||||
|
}
|
||||||
|
const status = item?.response?.status ?? (typeof item?.code === 'number' ? item.code : undefined);
|
||||||
|
return !status || status === 408 || status === 429 || status >= 500;
|
||||||
|
};
|
||||||
|
|
||||||
|
const waitForChunkRetry = (attempt: number, signal: AbortSignal) => {
|
||||||
|
return new Promise<void>((resolve) => {
|
||||||
|
if (signal.aborted) {
|
||||||
|
resolve();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const timer = window.setTimeout(done, 500 * 2 ** attempt);
|
||||||
|
function done() {
|
||||||
|
window.clearTimeout(timer);
|
||||||
|
signal.removeEventListener('abort', done);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
signal.addEventListener('abort', done, { once: true });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const uploadChunkWithRetry = async (
|
||||||
|
formData: FormData,
|
||||||
|
config: FileUploadRequestConfig,
|
||||||
|
signal: AbortSignal,
|
||||||
|
) => {
|
||||||
|
let retryCount = 0;
|
||||||
|
while (true) {
|
||||||
|
signal.throwIfAborted();
|
||||||
|
try {
|
||||||
|
await chunkUploadFileData(formData, config);
|
||||||
|
return;
|
||||||
|
} catch (error) {
|
||||||
|
if (signal.aborted || retryCount >= MAX_CHUNK_RETRIES || !shouldRetryChunkUpload(error)) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
await waitForChunkRetry(retryCount, signal);
|
||||||
|
retryCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { watch, type Ref, type WatchSource } from 'vue';
|
||||||
|
|
||||||
|
export type SearchFields = Record<string, Ref<string | number | undefined>>;
|
||||||
|
|
||||||
|
export const bindSearchReset = (sources: WatchSource[], fields: SearchFields) => {
|
||||||
|
const defaults = Object.values(fields).map((field) => ({ field, value: field.value }));
|
||||||
|
const reset = () => {
|
||||||
|
for (const { field, value } of defaults) field.value = value;
|
||||||
|
};
|
||||||
|
watch(sources, reset, { flush: 'sync' });
|
||||||
|
return reset;
|
||||||
|
};
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { Refresh, Search } from '@element-plus/icons-vue';
|
import { Refresh, Search } from '@element-plus/icons-vue';
|
||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
@@ -193,10 +193,16 @@ const searching = ref(false);
|
|||||||
const operating = ref('');
|
const operating = ref('');
|
||||||
const keyword = ref('');
|
const keyword = ref('');
|
||||||
const marketKeyword = ref('');
|
const marketKeyword = ref('');
|
||||||
useSearchPersistence(
|
useSearchReset(
|
||||||
'ai/agents/agent/config/tabs/plugins',
|
|
||||||
{ keyword, marketKeyword },
|
{ keyword, marketKeyword },
|
||||||
() => agentId.value || undefined,
|
{
|
||||||
|
scope: () => agentId.value || undefined,
|
||||||
|
onRevisit: () => {
|
||||||
|
page.value = 1;
|
||||||
|
marketResults.value = [];
|
||||||
|
marketSearched.value = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
const origin = ref('');
|
const origin = ref('');
|
||||||
const status = ref('');
|
const status = ref('');
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { Refresh, Search } from '@element-plus/icons-vue';
|
import { Refresh, Search } from '@element-plus/icons-vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
@@ -169,10 +169,15 @@ const getDefaultMarketSource = (): HermesSkillMarketSource => {
|
|||||||
const marketSource = ref<HermesSkillMarketSource>(getDefaultMarketSource());
|
const marketSource = ref<HermesSkillMarketSource>(getDefaultMarketSource());
|
||||||
const marketSearched = ref(false);
|
const marketSearched = ref(false);
|
||||||
const agentId = ref(0);
|
const agentId = ref(0);
|
||||||
useSearchPersistence(
|
useSearchReset(
|
||||||
'ai/agents/agent/config/tabs/skills/hermes',
|
|
||||||
{ installedKeyword, marketKeyword },
|
{ installedKeyword, marketKeyword },
|
||||||
() => agentId.value || undefined,
|
{
|
||||||
|
scope: () => agentId.value || undefined,
|
||||||
|
onRevisit: () => {
|
||||||
|
marketResults.value = [];
|
||||||
|
marketSearched.value = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
const installedSkills = ref<AI.AgentSkillItem[]>([]);
|
const installedSkills = ref<AI.AgentSkillItem[]>([]);
|
||||||
const marketResults = ref<AI.AgentSkillSearchItem[]>([]);
|
const marketResults = ref<AI.AgentSkillSearchItem[]>([]);
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
import { Refresh, Search } from '@element-plus/icons-vue';
|
import { Refresh, Search } from '@element-plus/icons-vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
@@ -181,10 +181,15 @@ const getDefaultMarketSource = (): SkillMarketSource => {
|
|||||||
const marketSource = ref<SkillMarketSource>(getDefaultMarketSource());
|
const marketSource = ref<SkillMarketSource>(getDefaultMarketSource());
|
||||||
const marketSearched = ref(false);
|
const marketSearched = ref(false);
|
||||||
const agentId = ref(0);
|
const agentId = ref(0);
|
||||||
useSearchPersistence(
|
useSearchReset(
|
||||||
'ai/agents/agent/config/tabs/skills/openclaw',
|
|
||||||
{ installedKeyword, marketKeyword },
|
{ installedKeyword, marketKeyword },
|
||||||
() => agentId.value || undefined,
|
{
|
||||||
|
scope: () => agentId.value || undefined,
|
||||||
|
onRevisit: () => {
|
||||||
|
marketResults.value = [];
|
||||||
|
marketSearched.value = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
);
|
);
|
||||||
const skills = ref<AI.AgentSkillItem[]>([]);
|
const skills = ref<AI.AgentSkillItem[]>([]);
|
||||||
const marketResults = ref<AI.AgentSkillSearchItem[]>([]);
|
const marketResults = ref<AI.AgentSkillSearchItem[]>([]);
|
||||||
|
|||||||
@@ -272,8 +272,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
import { toRef, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { deleteAgentCheck, pageAgents, resetAgentToken, unbindAgentWebsite, updateAgentRemark } from '@/api/modules/ai';
|
import { deleteAgentCheck, pageAgents, resetAgentToken, unbindAgentWebsite, updateAgentRemark } from '@/api/modules/ai';
|
||||||
import { checkAppInstalled, installedOp, searchApp, searchAppInstalled } from '@/api/modules/app';
|
import { checkAppInstalled, installedOp, searchApp, searchAppInstalled } from '@/api/modules/app';
|
||||||
@@ -341,7 +341,6 @@ const isActive = ref(false);
|
|||||||
const isExist = ref(false);
|
const isExist = ref(false);
|
||||||
const noApp = ref(false);
|
const noApp = ref(false);
|
||||||
const searchName = ref('');
|
const searchName = ref('');
|
||||||
useSearchPersistence('ai/agents/agent/index', { search: searchName });
|
|
||||||
const defaultHttpsPort = ref(443);
|
const defaultHttpsPort = ref(443);
|
||||||
const openrestyPortLoaded = ref(false);
|
const openrestyPortLoaded = ref(false);
|
||||||
const websiteDomainsMap = ref<Record<number, Website.Domain[]>>({});
|
const websiteDomainsMap = ref<Record<number, Website.Domain[]>>({});
|
||||||
@@ -401,6 +400,7 @@ const paginationConfig = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const checkNoApp = async () => {
|
const checkNoApp = async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -69,8 +69,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { deleteAgentAccount, getAgentProviders, pageAgentAccounts } from '@/api/modules/ai';
|
import { deleteAgentAccount, getAgentProviders, pageAgentAccounts } from '@/api/modules/ai';
|
||||||
import { AI } from '@/api/interface/ai';
|
import { AI } from '@/api/interface/ai';
|
||||||
import AddDialog from '@/views/ai/agents/model/add/index.vue';
|
import AddDialog from '@/views/ai/agents/model/add/index.vue';
|
||||||
@@ -86,7 +86,6 @@ const items = ref<AI.AgentAccountItem[]>([]);
|
|||||||
const addRef = ref();
|
const addRef = ref();
|
||||||
const modelPoolRef = ref();
|
const modelPoolRef = ref();
|
||||||
const searchName = ref('');
|
const searchName = ref('');
|
||||||
useSearchPersistence('ai/agents/model/index', { search: searchName });
|
|
||||||
const apiType = ref('');
|
const apiType = ref('');
|
||||||
const apiTypeOptions = ref<string[]>([]);
|
const apiTypeOptions = ref<string[]>([]);
|
||||||
|
|
||||||
@@ -112,6 +111,7 @@ const paginationConfig = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
const req: AI.AgentAccountSearch = {
|
const req: AI.AgentAccountSearch = {
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import AppStatus from '@/components/app-status/index.vue';
|
import AppStatus from '@/components/app-status/index.vue';
|
||||||
import AddDialog from '@/views/ai/model/ollama/add/index.vue';
|
import AddDialog from '@/views/ai/model/ollama/add/index.vue';
|
||||||
import Conn from '@/views/ai/model/ollama/conn/index.vue';
|
import Conn from '@/views/ai/model/ollama/conn/index.vue';
|
||||||
@@ -195,7 +195,7 @@ import Terminal from '@/views/ai/model/ollama/terminal/index.vue';
|
|||||||
import Del from '@/views/ai/model/ollama/del/index.vue';
|
import Del from '@/views/ai/model/ollama/del/index.vue';
|
||||||
import PortJumpDialog from '@/components/port-jump/index.vue';
|
import PortJumpDialog from '@/components/port-jump/index.vue';
|
||||||
import CodemirrorDrawer from '@/components/codemirror-pro/drawer.vue';
|
import CodemirrorDrawer from '@/components/codemirror-pro/drawer.vue';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import {
|
import {
|
||||||
@@ -237,7 +237,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('ai/model/ollama/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const appInstallID = ref(0);
|
const appInstallID = ref(0);
|
||||||
|
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { App } from '@/api/interface/app';
|
import { App } from '@/api/interface/app';
|
||||||
import { toRef, onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { searchApp, syncApp, syncCutomAppStore, syncLocalApp, getCurrentNodeCustomAppConfig } from '@/api/modules/app';
|
import { searchApp, syncApp, syncCutomAppStore, syncLocalApp, getCurrentNodeCustomAppConfig } from '@/api/modules/app';
|
||||||
@@ -105,7 +105,10 @@ const req = reactive({
|
|||||||
resource: 'all',
|
resource: 'all',
|
||||||
showCurrentArch: false,
|
showCurrentArch: false,
|
||||||
});
|
});
|
||||||
useSearchPersistence('app-store/apps/index', { search: toRef(req, 'name') });
|
useSearchReset(
|
||||||
|
{ search: toRef(req, 'name'), page: toRef(paginationConfig, 'currentPage') },
|
||||||
|
{ onRevisit: () => search(req) },
|
||||||
|
);
|
||||||
|
|
||||||
const apps = ref<App.AppItem[]>([]);
|
const apps = ref<App.AppItem[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import AppCard from '@/views/app-store/installed/app/card.vue';
|
import AppCard from '@/views/app-store/installed/app/card.vue';
|
||||||
import Backups from '@/components/backup/index.vue';
|
import Backups from '@/components/backup/index.vue';
|
||||||
import Uploads from '@/components/upload/index.vue';
|
import Uploads from '@/components/upload/index.vue';
|
||||||
@@ -211,7 +211,10 @@ const searchReq = reactive({
|
|||||||
update: false,
|
update: false,
|
||||||
sync: false,
|
sync: false,
|
||||||
});
|
});
|
||||||
useSearchPersistence('app-store/installed/index', { search: toRef(searchReq, 'name') });
|
useSearchReset(
|
||||||
|
{ search: toRef(searchReq, 'name'), page: toRef(paginationConfig, 'currentPage') },
|
||||||
|
{ onRevisit: () => search() },
|
||||||
|
);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const activeName = ref(i18n.global.t('app.installed'));
|
const activeName = ref(i18n.global.t('app.installed'));
|
||||||
const mode = ref('installed');
|
const mode = ref('installed');
|
||||||
|
|||||||
@@ -521,7 +521,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { computed, h, ref } from 'vue';
|
import { computed, h, ref } from 'vue';
|
||||||
import CodemirrorPro from '@/components/codemirror-pro/index.vue';
|
import CodemirrorPro from '@/components/codemirror-pro/index.vue';
|
||||||
import ContainerLog from '@/components/log/container/index.vue';
|
import ContainerLog from '@/components/log/container/index.vue';
|
||||||
@@ -576,7 +576,7 @@ const dialogBackupRef = ref();
|
|||||||
const uploadRef = ref();
|
const uploadRef = ref();
|
||||||
|
|
||||||
const searchName = ref('');
|
const searchName = ref('');
|
||||||
useSearchPersistence('container/compose/index', { search: searchName });
|
useSearchReset({ search: searchName }, { onRevisit: () => search() });
|
||||||
const includeAppStore = ref(localStorage.getItem('includeAppStore') !== 'false');
|
const includeAppStore = ref(localStorage.getItem('includeAppStore') !== 'false');
|
||||||
const showType = ref('compose');
|
const showType = ref('compose');
|
||||||
const containerStats = ref<any[]>([]);
|
const containerStats = ref<any[]>([]);
|
||||||
|
|||||||
@@ -474,7 +474,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import PruneDialog from '@/views/container/container/prune/index.vue';
|
import PruneDialog from '@/views/container/container/prune/index.vue';
|
||||||
import RenameDialog from '@/views/container/container/rename/index.vue';
|
import RenameDialog from '@/views/container/container/rename/index.vue';
|
||||||
import UpgradeDialog from '@/views/container/container/upgrade/index.vue';
|
import UpgradeDialog from '@/views/container/container/upgrade/index.vue';
|
||||||
@@ -490,7 +490,7 @@ import Uploads from '@/components/upload/index.vue';
|
|||||||
import DockerStatus from '@/views/container/docker-status/index.vue';
|
import DockerStatus from '@/views/container/docker-status/index.vue';
|
||||||
import ContainerLogDialog from '@/components/log/container-drawer/index.vue';
|
import ContainerLogDialog from '@/components/log/container-drawer/index.vue';
|
||||||
import Status from '@/components/status/index.vue';
|
import Status from '@/components/status/index.vue';
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { toRef, computed, reactive, ref } from 'vue';
|
||||||
import {
|
import {
|
||||||
containerItemStats,
|
containerItemStats,
|
||||||
containerListStats,
|
containerListStats,
|
||||||
@@ -536,7 +536,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'ascending',
|
order: 'ascending',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('container/container/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const dialogUpgradeRef = ref();
|
const dialogUpgradeRef = ref();
|
||||||
const dialogCommitRef = ref();
|
const dialogCommitRef = ref();
|
||||||
const dialogPortJumpRef = ref();
|
const dialogPortJumpRef = ref();
|
||||||
|
|||||||
@@ -157,7 +157,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { toRef, reactive, ref, computed } from 'vue';
|
import { toRef, reactive, ref, computed } from 'vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { newUUID } from '@/utils/id';
|
import { newUUID } from '@/utils/id';
|
||||||
@@ -200,7 +200,10 @@ const paginationConfig = reactive({
|
|||||||
orderBy: 'createdAt',
|
orderBy: 'createdAt',
|
||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
useSearchPersistence('container/image/index', { search: toRef(paginationConfig, 'name') });
|
useSearchReset(
|
||||||
|
{ search: toRef(paginationConfig, 'name'), page: toRef(paginationConfig, 'currentPage') },
|
||||||
|
{ onRevisit: () => search() },
|
||||||
|
);
|
||||||
const columns = ref([]);
|
const columns = ref([]);
|
||||||
|
|
||||||
const isActive = ref(false);
|
const isActive = ref(false);
|
||||||
|
|||||||
@@ -1,105 +1,254 @@
|
|||||||
<template>
|
<template>
|
||||||
<DrawerPro v-model="loadVisible" :header="$t('container.importImage')" @close="handleClose" size="small">
|
<DrawerPro
|
||||||
<el-form @submit.prevent v-loading="loading" ref="formRef" :model="form" label-position="top">
|
v-model="loadVisible"
|
||||||
<el-form-item :label="$t('container.path')" :rules="Rules.requiredInput" prop="path">
|
:header="$t('container.importImage')"
|
||||||
<el-input v-model="form.path" @input="handlePathChange">
|
:auto-close="!busy"
|
||||||
<template #prepend>
|
:confirm-before-close="true"
|
||||||
<el-button icon="Folder" @click="fileRef.acceptParams({ dir: false, multiple: true })" />
|
@before-close="beforeClose"
|
||||||
</template>
|
size="small"
|
||||||
</el-input>
|
>
|
||||||
|
<el-form @submit.prevent label-position="top">
|
||||||
|
<div class="flex items-center gap-3 mb-5">
|
||||||
|
<el-button :disabled="busy" @click="source = 'local'">
|
||||||
|
{{ $t('database.localUpload') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button :disabled="busy" @click="onServerSelect">
|
||||||
|
{{ $t('database.hostSelect') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-form-item v-if="source === 'server'" :label="$t('container.path')">
|
||||||
|
<el-input v-model="form.path" :disabled="busy" @input="handlePathChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<template v-else>
|
||||||
|
<el-upload
|
||||||
|
ref="uploadRef"
|
||||||
|
drag
|
||||||
|
:limit="1"
|
||||||
|
:auto-upload="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
:disabled="busy"
|
||||||
|
:on-change="onFileChange"
|
||||||
|
:on-exceed="onFileExceed"
|
||||||
|
>
|
||||||
|
<el-icon class="el-icon--upload"><UploadFilled /></el-icon>
|
||||||
|
<div class="el-upload__text">{{ $t('container.imageUploadDrop') }}</div>
|
||||||
|
</el-upload>
|
||||||
|
<p class="input-help">{{ $t('container.imageUploadHelper') }}</p>
|
||||||
|
<template v-if="localFile">
|
||||||
|
<p class="break-all">{{ localFile.name }} ({{ computeSize(localFile.size) }})</p>
|
||||||
|
<el-progress
|
||||||
|
:percentage="uploadPercent"
|
||||||
|
:status="uploadFailed ? 'exception' : uploadedPath ? 'success' : undefined"
|
||||||
|
/>
|
||||||
|
<p v-if="uploadedPath" class="input-help break-all">{{ uploadedPath }}</p>
|
||||||
|
<el-button v-if="uploadFailed" :disabled="busy" @click="uploadLocalFile">
|
||||||
|
{{ $t('commons.button.retry') }}
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<el-button v-if="submittedTaskID" link type="primary" @click="openTaskLog">
|
||||||
|
{{ $t('commons.button.log') }}
|
||||||
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<el-button :disabled="busy" @click="loadVisible = false">{{ $t('commons.button.cancel') }}</el-button>
|
||||||
<el-button :disabled="loading" @click="loadVisible = false">
|
<el-button
|
||||||
{{ $t('commons.button.cancel') }}
|
v-if="source === 'server'"
|
||||||
</el-button>
|
:disabled="busy || !!submittedTaskID || !form.paths.length"
|
||||||
<el-button
|
:loading="loading"
|
||||||
:disabled="loading || !form.path.trim() || form.paths.length === 0"
|
type="primary"
|
||||||
type="primary"
|
@click="onSubmit"
|
||||||
@click="onSubmit(formRef)"
|
>
|
||||||
>
|
{{ $t('commons.button.import') }}
|
||||||
{{ $t('commons.button.import') }}
|
</el-button>
|
||||||
</el-button>
|
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</DrawerPro>
|
</DrawerPro>
|
||||||
<FileList ref="fileRef" @choose="loadLoadDir" />
|
<FileList v-if="loadVisible" ref="fileRef" @choose="loadLoadDir" />
|
||||||
<TaskLog ref="taskLogRef" width="70%" />
|
<TaskLog ref="taskLogRef" width="70%" @close="emit('search')" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import FileList from '@/components/file-list/index.vue';
|
import FileList from '@/components/file-list/index.vue';
|
||||||
import { reactive, ref } from 'vue';
|
import { computed, onBeforeUnmount, reactive, ref, watch } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { genFileId, type UploadFile, type UploadInstance, type UploadProps, type UploadRawFile } from 'element-plus';
|
||||||
import TaskLog from '@/components/log/task/index.vue';
|
import TaskLog from '@/components/log/task/index.vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm } from 'element-plus';
|
|
||||||
import { imageLoad } from '@/api/modules/container';
|
import { imageLoad } from '@/api/modules/container';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { stopChunkUpload } from '@/api/modules/files';
|
||||||
|
import { loadBaseDir } from '@/api/modules/setting';
|
||||||
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
|
import { computeSize } from '@/utils/size';
|
||||||
import { newUUID } from '@/utils/id';
|
import { newUUID } from '@/utils/id';
|
||||||
|
import { CHUNK_SIZE, uploadChunkWithRetry } from '@/utils/chunk-upload';
|
||||||
|
|
||||||
|
const { currentNode } = useGlobalStore();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
const uploading = ref(false);
|
||||||
|
const busy = computed(() => loading.value || uploading.value);
|
||||||
const fileRef = ref();
|
const fileRef = ref();
|
||||||
const taskLogRef = ref();
|
const taskLogRef = ref();
|
||||||
|
const uploadRef = ref<UploadInstance>();
|
||||||
const loadVisible = ref(false);
|
const loadVisible = ref(false);
|
||||||
const form = reactive({
|
const source = ref<'server' | 'local'>('local');
|
||||||
path: '',
|
const operateNode = ref('');
|
||||||
paths: [] as string[],
|
const form = reactive({ path: '', paths: [] as string[] });
|
||||||
taskID: '',
|
const localFile = ref<UploadRawFile>();
|
||||||
});
|
const uploadPercent = ref(0);
|
||||||
|
const uploadFailed = ref(false);
|
||||||
const acceptParams = () => {
|
const uploadedPath = ref('');
|
||||||
loadVisible.value = true;
|
const submittedTaskID = ref('');
|
||||||
form.path = '';
|
let uploadID = '';
|
||||||
form.paths = [];
|
let uploadController: AbortController | undefined;
|
||||||
};
|
let disposed = false;
|
||||||
const handleClose = () => {
|
|
||||||
loadVisible.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const emit = defineEmits<{ (e: 'search'): void }>();
|
const emit = defineEmits<{ (e: 'search'): void }>();
|
||||||
|
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
const acceptParams = () => {
|
||||||
const formRef = ref<FormInstance>();
|
if (busy.value) return;
|
||||||
|
operateNode.value = currentNode.value;
|
||||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
source.value = 'local';
|
||||||
if (!formEl || !form.path.trim() || form.paths.length === 0) return;
|
form.path = '';
|
||||||
formEl.validate(async (valid) => {
|
form.paths = [];
|
||||||
if (!valid) return;
|
localFile.value = undefined;
|
||||||
loading.value = true;
|
uploadedPath.value = '';
|
||||||
form.taskID = newUUID();
|
uploadPercent.value = 0;
|
||||||
await imageLoad({ paths: form.paths, taskID: form.taskID })
|
uploadFailed.value = false;
|
||||||
.then(() => {
|
submittedTaskID.value = '';
|
||||||
loading.value = false;
|
uploadRef.value?.clearFiles();
|
||||||
loadVisible.value = false;
|
loadVisible.value = true;
|
||||||
openTaskLog(form.taskID);
|
};
|
||||||
emit('search');
|
const beforeClose = (done: () => void) => {
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
if (!busy.value) done();
|
||||||
})
|
};
|
||||||
.catch(() => {
|
const onServerSelect = () => {
|
||||||
loading.value = false;
|
if (busy.value) return;
|
||||||
});
|
source.value = 'server';
|
||||||
});
|
fileRef.value.acceptParams({ dir: false, multiple: true });
|
||||||
|
};
|
||||||
|
const onFileChange = (file: UploadFile) => {
|
||||||
|
if (!file.raw || busy.value) return;
|
||||||
|
if (file.raw.size === 0) {
|
||||||
|
MsgError(i18n.global.t('container.imageUploadEmpty'));
|
||||||
|
uploadRef.value?.clearFiles();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
localFile.value = file.raw;
|
||||||
|
uploadedPath.value = '';
|
||||||
|
submittedTaskID.value = '';
|
||||||
|
void uploadLocalFile();
|
||||||
|
};
|
||||||
|
const onFileExceed: UploadProps['onExceed'] = (files) => {
|
||||||
|
if (busy.value || !files.length) return;
|
||||||
|
uploadRef.value?.clearFiles();
|
||||||
|
const file = files[0] as UploadRawFile;
|
||||||
|
file.uid = genFileId();
|
||||||
|
uploadRef.value?.handleStart(file);
|
||||||
};
|
};
|
||||||
|
|
||||||
const openTaskLog = (taskID: string) => {
|
const uploadLocalFile = async () => {
|
||||||
taskLogRef.value.openWithTaskID(taskID);
|
const file = localFile.value;
|
||||||
|
if (!file || busy.value) return;
|
||||||
|
uploading.value = true;
|
||||||
|
uploadFailed.value = false;
|
||||||
|
uploadPercent.value = 0;
|
||||||
|
const node = operateNode.value;
|
||||||
|
const id = newUUID();
|
||||||
|
uploadID = id;
|
||||||
|
const controller = new AbortController();
|
||||||
|
uploadController = controller;
|
||||||
|
try {
|
||||||
|
const { data: baseDir } = await loadBaseDir(node);
|
||||||
|
controller.signal.throwIfAborted();
|
||||||
|
const directory = `${baseDir}/uploads/image/${id}`;
|
||||||
|
const count = Math.ceil(file.size / CHUNK_SIZE);
|
||||||
|
for (let index = 0; index < count; index++) {
|
||||||
|
const data = new FormData();
|
||||||
|
data.append('filename', file.name);
|
||||||
|
data.append('path', directory);
|
||||||
|
data.append('uploadID', id);
|
||||||
|
data.append('chunk', file.slice(index * CHUNK_SIZE, (index + 1) * CHUNK_SIZE));
|
||||||
|
data.append('chunkIndex', String(index));
|
||||||
|
data.append('chunkCount', String(count));
|
||||||
|
data.append('offset', String(index * CHUNK_SIZE));
|
||||||
|
data.append('fileSize', String(file.size));
|
||||||
|
await uploadChunkWithRetry(
|
||||||
|
data,
|
||||||
|
{
|
||||||
|
headers: { CurrentNode: node },
|
||||||
|
signal: controller.signal,
|
||||||
|
skipErrorMessage: true,
|
||||||
|
timeout: 0,
|
||||||
|
onUploadProgress: (event: { total?: number; loaded: number }) => {
|
||||||
|
const fraction = event.total ? Math.min(1, event.loaded / event.total) : 0;
|
||||||
|
uploadPercent.value = Math.min(99, Math.floor(((index + fraction) * 100) / count));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
controller.signal,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
controller.signal.throwIfAborted();
|
||||||
|
uploadedPath.value = `${directory}/${file.name}`;
|
||||||
|
uploadPercent.value = 100;
|
||||||
|
} catch {
|
||||||
|
if (!controller.signal.aborted) uploadFailed.value = true;
|
||||||
|
await stopChunkUpload(id, node).catch(() => {});
|
||||||
|
return;
|
||||||
|
} finally {
|
||||||
|
uploading.value = false;
|
||||||
|
uploadController = undefined;
|
||||||
|
uploadID = '';
|
||||||
|
}
|
||||||
|
if (!disposed && currentNode.value === node) await onSubmit();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handlePathChange = () => {
|
const openTaskLog = () => {
|
||||||
if (!form.path.trim()) {
|
taskLogRef.value.openWithTaskID(submittedTaskID.value, true, operateNode.value);
|
||||||
form.paths = [];
|
};
|
||||||
|
const onSubmit = async () => {
|
||||||
|
const paths = source.value === 'local' ? [uploadedPath.value].filter(Boolean) : [...form.paths];
|
||||||
|
if (busy.value || submittedTaskID.value || !paths.length) return;
|
||||||
|
loading.value = true;
|
||||||
|
const taskID = newUUID();
|
||||||
|
const node = operateNode.value;
|
||||||
|
submittedTaskID.value = taskID;
|
||||||
|
try {
|
||||||
|
await imageLoad({ paths, taskID }, node);
|
||||||
|
if (disposed || currentNode.value !== node) return;
|
||||||
|
loadVisible.value = false;
|
||||||
|
openTaskLog();
|
||||||
|
MsgSuccess(i18n.global.t('container.imageImportSubmitted'));
|
||||||
|
} catch {
|
||||||
|
return;
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const handlePathChange = () => {
|
||||||
const loadLoadDir = async (paths: string | string[]) => {
|
submittedTaskID.value = '';
|
||||||
const newPaths = Array.isArray(paths) ? paths : [paths];
|
form.paths = [
|
||||||
form.paths = [...new Set(newPaths)];
|
...new Set(
|
||||||
|
form.path
|
||||||
|
.split(';')
|
||||||
|
.map((path) => path.trim())
|
||||||
|
.filter(Boolean),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
};
|
||||||
|
const loadLoadDir = (paths: string | string[]) => {
|
||||||
|
if (currentNode.value !== operateNode.value) return;
|
||||||
|
source.value = 'server';
|
||||||
|
submittedTaskID.value = '';
|
||||||
|
form.paths = [...new Set(Array.isArray(paths) ? paths : [paths])];
|
||||||
form.path = form.paths.join('; ');
|
form.path = form.paths.join('; ');
|
||||||
};
|
};
|
||||||
|
watch(currentNode, () => {
|
||||||
defineExpose({
|
loadVisible.value = false;
|
||||||
acceptParams,
|
uploadController?.abort();
|
||||||
});
|
});
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
disposed = true;
|
||||||
|
uploadController?.abort();
|
||||||
|
if (uploadID) void stopChunkUpload(uploadID, operateNode.value).catch(() => {});
|
||||||
|
});
|
||||||
|
defineExpose({ acceptParams });
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -95,10 +95,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import CreateDialog from '@/views/container/network/create/index.vue';
|
import CreateDialog from '@/views/container/network/create/index.vue';
|
||||||
import DetailDrawer from '@/views/container/network/detail/index.vue';
|
import DetailDrawer from '@/views/container/network/detail/index.vue';
|
||||||
import { reactive, ref } from 'vue';
|
import { toRef, reactive, ref } from 'vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { newUUID } from '@/utils/id';
|
import { newUUID } from '@/utils/id';
|
||||||
import { deleteNetwork, searchNetwork, inspect, containerPrune } from '@/api/modules/container';
|
import { deleteNetwork, searchNetwork, inspect, containerPrune } from '@/api/modules/container';
|
||||||
@@ -121,7 +121,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('container/network/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
const isActive = ref(false);
|
const isActive = ref(false);
|
||||||
|
|||||||
@@ -59,9 +59,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import OperatorDialog from '@/views/container/repo/operator/index.vue';
|
import OperatorDialog from '@/views/container/repo/operator/index.vue';
|
||||||
import { reactive, ref } from 'vue';
|
import { toRef, reactive, ref } from 'vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
import { checkRepoStatus, deleteImageRepo, searchImageRepo } from '@/api/modules/container';
|
import { checkRepoStatus, deleteImageRepo, searchImageRepo } from '@/api/modules/container';
|
||||||
@@ -78,7 +78,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('container/repo/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
const confirmDialog = ref();
|
const confirmDialog = ref();
|
||||||
|
|||||||
@@ -81,8 +81,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { reactive, ref } from 'vue';
|
import { toRef, reactive, ref } from 'vue';
|
||||||
import { dateFormat, getCurrentDateFormatted } from '@/utils/date';
|
import { dateFormat, getCurrentDateFormatted } from '@/utils/date';
|
||||||
import { downloadWithContent } from '@/utils/file';
|
import { downloadWithContent } from '@/utils/file';
|
||||||
import { Container } from '@/api/interface/container';
|
import { Container } from '@/api/interface/container';
|
||||||
@@ -111,7 +111,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('container/template/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
if (!isActive.value || !isExist.value) {
|
if (!isActive.value || !isExist.value) {
|
||||||
|
|||||||
@@ -124,11 +124,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import CreateDialog from '@/views/container/volume/create/index.vue';
|
import CreateDialog from '@/views/container/volume/create/index.vue';
|
||||||
import CodemirrorDrawer from '@/components/codemirror-pro/drawer.vue';
|
import CodemirrorDrawer from '@/components/codemirror-pro/drawer.vue';
|
||||||
import DockerStatus from '@/views/container/docker-status/index.vue';
|
import DockerStatus from '@/views/container/docker-status/index.vue';
|
||||||
import { reactive, ref } from 'vue';
|
import { toRef, reactive, ref } from 'vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { newUUID } from '@/utils/id';
|
import { newUUID } from '@/utils/id';
|
||||||
import { deleteVolume, searchVolume, inspect, containerPrune } from '@/api/modules/container';
|
import { deleteVolume, searchVolume, inspect, containerPrune } from '@/api/modules/container';
|
||||||
@@ -158,7 +158,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('container/volume/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const isActive = ref(false);
|
const isActive = ref(false);
|
||||||
const isExist = ref(false);
|
const isExist = ref(false);
|
||||||
|
|
||||||
|
|||||||
@@ -272,11 +272,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import Records from '@/views/cronjob/cronjob/record/index.vue';
|
import Records from '@/views/cronjob/cronjob/record/index.vue';
|
||||||
import Backups from '@/views/cronjob/cronjob/backup/index.vue';
|
import Backups from '@/views/cronjob/cronjob/backup/index.vue';
|
||||||
import Import from '@/views/cronjob/cronjob/import/index.vue';
|
import Import from '@/views/cronjob/cronjob/import/index.vue';
|
||||||
import { onMounted, ref, toRefs } from 'vue';
|
import { toRef, onMounted, ref, toRefs } from 'vue';
|
||||||
import {
|
import {
|
||||||
deleteCronjob,
|
deleteCronjob,
|
||||||
editCronjobGroup,
|
editCronjobGroup,
|
||||||
@@ -332,7 +332,7 @@ const pageState = usePageState(() => ({
|
|||||||
}));
|
}));
|
||||||
const paginationConfig = pageState.paginationConfig;
|
const paginationConfig = pageState.paginationConfig;
|
||||||
const { defaultGroupID, searchName, searchGroupID } = toRefs(pageState);
|
const { defaultGroupID, searchName, searchGroupID } = toRefs(pageState);
|
||||||
useSearchPersistence('cronjob/cronjob/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
if (column) {
|
if (column) {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { dateFormat, getCurrentDateFormatted } from '@/utils/date';
|
import { dateFormat, getCurrentDateFormatted } from '@/utils/date';
|
||||||
import { deepCopy } from '@/utils/misc';
|
import { deepCopy } from '@/utils/misc';
|
||||||
import { newUUID } from '@/utils/id';
|
import { newUUID } from '@/utils/id';
|
||||||
@@ -141,7 +141,7 @@ import TaskLog from '@/components/log/task/index.vue';
|
|||||||
import OperateDialog from '@/views/cronjob/library/operate/index.vue';
|
import OperateDialog from '@/views/cronjob/library/operate/index.vue';
|
||||||
import TerminalDialog from '@/views/cronjob/library/run/index.vue';
|
import TerminalDialog from '@/views/cronjob/library/run/index.vue';
|
||||||
import { deleteScript, searchScript, syncScript } from '@/api/modules/cronjob';
|
import { deleteScript, searchScript, syncScript } from '@/api/modules/cronjob';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { Cronjob } from '@/api/interface/cronjob';
|
import { Cronjob } from '@/api/interface/cronjob';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
@@ -170,7 +170,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchInfo = ref<string>('');
|
const searchInfo = ref<string>('');
|
||||||
useSearchPersistence('cronjob/library/index', { search: searchInfo });
|
useSearchReset({ search: searchInfo, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const group = ref<string>('');
|
const group = ref<string>('');
|
||||||
const groupOptions = ref();
|
const groupOptions = ref();
|
||||||
|
|
||||||
|
|||||||
@@ -323,8 +323,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { nextTick, onMounted, reactive, ref } from 'vue';
|
import { toRef, nextTick, onMounted, reactive, ref } from 'vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { getRandomStr } from '@/utils/id';
|
import { getRandomStr } from '@/utils/id';
|
||||||
import { Position } from '@element-plus/icons-vue';
|
import { Position } from '@element-plus/icons-vue';
|
||||||
@@ -366,7 +366,6 @@ const loading = ref(false);
|
|||||||
const maskShow = ref(true);
|
const maskShow = ref(true);
|
||||||
const submitLoading = ref(false);
|
const submitLoading = ref(false);
|
||||||
const searchName = ref('');
|
const searchName = ref('');
|
||||||
useSearchPersistence('database/mongodb/index', { search: searchName });
|
|
||||||
const createVisible = ref(false);
|
const createVisible = ref(false);
|
||||||
const appStatusRef = ref();
|
const appStatusRef = ref();
|
||||||
const bindRef = ref();
|
const bindRef = ref();
|
||||||
@@ -400,6 +399,7 @@ const paginationConfig = reactive({
|
|||||||
orderBy: 'createdAt',
|
orderBy: 'createdAt',
|
||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
type FormInstance = InstanceType<typeof ElForm>;
|
type FormInstance = InstanceType<typeof ElForm>;
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
|
|||||||
@@ -75,9 +75,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
||||||
import AppResources from '@/views/database/postgresql/check/index.vue';
|
import AppResources from '@/views/database/postgresql/check/index.vue';
|
||||||
import OperateDialog from '@/views/database/mongodb/remote/operate/index.vue';
|
import OperateDialog from '@/views/database/mongodb/remote/operate/index.vue';
|
||||||
@@ -101,7 +101,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('database/mongodb/remote/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import BindDialog from '@/views/database/mysql/bind/index.vue';
|
import BindDialog from '@/views/database/mysql/bind/index.vue';
|
||||||
import UserDialog from '@/views/database/mysql/user/index.vue';
|
import UserDialog from '@/views/database/mysql/user/index.vue';
|
||||||
import OperateDialog from '@/views/database/mysql/create/index.vue';
|
import OperateDialog from '@/views/database/mysql/create/index.vue';
|
||||||
@@ -241,7 +241,7 @@ import PortJumpDialog from '@/components/port-jump/index.vue';
|
|||||||
import Tooltip from '@/components/tooltip/index.vue';
|
import Tooltip from '@/components/tooltip/index.vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import {
|
import {
|
||||||
deleteCheckMysqlDB,
|
deleteCheckMysqlDB,
|
||||||
listDatabases,
|
listDatabases,
|
||||||
@@ -301,7 +301,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('database/mysql/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const mysqlContainer = ref();
|
const mysqlContainer = ref();
|
||||||
const mysqlStatus = ref();
|
const mysqlStatus = ref();
|
||||||
|
|||||||
@@ -74,9 +74,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
||||||
import AppResources from '@/views/database/mysql/check/index.vue';
|
import AppResources from '@/views/database/mysql/check/index.vue';
|
||||||
import OperateDialog from '@/views/database/mysql/remote/operate/index.vue';
|
import OperateDialog from '@/views/database/mysql/remote/operate/index.vue';
|
||||||
@@ -100,7 +100,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('database/mysql/remote/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
|||||||
@@ -241,7 +241,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import BindDialog from '@/views/database/postgresql/bind/index.vue';
|
import BindDialog from '@/views/database/postgresql/bind/index.vue';
|
||||||
import OperateDialog from '@/views/database/postgresql/create/index.vue';
|
import OperateDialog from '@/views/database/postgresql/create/index.vue';
|
||||||
import DeleteDialog from '@/views/database/postgresql/delete/index.vue';
|
import DeleteDialog from '@/views/database/postgresql/delete/index.vue';
|
||||||
@@ -256,7 +256,7 @@ import UploadDialog from '@/components/upload/index.vue';
|
|||||||
import PortJumpDialog from '@/components/port-jump/index.vue';
|
import PortJumpDialog from '@/components/port-jump/index.vue';
|
||||||
import Tooltip from '@/components/tooltip/index.vue';
|
import Tooltip from '@/components/tooltip/index.vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import {
|
import {
|
||||||
deleteCheckPostgresqlDB,
|
deleteCheckPostgresqlDB,
|
||||||
listDatabases,
|
listDatabases,
|
||||||
@@ -313,7 +313,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('database/postgresql/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const postgresqlContainer = ref();
|
const postgresqlContainer = ref();
|
||||||
const postgresqlStatus = ref();
|
const postgresqlStatus = ref();
|
||||||
|
|||||||
@@ -74,9 +74,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
||||||
import AppResources from '@/views/database/postgresql/check/index.vue';
|
import AppResources from '@/views/database/postgresql/check/index.vue';
|
||||||
import OperateDialog from '@/views/database/postgresql/remote/operate/index.vue';
|
import OperateDialog from '@/views/database/postgresql/remote/operate/index.vue';
|
||||||
@@ -100,7 +100,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('database/postgresql/remote/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
|||||||
@@ -73,9 +73,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
import { deleteCheckDatabase, searchDatabases } from '@/api/modules/database';
|
||||||
import AppResources from '@/views/database/redis/check/index.vue';
|
import AppResources from '@/views/database/redis/check/index.vue';
|
||||||
import OperateDialog from '@/views/database/redis/remote/operate/index.vue';
|
import OperateDialog from '@/views/database/redis/remote/operate/index.vue';
|
||||||
@@ -99,7 +99,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('database/redis/remote/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async (column?: any) => {
|
const search = async (column?: any) => {
|
||||||
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
|
||||||
|
|||||||
@@ -739,7 +739,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { toRef, computed, nextTick, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
import { toRef, computed, nextTick, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
||||||
import {
|
import {
|
||||||
addFavorite,
|
addFavorite,
|
||||||
@@ -853,7 +853,6 @@ const initData = () => ({
|
|||||||
sortOrder: 'ascending',
|
sortOrder: 'ascending',
|
||||||
});
|
});
|
||||||
let req = reactive(initData());
|
let req = reactive(initData());
|
||||||
useSearchPersistence('host/file-management/index', { search: toRef(req, 'search') });
|
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
const paths = ref<FilePaths[]>([]);
|
const paths = ref<FilePaths[]>([]);
|
||||||
const breadcrumbVisiblePaths = ref<FilePaths[]>([]);
|
const breadcrumbVisiblePaths = ref<FilePaths[]>([]);
|
||||||
@@ -986,6 +985,10 @@ const paginationConfig = reactive({
|
|||||||
pageSize: Number(localStorage.getItem('file-page-size')) || 100,
|
pageSize: Number(localStorage.getItem('file-page-size')) || 100,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
useSearchReset(
|
||||||
|
{ search: toRef(req, 'search'), page: toRef(paginationConfig, 'currentPage') },
|
||||||
|
{ onRevisit: () => search() },
|
||||||
|
);
|
||||||
|
|
||||||
const btnWrapperRefs = ref<Record<string, any>>({});
|
const btnWrapperRefs = ref<Record<string, any>>({});
|
||||||
|
|
||||||
@@ -2851,6 +2854,36 @@ onBeforeUnmount(() => {
|
|||||||
border-bottom: 1px solid var(--el-border-color-light) !important;
|
border-bottom: 1px solid var(--el-border-color-light) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Keep the closable tab width stable so switching tabs does not reflow the tab bar */
|
||||||
|
:deep(.file-tabs .el-tabs__header .el-tabs__item.is-closable) {
|
||||||
|
padding: 0 20px;
|
||||||
|
|
||||||
|
.is-icon-close {
|
||||||
|
width: 14px;
|
||||||
|
margin-left: 5px;
|
||||||
|
right: 0;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity var(--el-transition-duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-active,
|
||||||
|
&:hover,
|
||||||
|
&:focus-within {
|
||||||
|
.is-icon-close {
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (hover: none), (pointer: coarse) {
|
||||||
|
.is-icon-close {
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.file-tabs .el-tabs--card > .el-tabs__header .el-tabs__item.is-active) {
|
:deep(.file-tabs .el-tabs--card > .el-tabs__header .el-tabs__item.is-active) {
|
||||||
border-bottom-width: 1px !important;
|
border-bottom-width: 1px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,13 +121,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, nextTick, reactive, ref } from 'vue';
|
import { computed, nextTick, reactive, ref } from 'vue';
|
||||||
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
||||||
import {
|
import { batchCheckFiles, stopChunkUpload, uploadFileData } from '@/api/modules/files';
|
||||||
batchCheckFiles,
|
import { CHUNK_SIZE, uploadChunkWithRetry } from '@/utils/chunk-upload';
|
||||||
chunkUploadFileData,
|
|
||||||
stopChunkUpload,
|
|
||||||
uploadFileData,
|
|
||||||
type FileUploadRequestConfig,
|
|
||||||
} from '@/api/modules/files';
|
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message';
|
import { MsgError, MsgSuccess, MsgWarning } from '@/utils/message';
|
||||||
import { Close, Document, UploadFilled } from '@element-plus/icons-vue';
|
import { Close, Document, UploadFilled } from '@element-plus/icons-vue';
|
||||||
@@ -225,8 +220,6 @@ const uploaderFiles = ref<UploadFiles>([]);
|
|||||||
const hoverIndex = ref<number | null>(null);
|
const hoverIndex = ref<number | null>(null);
|
||||||
const tmpFiles = ref<UploadFiles>([]);
|
const tmpFiles = ref<UploadFiles>([]);
|
||||||
const breakFlag = ref(false);
|
const breakFlag = ref(false);
|
||||||
const CHUNK_SIZE = 1024 * 1024 * 5;
|
|
||||||
const MAX_CHUNK_RETRIES = 3;
|
|
||||||
|
|
||||||
const upload = (command: string) => {
|
const upload = (command: string) => {
|
||||||
if (uploadLocked.value) {
|
if (uploadLocked.value) {
|
||||||
@@ -504,54 +497,6 @@ const cleanupActiveChunkUpload = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const shouldRetryChunkUpload = (error: unknown) => {
|
|
||||||
const item = error as {
|
|
||||||
code?: string | number;
|
|
||||||
data?: { retryable?: boolean };
|
|
||||||
response?: { status?: number };
|
|
||||||
};
|
|
||||||
if (item?.code === 'ERR_CANCELED') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (typeof item?.data?.retryable === 'boolean') {
|
|
||||||
return item.data.retryable;
|
|
||||||
}
|
|
||||||
const status = item?.response?.status ?? (typeof item?.code === 'number' ? item.code : undefined);
|
|
||||||
return !status || status === 408 || status === 429 || status >= 500;
|
|
||||||
};
|
|
||||||
|
|
||||||
const waitForChunkRetry = (attempt: number, signal: AbortSignal) => {
|
|
||||||
return new Promise<void>((resolve) => {
|
|
||||||
if (signal.aborted) {
|
|
||||||
resolve();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const timer = window.setTimeout(done, 500 * 2 ** attempt);
|
|
||||||
function done() {
|
|
||||||
window.clearTimeout(timer);
|
|
||||||
signal.removeEventListener('abort', done);
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
signal.addEventListener('abort', done, { once: true });
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const uploadChunkWithRetry = async (formData: FormData, config: FileUploadRequestConfig, signal: AbortSignal) => {
|
|
||||||
let retryCount = 0;
|
|
||||||
while (true) {
|
|
||||||
try {
|
|
||||||
await chunkUploadFileData(formData, config);
|
|
||||||
return;
|
|
||||||
} catch (error) {
|
|
||||||
if (signal.aborted || retryCount >= MAX_CHUNK_RETRIES || !shouldRetryChunkUpload(error)) {
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
await waitForChunkRetry(retryCount, signal);
|
|
||||||
retryCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const uploadChunkedFile = async (
|
const uploadChunkedFile = async (
|
||||||
file: { size: number; raw: Blob; name: string },
|
file: { size: number; raw: Blob; name: string },
|
||||||
controller: AbortController,
|
controller: AbortController,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
:closable="false"
|
:closable="false"
|
||||||
:title="$t('firewall.importLimit', [FIREWALL_BATCH_LIMIT, FIREWALL_IMPORT_MAX_SIZE / 1024])"
|
:title="$t('firewall.importLimit', [FIREWALL_BATCH_LIMIT, FIREWALL_IMPORT_MAX_SIZE / 1024])"
|
||||||
/>
|
/>
|
||||||
<el-alert v-if="submitError" class="mb-3" type="error" :closable="false" :title="submitError" />
|
|
||||||
<div class="import-file-bar mt-3">
|
<div class="import-file-bar mt-3">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
@@ -100,7 +99,6 @@ const policies = ref<Firewall.DockerGuardPolicy[]>([]);
|
|||||||
const selects = ref(new Set<Firewall.DockerGuardPolicy>());
|
const selects = ref(new Set<Firewall.DockerGuardPolicy>());
|
||||||
const uploadRef = ref();
|
const uploadRef = ref();
|
||||||
const uploaderFiles = ref<UploadFile[]>([]);
|
const uploaderFiles = ref<UploadFile[]>([]);
|
||||||
const submitError = ref('');
|
|
||||||
const displaySources = (policy: Firewall.DockerGuardPolicy) => formatHostAddressList(policy.sources, policy.family);
|
const displaySources = (policy: Firewall.DockerGuardPolicy) => formatHostAddressList(policy.sources, policy.family);
|
||||||
|
|
||||||
const fileOnChange = (uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
const fileOnChange = (uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
||||||
@@ -109,7 +107,6 @@ const fileOnChange = (uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|||||||
|
|
||||||
policies.value = [];
|
policies.value = [];
|
||||||
selects.value = new Set();
|
selects.value = new Set();
|
||||||
submitError.value = '';
|
|
||||||
uploaderFiles.value = uploadFiles;
|
uploaderFiles.value = uploadFiles;
|
||||||
if (uploadFile.raw.size > FIREWALL_IMPORT_MAX_SIZE) {
|
if (uploadFile.raw.size > FIREWALL_IMPORT_MAX_SIZE) {
|
||||||
uploadRef.value?.clearFiles();
|
uploadRef.value?.clearFiles();
|
||||||
@@ -162,7 +159,6 @@ const onImport = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
submitError.value = '';
|
|
||||||
try {
|
try {
|
||||||
const result = (
|
const result = (
|
||||||
await upsertDockerPortGuardPolicies({
|
await upsertDockerPortGuardPolicies({
|
||||||
@@ -171,16 +167,17 @@ const onImport = async () => {
|
|||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
if (!result.taskID || !result.queued) {
|
if (!result.taskID || !result.queued) {
|
||||||
submitError.value = i18n.global.t('commons.msg.operationFailed');
|
MsgError(i18n.global.t('commons.msg.operationFailed'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
visible.value = false;
|
visible.value = false;
|
||||||
emit('created', result.taskID);
|
emit('created', result.taskID);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
submitError.value =
|
MsgError(
|
||||||
(isAxiosError(error) && error.response?.data?.message) ||
|
(isAxiosError(error) && error.response?.data?.message) ||
|
||||||
(error && getErrorMessage(error)) ||
|
(error && getErrorMessage(error)) ||
|
||||||
i18n.global.t('commons.res.commonError');
|
i18n.global.t('commons.res.commonError'),
|
||||||
|
);
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
@@ -200,7 +197,6 @@ const acceptParams = () => {
|
|||||||
policies.value = [];
|
policies.value = [];
|
||||||
selects.value = new Set();
|
selects.value = new Set();
|
||||||
uploaderFiles.value = [];
|
uploaderFiles.value = [];
|
||||||
submitError.value = '';
|
|
||||||
uploadRef.value?.clearFiles();
|
uploadRef.value?.clearFiles();
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
>
|
>
|
||||||
<template #prompt>
|
<template #prompt>
|
||||||
<el-alert v-if="data.base.message" type="warning" :closable="false" :title="data.base.message" />
|
<el-alert type="info" :closable="false" :title="$t('firewall.dockerGuardHelper')" />
|
||||||
<el-alert v-else type="info" :closable="false" :title="$t('firewall.dockerGuardHelper')" />
|
|
||||||
</template>
|
</template>
|
||||||
<template #leftToolBar>
|
<template #leftToolBar>
|
||||||
<el-button plain @click="orphanDrawerVisible = true">
|
<el-button plain @click="orphanDrawerVisible = true">
|
||||||
@@ -220,7 +219,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { computed, reactive, ref, watch } from 'vue';
|
import { computed, reactive, ref, watch } from 'vue';
|
||||||
import FireRouter from '@/views/host/firewall/index.vue';
|
import FireRouter from '@/views/host/firewall/index.vue';
|
||||||
import DockerGuardStatus from '@/views/host/firewall/docker/status/index.vue';
|
import DockerGuardStatus from '@/views/host/firewall/docker/status/index.vue';
|
||||||
@@ -264,7 +263,14 @@ const openRuleTask = (taskID: string) => taskLogRef.value?.openWithTaskID(taskID
|
|||||||
const orphanDrawerVisible = ref(false);
|
const orphanDrawerVisible = ref(false);
|
||||||
const orphanSearchName = ref('');
|
const orphanSearchName = ref('');
|
||||||
const searchName = ref('');
|
const searchName = ref('');
|
||||||
useSearchPersistence('host/firewall/docker/index', { search: searchName });
|
useSearchReset(
|
||||||
|
{ search: searchName },
|
||||||
|
{
|
||||||
|
onRevisit: () => {
|
||||||
|
paginationConfig.currentPage = 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
const selects = ref<Firewall.DockerGuardContainer[]>([]);
|
const selects = ref<Firewall.DockerGuardContainer[]>([]);
|
||||||
const orphanSelects = ref<Firewall.DockerGuardEndpoint[]>([]);
|
const orphanSelects = ref<Firewall.DockerGuardEndpoint[]>([]);
|
||||||
const data = reactive<Firewall.DockerGuardList>({
|
const data = reactive<Firewall.DockerGuardList>({
|
||||||
@@ -455,6 +461,7 @@ const search = async () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
Object.assign(data, (await loadDockerPortGuard()).data);
|
Object.assign(data, (await loadDockerPortGuard()).data);
|
||||||
|
if (data.base.message) MsgError(data.base.message);
|
||||||
selects.value = [];
|
selects.value = [];
|
||||||
orphanSelects.value = [];
|
orphanSelects.value = [];
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -25,9 +25,6 @@
|
|||||||
<span v-else>{{ $t('firewall.basicStatus') }}</span>
|
<span v-else>{{ $t('firewall.basicStatus') }}</span>
|
||||||
</el-card>
|
</el-card>
|
||||||
<LayoutContent :title="$t('firewall.forwardRule', 2)" :class="{ mask: !isInit || !isBind }">
|
<LayoutContent :title="$t('firewall.forwardRule', 2)" :class="{ mask: !isInit || !isBind }">
|
||||||
<template v-if="fireStatusRef?.forwardDropFamilies" #prompt>
|
|
||||||
<el-alert type="warning" :closable="false" :title="$t('firewall.forwardPolicyDropWarning')" />
|
|
||||||
</template>
|
|
||||||
<template #leftToolBar>
|
<template #leftToolBar>
|
||||||
<el-button v-permission v-node-admin type="primary" @click="onOpenDialog('create')">
|
<el-button v-permission v-node-admin type="primary" @click="onOpenDialog('create')">
|
||||||
{{ $t('commons.button.create') }}
|
{{ $t('commons.button.create') }}
|
||||||
@@ -120,14 +117,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import OperateDialog from './operate/index.vue';
|
import OperateDialog from './operate/index.vue';
|
||||||
import ImportDialog from './import/index.vue';
|
import ImportDialog from './import/index.vue';
|
||||||
import FireRouter from '@/views/host/firewall/index.vue';
|
import FireRouter from '@/views/host/firewall/index.vue';
|
||||||
import FireStatus from '@/views/host/firewall/status/index.vue';
|
import FireStatus from '@/views/host/firewall/status/index.vue';
|
||||||
import RuleReset from '@/views/host/firewall/components/rule-reset.vue';
|
import RuleReset from '@/views/host/firewall/components/rule-reset.vue';
|
||||||
import TaskLog from '@/components/log/task/index.vue';
|
import TaskLog from '@/components/log/task/index.vue';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { resetFirewallRules, operateForwardRule, searchForwardRule } from '@/api/modules/firewall';
|
import { resetFirewallRules, operateForwardRule, searchForwardRule } from '@/api/modules/firewall';
|
||||||
import { Firewall } from '@/api/interface/firewall';
|
import { Firewall } from '@/api/interface/firewall';
|
||||||
import { buildForwardRuleExport } from './transfer';
|
import { buildForwardRuleExport } from './transfer';
|
||||||
@@ -141,7 +138,6 @@ import { ElMessageBox } from 'element-plus';
|
|||||||
const loading = ref();
|
const loading = ref();
|
||||||
const selects = ref<any>([]);
|
const selects = ref<any>([]);
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('host/firewall/forward/index', { search: searchName });
|
|
||||||
|
|
||||||
const isInit = ref(false);
|
const isInit = ref(false);
|
||||||
const isBind = ref(false);
|
const isBind = ref(false);
|
||||||
@@ -192,6 +188,7 @@ const paginationConfig = reactive({
|
|||||||
pageSize: Number(localStorage.getItem('firewall-forward-page-size')) || 20,
|
pageSize: Number(localStorage.getItem('firewall-forward-page-size')) || 20,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
if (!isInit.value || !isBind.value || fireName.value === '-') {
|
if (!isInit.value || !isBind.value || fireName.value === '-') {
|
||||||
|
|||||||
@@ -302,7 +302,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { Firewall } from '@/api/interface/firewall';
|
import { Firewall } from '@/api/interface/firewall';
|
||||||
import type { FuTableOperationButton } from '@/components/table/shared';
|
import type { FuTableOperationButton } from '@/components/table/shared';
|
||||||
import { buildHostRuleExport } from './transfer';
|
import { buildHostRuleExport } from './transfer';
|
||||||
@@ -330,7 +330,7 @@ import RuleReset from '@/views/host/firewall/components/rule-reset.vue';
|
|||||||
import TaskLog from '@/components/log/task/index.vue';
|
import TaskLog from '@/components/log/task/index.vue';
|
||||||
import DockerRestart from '@/components/docker-proxy/docker-restart.vue';
|
import DockerRestart from '@/components/docker-proxy/docker-restart.vue';
|
||||||
import { loadDockerStatus } from '@/api/modules/container';
|
import { loadDockerStatus } from '@/api/modules/container';
|
||||||
import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
import { toRef, computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
||||||
import { useElementSize } from '@vueuse/core';
|
import { useElementSize } from '@vueuse/core';
|
||||||
import { ElMessageBox } from 'element-plus';
|
import { ElMessageBox } from 'element-plus';
|
||||||
import { Expand, Loading, Lock, Refresh } from '@element-plus/icons-vue';
|
import { Expand, Loading, Lock, Refresh } from '@element-plus/icons-vue';
|
||||||
@@ -405,7 +405,6 @@ const showFirewallUnavailablePrompt = computed(
|
|||||||
const firewallVersion = ref('');
|
const firewallVersion = ref('');
|
||||||
const selectedRuleFilters = ref<RuleFilter[]>(loadCachedFilterValues(ruleFilterStorageKey, ruleFilterOptions, []));
|
const selectedRuleFilters = ref<RuleFilter[]>(loadCachedFilterValues(ruleFilterStorageKey, ruleFilterOptions, []));
|
||||||
const searchName = ref('');
|
const searchName = ref('');
|
||||||
useSearchPersistence('host/firewall/rule/index', { search: searchName });
|
|
||||||
const inventoryItems = ref<Firewall.InventoryItem[]>([]);
|
const inventoryItems = ref<Firewall.InventoryItem[]>([]);
|
||||||
const positionRanges = ref<Partial<Record<Firewall.Family, Firewall.PositionRange>>>({});
|
const positionRanges = ref<Partial<Record<Firewall.Family, Firewall.PositionRange>>>({});
|
||||||
const inventoryTotal = ref(0);
|
const inventoryTotal = ref(0);
|
||||||
@@ -433,6 +432,7 @@ const paginationConfig = reactive({
|
|||||||
pageSize: Number(localStorage.getItem('firewall-rule-page-size')) || 20,
|
pageSize: Number(localStorage.getItem('firewall-rule-page-size')) || 20,
|
||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const providerScopes = (): Firewall.Scope[] => {
|
const providerScopes = (): Firewall.Scope[] => {
|
||||||
if (provider.value === 'iptables' || provider.value === 'nftables') {
|
if (provider.value === 'iptables' || provider.value === 'nftables') {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
</NoSuchService>
|
</NoSuchService>
|
||||||
<div class="app-status card-interval" v-else-if="baseInfo.isExist && !baseInfo.message">
|
<div class="app-status card-interval" v-else-if="baseInfo.isExist">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="flex w-full flex-col gap-4 md:flex-row">
|
<div class="flex w-full flex-col gap-4 md:flex-row">
|
||||||
<div class="flex flex-wrap gap-4 ml-3">
|
<div class="flex flex-wrap gap-4 ml-3">
|
||||||
@@ -145,16 +145,6 @@
|
|||||||
:title="$t('firewall.directBackendConflictWarning', [backendName, baseInfo.conflictBackend])"
|
:title="$t('firewall.directBackendConflictWarning', [backendName, baseInfo.conflictBackend])"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<el-alert v-else-if="baseInfo.isExist" class="card-interval" type="error" show-icon :closable="false">
|
|
||||||
<template #title>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<span>{{ baseInfo.message }}</span>
|
|
||||||
<el-button v-permission v-node-admin type="primary" link @click="goToFirewallSetting">
|
|
||||||
{{ $t('commons.button.set') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-alert>
|
|
||||||
<DockerRestart
|
<DockerRestart
|
||||||
ref="dockerRef"
|
ref="dockerRef"
|
||||||
v-model:withDockerRestart="withDockerRestart"
|
v-model:withDockerRestart="withDockerRestart"
|
||||||
@@ -210,7 +200,6 @@ const baseInfo = ref<Firewall.FirewallBase>({
|
|||||||
conflictBackend: '',
|
conflictBackend: '',
|
||||||
version: '',
|
version: '',
|
||||||
pingStatus: '',
|
pingStatus: '',
|
||||||
message: '',
|
|
||||||
reason: '',
|
reason: '',
|
||||||
ipv4: { available: false, initialized: false, bound: false },
|
ipv4: { available: false, initialized: false, bound: false },
|
||||||
ipv6: { available: false, initialized: false, bound: false },
|
ipv6: { available: false, initialized: false, bound: false },
|
||||||
@@ -243,13 +232,6 @@ const familyStatuses = computed(() =>
|
|||||||
).filter((item) => item.family === 'IPv4' || baseInfo.value.ipv6Enabled !== false),
|
).filter((item) => item.family === 'IPv4' || baseInfo.value.ipv6Enabled !== false),
|
||||||
);
|
);
|
||||||
const availableFamilies = computed(() => familyStatuses.value.filter((item) => item.status.available));
|
const availableFamilies = computed(() => familyStatuses.value.filter((item) => item.status.available));
|
||||||
const forwardDropFamilies = computed(() => {
|
|
||||||
if (backendUnavailable.value || !baseInfo.value.isExist || baseInfo.value.message) return '';
|
|
||||||
return familyStatuses.value
|
|
||||||
.filter((item) => item.status.forwardPolicy === 'DROP')
|
|
||||||
.map((item) => item.family)
|
|
||||||
.join(', ');
|
|
||||||
});
|
|
||||||
const anyFamilyInitialized = computed(() => availableFamilies.value.some((item) => item.status.initialized));
|
const anyFamilyInitialized = computed(() => availableFamilies.value.some((item) => item.status.initialized));
|
||||||
const allAvailableFamiliesInitialized = computed(
|
const allAvailableFamiliesInitialized = computed(
|
||||||
() => availableFamilies.value.length > 0 && availableFamilies.value.every((item) => item.status.initialized),
|
() => availableFamilies.value.length > 0 && availableFamilies.value.every((item) => item.status.initialized),
|
||||||
@@ -297,7 +279,7 @@ const familyActions = computed(() =>
|
|||||||
const familyIssueText = (issue: FamilyIssue) => {
|
const familyIssueText = (issue: FamilyIssue) => {
|
||||||
if (!issue.available) return i18n.global.t('firewall.familyUnsupported', [issue.family]);
|
if (!issue.available) return i18n.global.t('firewall.familyUnsupported', [issue.family]);
|
||||||
if (issue.reason === 'ipv6_ra_required') {
|
if (issue.reason === 'ipv6_ra_required') {
|
||||||
return i18n.global.t('firewall.ipv6RARisk', [issue.raInterfaces?.join(', ') || '-']);
|
return i18n.global.t('firewall.ipv6RARisk');
|
||||||
}
|
}
|
||||||
if (issue.reason === 'ipv6_ra_check_failed') return i18n.global.t('firewall.ipv6RACheckFailed');
|
if (issue.reason === 'ipv6_ra_check_failed') return i18n.global.t('firewall.ipv6RACheckFailed');
|
||||||
if (issue.partial) return i18n.global.t('firewall.familyIncomplete', [issue.family]);
|
if (issue.partial) return i18n.global.t('firewall.familyIncomplete', [issue.family]);
|
||||||
@@ -481,7 +463,6 @@ onBeforeUnmount(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
forwardDropFamilies,
|
|
||||||
acceptParams,
|
acceptParams,
|
||||||
openInitialization: onInit,
|
openInitialization: onInit,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -93,11 +93,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import { dateFormatServerTimezone } from '@/utils/date';
|
import { dateFormatServerTimezone } from '@/utils/date';
|
||||||
import { downloadFile } from '@/utils/file';
|
import { downloadFile } from '@/utils/file';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { cleanSSHLogs, exportSSHLogs, loadSSHLogs } from '@/api/modules/host';
|
import { cleanSSHLogs, exportSSHLogs, loadSSHLogs } from '@/api/modules/host';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@@ -120,7 +120,7 @@ const exportConfig = reactive({
|
|||||||
status: 'All',
|
status: 'All',
|
||||||
});
|
});
|
||||||
const searchInfo = ref();
|
const searchInfo = ref();
|
||||||
useSearchPersistence('host/ssh/log/log', { search: searchInfo });
|
useSearchReset({ search: searchInfo, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const searchStatus = ref('All');
|
const searchStatus = ref('All');
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import FireRouter from '@/views/host/ssh/index.vue';
|
import FireRouter from '@/views/host/ssh/index.vue';
|
||||||
import { toRef, ref, onMounted, onUnmounted, reactive } from 'vue';
|
import { toRef, ref, onMounted, onUnmounted, reactive } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
@@ -38,7 +38,7 @@ const sshSearch = reactive({
|
|||||||
type: 'ssh',
|
type: 'ssh',
|
||||||
loginUser: '',
|
loginUser: '',
|
||||||
});
|
});
|
||||||
useSearchPersistence('host/ssh/session/index', { search: toRef(sshSearch, 'loginUser') });
|
useSearchReset({ search: toRef(sshSearch, 'loginUser') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { onMounted, onUnmounted, reactive, ref, watch } from 'vue';
|
import { onMounted, onUnmounted, reactive, ref, watch } from 'vue';
|
||||||
import { Log } from '@/api/interface/log';
|
import { Log } from '@/api/interface/log';
|
||||||
import { getSystemLogStatus, listRunningServices, readSystemLogs } from '@/api/modules/log';
|
import { getSystemLogStatus, listRunningServices, readSystemLogs } from '@/api/modules/log';
|
||||||
@@ -114,7 +114,7 @@ const logs = ref<Log.SystemLogItem[]>([]);
|
|||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const watching = ref(false);
|
const watching = ref(false);
|
||||||
const keyword = ref('');
|
const keyword = ref('');
|
||||||
useSearchPersistence('log/host-system/index', { keyword });
|
useSearchReset({ keyword }, { onRevisit: () => scheduleFilterSearch() });
|
||||||
const priority = ref('');
|
const priority = ref('');
|
||||||
const service = ref('');
|
const service = ref('');
|
||||||
const services = ref<string[]>([]);
|
const services = ref<string[]>([]);
|
||||||
@@ -274,11 +274,13 @@ onUnmounted(() => {
|
|||||||
if (filterTimer) clearTimeout(filterTimer);
|
if (filterTimer) clearTimeout(filterTimer);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch([keyword, priority, service], () => {
|
const scheduleFilterSearch = () => {
|
||||||
requestID++;
|
requestID++;
|
||||||
if (filterTimer) clearTimeout(filterTimer);
|
if (filterTimer) clearTimeout(filterTimer);
|
||||||
filterTimer = setTimeout(resetAndLoadLogs, 300);
|
filterTimer = setTimeout(resetAndLoadLogs, 300);
|
||||||
});
|
};
|
||||||
|
|
||||||
|
watch([keyword, priority, service], scheduleFilterSearch);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -45,12 +45,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import LogRouter from '@/views/log/router/index.vue';
|
import LogRouter from '@/views/log/router/index.vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { cleanLogs, getLoginLogs } from '@/api/modules/log';
|
import { cleanLogs, getLoginLogs } from '@/api/modules/log';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
@@ -67,7 +67,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchInfo = ref<string>('');
|
const searchInfo = ref<string>('');
|
||||||
useSearchPersistence('log/login/index', { search: searchInfo });
|
useSearchReset({ search: searchInfo, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const searchStatus = ref<string>('');
|
const searchStatus = ref<string>('');
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
|
|||||||
@@ -125,12 +125,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
import LogRouter from '@/views/log/router/index.vue';
|
import LogRouter from '@/views/log/router/index.vue';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { cleanLogs, getOperationLogs } from '@/api/modules/log';
|
import { cleanLogs, getOperationLogs } from '@/api/modules/log';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
@@ -146,7 +146,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const searchName = ref<string>('');
|
const searchName = ref<string>('');
|
||||||
useSearchPersistence('log/operation/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const searchGroup = ref<string>('');
|
const searchGroup = ref<string>('');
|
||||||
const searchStatus = ref<string>('');
|
const searchStatus = ref<string>('');
|
||||||
const searchNode = ref<string>('');
|
const searchNode = ref<string>('');
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { toRef, onMounted, ref } from 'vue';
|
import { toRef, onMounted, ref } from 'vue';
|
||||||
import { searchBackup, deleteBackup, refreshToken } from '@/api/modules/backup';
|
import { searchBackup, deleteBackup, refreshToken } from '@/api/modules/backup';
|
||||||
@@ -143,7 +143,10 @@ const paginationConfig = reactive({
|
|||||||
type: '',
|
type: '',
|
||||||
name: '',
|
name: '',
|
||||||
});
|
});
|
||||||
useSearchPersistence('setting/backup-account/index', { search: toRef(paginationConfig, 'name') });
|
useSearchReset(
|
||||||
|
{ search: toRef(paginationConfig, 'name'), page: toRef(paginationConfig, 'currentPage') },
|
||||||
|
{ onRevisit: () => search() },
|
||||||
|
);
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
const dialogRef = ref();
|
const dialogRef = ref();
|
||||||
const detailRef = ref();
|
const detailRef = ref();
|
||||||
|
|||||||
@@ -225,7 +225,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import {
|
import {
|
||||||
searchSnapshotPage,
|
searchSnapshotPage,
|
||||||
snapshotDelete,
|
snapshotDelete,
|
||||||
@@ -233,7 +233,7 @@ import {
|
|||||||
snapshotRollback,
|
snapshotRollback,
|
||||||
updateSnapshotDescription,
|
updateSnapshotDescription,
|
||||||
} from '@/api/modules/setting';
|
} from '@/api/modules/setting';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import { computeSize } from '@/utils/size';
|
import { computeSize } from '@/utils/size';
|
||||||
import { dateFormat } from '@/utils/date';
|
import { dateFormat } from '@/utils/date';
|
||||||
import { newUUID } from '@/utils/id';
|
import { newUUID } from '@/utils/id';
|
||||||
@@ -261,7 +261,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('setting/snapshot/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
|
|
||||||
|
|||||||
@@ -100,13 +100,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { Command } from '@/api/interface/command';
|
import { Command } from '@/api/interface/command';
|
||||||
import GroupDialog from '@/components/group/index.vue';
|
import GroupDialog from '@/components/group/index.vue';
|
||||||
import OperateDialog from '@/views/terminal/command/operate/index.vue';
|
import OperateDialog from '@/views/terminal/command/operate/index.vue';
|
||||||
import ImportDialog from '@/views/terminal/command/import/index.vue';
|
import ImportDialog from '@/views/terminal/command/import/index.vue';
|
||||||
import { editCommand, deleteCommand, getCommandPage, exportCommands } from '@/api/modules/command';
|
import { editCommand, deleteCommand, getCommandPage, exportCommands } from '@/api/modules/command';
|
||||||
import { reactive, ref } from 'vue';
|
import { toRef, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { getGroupList } from '@/api/modules/group';
|
import { getGroupList } from '@/api/modules/group';
|
||||||
@@ -124,7 +124,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'ascending',
|
order: 'ascending',
|
||||||
});
|
});
|
||||||
const info = ref();
|
const info = ref();
|
||||||
useSearchPersistence('terminal/command/index', { search: info });
|
useSearchReset({ search: info, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const group = ref<string>('');
|
const group = ref<string>('');
|
||||||
const dialogRef = ref();
|
const dialogRef = ref();
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
|
|||||||
@@ -79,12 +79,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import GroupDialog from '@/components/agent-group/index.vue';
|
import GroupDialog from '@/components/agent-group/index.vue';
|
||||||
import OperateDialog from '@/views/terminal/host/operate/index.vue';
|
import OperateDialog from '@/views/terminal/host/operate/index.vue';
|
||||||
import { deleteHost, editHostGroup, searchHosts } from '@/api/modules/terminal';
|
import { deleteHost, editHostGroup, searchHosts } from '@/api/modules/terminal';
|
||||||
import { getAgentGroupList } from '@/api/modules/group';
|
import { getAgentGroupList } from '@/api/modules/group';
|
||||||
import { reactive, ref } from 'vue';
|
import { toRef, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { Host } from '@/api/interface/host';
|
import { Host } from '@/api/interface/host';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@@ -100,7 +100,7 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
});
|
});
|
||||||
const info = ref();
|
const info = ref();
|
||||||
useSearchPersistence('terminal/host/index', { search: info });
|
useSearchReset({ search: info, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
const group = ref<string>('');
|
const group = ref<string>('');
|
||||||
|
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
|
|||||||
@@ -190,8 +190,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { deleteClam, handleClamScan, searchClam, updateClam, updateClamStatus } from '@/api/modules/toolbox';
|
import { deleteClam, handleClamScan, searchClam, updateClam, updateClamStatus } from '@/api/modules/toolbox';
|
||||||
@@ -218,7 +218,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('toolbox/clam/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const opRef = ref();
|
const opRef = ref();
|
||||||
const dialogRef = ref();
|
const dialogRef = ref();
|
||||||
|
|||||||
@@ -174,8 +174,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useSearchPersistence } from '@/composables/useSearchPersistence';
|
import { useSearchReset } from '@/composables/useSearchReset';
|
||||||
import { onMounted, reactive, ref } from 'vue';
|
import { toRef, onMounted, reactive, ref } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { MsgError, MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
import { deleteFtp, searchFtp, updateFtp, syncFtp, operateFtp, getFtpBase } from '@/api/modules/toolbox';
|
import { deleteFtp, searchFtp, updateFtp, syncFtp, operateFtp, getFtpBase } from '@/api/modules/toolbox';
|
||||||
@@ -201,7 +201,7 @@ const paginationConfig = reactive({
|
|||||||
order: 'null',
|
order: 'null',
|
||||||
});
|
});
|
||||||
const searchName = ref();
|
const searchName = ref();
|
||||||
useSearchPersistence('toolbox/ftp/index', { search: searchName });
|
useSearchReset({ search: searchName, page: toRef(paginationConfig, 'currentPage') }, { onRevisit: () => search() });
|
||||||
|
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
isActive: true,
|
isActive: true,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user