diff --git a/agent/i18n/lang/en.yaml b/agent/i18n/lang/en.yaml index a015362e8..32283e417 100644 --- a/agent/i18n/lang/en.yaml +++ b/agent/i18n/lang/en.yaml @@ -240,6 +240,7 @@ sql: 'SQL Injection' cc: 'Access Frequency Limit' defaultUrlBlack: 'URL Rules' sqlInject: 'SQL Injection' +ErrDBNotExist: "Database does not exist" #task TaskStart: "{{.name}} Start [START]" diff --git a/agent/i18n/lang/zh-Hant.yaml b/agent/i18n/lang/zh-Hant.yaml index a8c0295c9..a52ba67b3 100644 --- a/agent/i18n/lang/zh-Hant.yaml +++ b/agent/i18n/lang/zh-Hant.yaml @@ -241,6 +241,7 @@ sql: 'SQL 注入' cc: '訪問頻率限制' defaultUrlBlack: 'URL 規則' sqlInject: 'SQL 注入' +ErrDBNotExist: "數據庫不存在" #task TaskStart: "{{.name}} 開始 [START]" diff --git a/agent/i18n/lang/zh.yaml b/agent/i18n/lang/zh.yaml index 2ad4a0f9a..a71716842 100644 --- a/agent/i18n/lang/zh.yaml +++ b/agent/i18n/lang/zh.yaml @@ -239,6 +239,7 @@ sql: 'SQL 注入' cc: '访问频率限制' defaultUrlBlack: 'URL 规则' sqlInject: 'SQL 注入' +ErrDBNotExist: "数据库不存在" #task TaskStart: "{{.name}} 任务开始 [START]" diff --git a/agent/init/migration/migrations/init.go b/agent/init/migration/migrations/init.go index 3358b10fa..c6bb3413e 100644 --- a/agent/init/migration/migrations/init.go +++ b/agent/init/migration/migrations/init.go @@ -52,6 +52,7 @@ var AddTable = &gormigrate.Migration{ &model.WebsiteDnsAccount{}, &model.WebsiteDomain{}, &model.WebsiteSSL{}, + &model.Task{}, ) }, } @@ -202,7 +203,7 @@ var InitDefaultCA = &gormigrate.Migration{ var InitPHPExtensions = &gormigrate.Migration{ ID: "20240722-add-php-extensions", Migrate: func(tx *gorm.DB) error { - if err := tx.Create(&model.PHPExtensions{Name: "默认", Extensions: "bcmath,gd,gettext,intl,pcntl,shmop,soap,sockets,sysvsem,xmlrpc,zip"}).Error; err != nil { + if err := tx.Create(&model.PHPExtensions{Name: "Default", Extensions: "bcmath,gd,gettext,intl,pcntl,shmop,soap,sockets,sysvsem,xmlrpc,zip"}).Error; err != nil { return err } if err := tx.Create(&model.PHPExtensions{Name: "WordPress", Extensions: "exif,igbinary,imagick,intl,zip,apcu,memcached,opcache,redis,bc,image,shmop,mysqli,pdo_mysql,gd"}).Error; err != nil { @@ -211,9 +212,6 @@ var InitPHPExtensions = &gormigrate.Migration{ if err := tx.Create(&model.PHPExtensions{Name: "Flarum", Extensions: "curl,gd,pdo_mysql,mysqli,bz2,exif,yaf,imap"}).Error; err != nil { return err } - if err := tx.Create(&model.PHPExtensions{Name: "苹果CMS-V10", Extensions: "mysqli,pdo_mysql,zip,gd,redis,memcache,memcached"}).Error; err != nil { - return err - } if err := tx.Create(&model.PHPExtensions{Name: "SeaCMS", Extensions: "mysqli,pdo_mysql,gd,curl"}).Error; err != nil { return err } @@ -221,61 +219,6 @@ var InitPHPExtensions = &gormigrate.Migration{ }, } -var UpdateWebsite = &gormigrate.Migration{ - ID: "20240812-update-website", - Migrate: func(tx *gorm.DB) error { - return tx.AutoMigrate( - &model.Website{}) - }, -} - -var UpdateWebsiteDomain = &gormigrate.Migration{ - ID: "20240808-update-website-domain", - Migrate: func(tx *gorm.DB) error { - return tx.AutoMigrate( - &model.WebsiteDomain{}) - }, -} - -var AddTaskDB = &gormigrate.Migration{ - ID: "20240822-add-task-table", - Migrate: func(tx *gorm.DB) error { - return global.TaskDB.AutoMigrate( - &model.Task{}, - ) - }, -} - -var UpdateApp = &gormigrate.Migration{ - ID: "20240826-update-app", - Migrate: func(tx *gorm.DB) error { - return tx.AutoMigrate( - &model.App{}) - }, -} - -var UpdateAppInstall = &gormigrate.Migration{ - ID: "20240828-update-app-install", - Migrate: func(tx *gorm.DB) error { - return tx.AutoMigrate( - &model.AppInstall{}) - }, -} - -var UpdateSnapshot = &gormigrate.Migration{ - ID: "20240926-update-snapshot", - Migrate: func(tx *gorm.DB) error { - return tx.AutoMigrate(&model.Snapshot{}) - }, -} - -var UpdateCronjob = &gormigrate.Migration{ - ID: "20241017-update-cronjob", - Migrate: func(tx *gorm.DB) error { - return tx.AutoMigrate(&model.Cronjob{}, &model.JobRecords{}) - }, -} - var InitBaseDir = &gormigrate.Migration{ ID: "20241122-init-setting", Migrate: func(tx *gorm.DB) error { diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index 31ad2a7ff..465595738 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -1,113 +1,91 @@