From 7631c237e922030763451d0a88cfff1600a7a7ee Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Thu, 19 Dec 2024 14:30:20 +0800
Subject: [PATCH] feat: Uniform state style (#7436)
---
agent/app/service/ftp.go | 2 +-
agent/constant/status.go | 1 +
agent/init/migration/migrate.go | 7 --
core/app/api/v2/setting.go | 2 +-
core/app/service/auth.go | 8 +-
core/app/service/setting.go | 6 +-
core/app/service/upgrade.go | 4 +-
core/cmd/server/cmd/listen-ip.go | 5 +-
core/cmd/server/cmd/reset.go | 5 +-
core/cmd/server/cmd/update.go | 3 +-
core/constant/common.go | 3 -
core/constant/status.go | 34 ++---
core/init/migration/migrate.go | 1 +
core/init/migration/migrations/init.go | 27 ++--
core/middleware/session.go | 2 +-
core/server/server.go | 5 +-
frontend/src/api/interface/host.ts | 5 +-
frontend/src/components/app-status/index.vue | 2 +-
frontend/src/components/status/index.vue | 52 +++++---
frontend/src/lang/modules/en.ts | 19 ++-
frontend/src/lang/modules/tw.ts | 21 ++--
frontend/src/lang/modules/zh.ts | 21 ++--
frontend/src/styles/common.scss | 4 -
frontend/src/utils/xpack.ts | 6 +-
.../src/views/container/compose/index.vue | 4 +-
frontend/src/views/container/image/index.vue | 25 ++--
.../src/views/container/network/index.vue | 4 +-
frontend/src/views/container/repo/index.vue | 14 +--
.../src/views/container/setting/index.vue | 7 +-
.../src/views/container/template/index.vue | 4 +-
frontend/src/views/container/volume/index.vue | 4 +-
frontend/src/views/cronjob/index.vue | 24 +---
frontend/src/views/cronjob/record/index.vue | 17 +--
frontend/src/views/database/mysql/index.vue | 2 +-
.../src/views/database/postgresql/index.vue | 2 +-
.../src/views/host/firewall/forward/index.vue | 4 +-
frontend/src/views/host/firewall/ip/index.vue | 4 +-
.../src/views/host/firewall/port/index.vue | 4 +-
.../src/views/host/firewall/status/index.vue | 9 +-
frontend/src/views/host/ssh/log/log.vue | 4 +-
frontend/src/views/host/ssh/ssh/index.vue | 17 +--
frontend/src/views/log/login/index.vue | 13 +-
frontend/src/views/log/operation/index.vue | 117 +++++-------------
frontend/src/views/log/task/index.vue | 19 +--
.../views/setting/backup-account/index.vue | 4 +-
frontend/src/views/setting/license/index.vue | 31 ++---
frontend/src/views/setting/panel/index.vue | 10 +-
frontend/src/views/setting/safe/index.vue | 34 ++---
frontend/src/views/setting/snapshot/index.vue | 4 +-
frontend/src/views/toolbox/clam/index.vue | 20 +--
.../src/views/toolbox/clam/record/index.vue | 7 +-
.../src/views/toolbox/clam/status/index.vue | 14 +--
frontend/src/views/toolbox/fail2ban/index.vue | 7 +-
frontend/src/views/toolbox/ftp/index.vue | 31 ++---
frontend/src/views/toolbox/ftp/log/index.vue | 3 +-
.../src/views/toolbox/supervisor/index.vue | 31 ++---
.../views/toolbox/supervisor/status/index.vue | 2 +-
.../website/runtime/php/supervisor/index.vue | 25 ++--
.../website/config/basic/proxy/index.vue | 9 +-
.../website/config/basic/redirect/index.vue | 8 +-
frontend/src/views/website/website/index.vue | 15 +--
61 files changed, 311 insertions(+), 487 deletions(-)
diff --git a/agent/app/service/ftp.go b/agent/app/service/ftp.go
index a7440873c..889c97ff4 100644
--- a/agent/app/service/ftp.go
+++ b/agent/app/service/ftp.go
@@ -122,7 +122,7 @@ func (f *FtpService) Sync() error {
}
for _, item := range listsInDB {
if _, ok := sameData[item.User]; !ok {
- _ = ftpRepo.Update(item.ID, map[string]interface{}{"status": "deleted"})
+ _ = ftpRepo.Update(item.ID, map[string]interface{}{"status": constant.StatusDeleted})
}
}
return nil
diff --git a/agent/constant/status.go b/agent/constant/status.go
index 161b50e00..2268cbc32 100644
--- a/agent/constant/status.go
+++ b/agent/constant/status.go
@@ -10,6 +10,7 @@ const (
StatusEnable = "Enable"
StatusDisable = "Disable"
StatusNone = "None"
+ StatusDeleted = "Deleted"
OrderDesc = "descending"
OrderAsc = "ascending"
diff --git a/agent/init/migration/migrate.go b/agent/init/migration/migrate.go
index 95f44a6c1..6ad8ac415 100644
--- a/agent/init/migration/migrate.go
+++ b/agent/init/migration/migrate.go
@@ -15,13 +15,6 @@ func Init() {
migrations.InitImageRepo,
migrations.InitDefaultCA,
migrations.InitPHPExtensions,
- migrations.UpdateWebsite,
- migrations.UpdateWebsiteDomain,
- migrations.UpdateApp,
- migrations.AddTaskDB,
- migrations.UpdateAppInstall,
- migrations.UpdateSnapshot,
- migrations.UpdateCronjob,
migrations.InitBaseDir,
})
if err := m.Migrate(); err != nil {
diff --git a/core/app/api/v2/setting.go b/core/app/api/v2/setting.go
index ec138b137..8676d12b0 100644
--- a/core/app/api/v2/setting.go
+++ b/core/app/api/v2/setting.go
@@ -357,7 +357,7 @@ func (b *BaseApi) MFABind(c *gin.Context) {
return
}
- if err := settingService.Update("MFAStatus", "enable"); err != nil {
+ if err := settingService.Update("MFAStatus", constant.StatusEnable); err != nil {
helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err)
return
}
diff --git a/core/app/service/auth.go b/core/app/service/auth.go
index 4401f36e8..4788839d3 100644
--- a/core/app/service/auth.go
+++ b/core/app/service/auth.go
@@ -61,7 +61,7 @@ func (u *AuthService) Login(c *gin.Context, info dto.Login, entrance string) (*d
if err = settingRepo.Update("Language", info.Language); err != nil {
return nil, err
}
- if mfa.Value == "enable" {
+ if mfa.Value == constant.StatusEnable {
return &dto.UserLoginInfo{Name: nameSetting.Value, MfaStatus: mfa.Value}, nil
}
return u.generateSession(c, info.Name, info.AuthMethod)
@@ -134,13 +134,13 @@ func (u *AuthService) generateSession(c *gin.Context, name, authMethod string) (
}
sessionUser, err := global.SESSION.Get(c)
if err != nil {
- err := global.SESSION.Set(c, sessionUser, httpsSetting.Value == "enable", lifeTime)
+ err := global.SESSION.Set(c, sessionUser, httpsSetting.Value == constant.StatusEnable, lifeTime)
if err != nil {
return nil, err
}
return &dto.UserLoginInfo{Name: name}, nil
}
- if err := global.SESSION.Set(c, sessionUser, httpsSetting.Value == "enable", lifeTime); err != nil {
+ if err := global.SESSION.Set(c, sessionUser, httpsSetting.Value == constant.StatusEnable, lifeTime); err != nil {
return nil, err
}
@@ -154,7 +154,7 @@ func (u *AuthService) LogOut(c *gin.Context) error {
}
sID, _ := c.Cookie(constant.SessionName)
if sID != "" {
- c.SetCookie(constant.SessionName, sID, -1, "", "", httpsSetting.Value == "enable", true)
+ c.SetCookie(constant.SessionName, sID, -1, "", "", httpsSetting.Value == constant.StatusEnable, true)
err := global.SESSION.Delete(c)
if err != nil {
return err
diff --git a/core/app/service/setting.go b/core/app/service/setting.go
index 113c8b4c6..14a2e5da9 100644
--- a/core/app/service/setting.go
+++ b/core/app/service/setting.go
@@ -189,8 +189,8 @@ func (u *SettingService) UpdatePort(port uint) error {
func (u *SettingService) UpdateSSL(c *gin.Context, req dto.SSLUpdate) error {
secretDir := path.Join(global.CONF.System.BaseDir, "1panel/secret")
- if req.SSL == "disable" {
- if err := settingRepo.Update("SSL", "disable"); err != nil {
+ if req.SSL == constant.StatusDisable {
+ if err := settingRepo.Update("SSL", constant.StatusDisable); err != nil {
return err
}
if err := settingRepo.Update("SSLType", "self"); err != nil {
@@ -275,7 +275,7 @@ func (u *SettingService) LoadFromCert() (*dto.SSLInfo, error) {
if err != nil {
return nil, err
}
- if ssl.Value == "disable" {
+ if ssl.Value == constant.StatusDisable {
return &dto.SSLInfo{}, nil
}
sslType, err := settingRepo.Get(repo.WithByKey("SSLType"))
diff --git a/core/app/service/upgrade.go b/core/app/service/upgrade.go
index 1542e59ee..6e461de03 100644
--- a/core/app/service/upgrade.go
+++ b/core/app/service/upgrade.go
@@ -53,7 +53,7 @@ func (u *UpgradeService) SearchUpgrade() (*dto.UpgradeInfo, error) {
if len(upgrade.NewVersion) != 0 {
itemVersion = upgrade.NewVersion
}
- if (global.CONF.System.Mode == "dev" || DeveloperMode.Value == "enable") && len(upgrade.TestVersion) != 0 {
+ if (global.CONF.System.Mode == "dev" || DeveloperMode.Value == constant.StatusEnable) && len(upgrade.TestVersion) != 0 {
itemVersion = upgrade.TestVersion
}
if len(itemVersion) == 0 {
@@ -232,7 +232,7 @@ func (u *UpgradeService) loadVersionByMode(developer, currentVersion string) (st
betaVersionLatest := ""
latest = u.loadVersion(true, currentVersion, "stable")
current = u.loadVersion(false, currentVersion, "stable")
- if developer == "enable" {
+ if developer == constant.StatusEnable {
betaVersionLatest = u.loadVersion(true, currentVersion, "beta")
}
if current != latest {
diff --git a/core/cmd/server/cmd/listen-ip.go b/core/cmd/server/cmd/listen-ip.go
index c0168878f..9935b9ce5 100644
--- a/core/cmd/server/cmd/listen-ip.go
+++ b/core/cmd/server/cmd/listen-ip.go
@@ -3,6 +3,7 @@ package cmd
import (
"fmt"
+ "github.com/1Panel-dev/1Panel/core/constant"
"github.com/spf13/cobra"
)
@@ -41,11 +42,11 @@ func updateBindInfo(protocol string) error {
if err != nil {
return err
}
- ipv6 := "disable"
+ ipv6 := constant.StatusDisable
tcp := "tcp4"
address := "0.0.0.0"
if protocol == "ipv6" {
- ipv6 = "enable"
+ ipv6 = constant.StatusEnable
tcp = "tcp6"
address = "::"
}
diff --git a/core/cmd/server/cmd/reset.go b/core/cmd/server/cmd/reset.go
index d398b967c..95eb2e3c2 100644
--- a/core/cmd/server/cmd/reset.go
+++ b/core/cmd/server/cmd/reset.go
@@ -3,6 +3,7 @@ package cmd
import (
"fmt"
+ "github.com/1Panel-dev/1Panel/core/constant"
"github.com/spf13/cobra"
)
@@ -33,7 +34,7 @@ var resetMFACmd = &cobra.Command{
return err
}
- return setSettingByKey(db, "MFAStatus", "disable")
+ return setSettingByKey(db, "MFAStatus", constant.StatusDisable)
},
}
var resetSSLCmd = &cobra.Command{
@@ -49,7 +50,7 @@ var resetSSLCmd = &cobra.Command{
return err
}
- return setSettingByKey(db, "SSL", "disable")
+ return setSettingByKey(db, "SSL", constant.StatusDisable)
},
}
var resetEntranceCmd = &cobra.Command{
diff --git a/core/cmd/server/cmd/update.go b/core/cmd/server/cmd/update.go
index 9b9709ec6..67f0a14fb 100644
--- a/core/cmd/server/cmd/update.go
+++ b/core/cmd/server/cmd/update.go
@@ -9,6 +9,7 @@ import (
"strings"
"unicode"
+ "github.com/1Panel-dev/1Panel/core/constant"
"github.com/1Panel-dev/1Panel/core/global"
"github.com/1Panel-dev/1Panel/core/utils/cmd"
"github.com/1Panel-dev/1Panel/core/utils/common"
@@ -123,7 +124,7 @@ func password() {
return
}
complexSetting := getSettingByKey(db, "ComplexityVerification")
- if complexSetting == "enable" {
+ if complexSetting == constant.StatusEnable {
if isValidPassword("newPassword") {
fmt.Println("\n错误:面板密码仅支持字母、数字、特殊字符(!@#$%*_,.?),长度 8-30 位!")
return
diff --git a/core/constant/common.go b/core/constant/common.go
index fd6f3888d..61976eda9 100644
--- a/core/constant/common.go
+++ b/core/constant/common.go
@@ -17,9 +17,6 @@ const (
OrderDesc = "descending"
OrderAsc = "ascending"
- StatusEnable = "Enable"
- StatusDisable = "Disable"
-
// backup
S3 = "S3"
OSS = "OSS"
diff --git a/core/constant/status.go b/core/constant/status.go
index 69ae3eade..cc5979fde 100644
--- a/core/constant/status.go
+++ b/core/constant/status.go
@@ -1,22 +1,24 @@
package constant
const (
- StatusSuccess = "success"
- StatusFailed = "failed"
+ StatusSuccess = "Success"
+ StatusFailed = "Failed"
// node
- StatusWaiting = "waiting"
- StatusDownloading = "downloading"
- StatusPacking = "packing"
- StatusSending = "sending"
- StatusStarting = "starting"
- StatusHealthy = "healthy"
- StatusUnhealthy = "unhealthy"
- StatusUpgrading = "upgrading"
- StatusRunning = "running"
- StatusFree = "free"
- StatusBound = "bound"
- StatusExceptional = "exceptional"
- StatusRetrying = "retrying"
- StatusLost = "lost"
+ StatusWaiting = "Waiting"
+ StatusPacking = "Packing"
+ StatusSending = "Sending"
+ StatusStarting = "Starting"
+ StatusHealthy = "Healthy"
+ StatusUnhealthy = "Unhealthy"
+ StatusUpgrading = "Upgrading"
+ StatusRunning = "Running"
+ StatusFree = "Free"
+ StatusBound = "Bound"
+ StatusExceptional = "Exceptional"
+ StatusRetrying = "Retrying"
+ StatusLost = "Lost"
+
+ StatusEnable = "Enable"
+ StatusDisable = "Disable"
)
diff --git a/core/init/migration/migrate.go b/core/init/migration/migrate.go
index 162961815..1c5c442f0 100644
--- a/core/init/migration/migrate.go
+++ b/core/init/migration/migrate.go
@@ -19,6 +19,7 @@ func Init() {
migrations.InitBackup,
migrations.InitGoogle,
migrations.AddTaskDB,
+ migrations.UpdateSettingStatus,
})
if err := m.Migrate(); err != nil {
global.LOG.Error(err)
diff --git a/core/init/migration/migrations/init.go b/core/init/migration/migrations/init.go
index e1e4f29c9..8d7b6e3c4 100644
--- a/core/init/migration/migrations/init.go
+++ b/core/init/migration/migrations/init.go
@@ -45,7 +45,7 @@ var InitSetting = &gormigrate.Migration{
if err := tx.Create(&model.Setting{Key: "Theme", Value: "light"}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "MenuTabs", Value: "disable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "MenuTabs", Value: constant.StatusDisable}).Error; err != nil {
return err
}
if err := tx.Create(&model.Setting{Key: "PanelName", Value: "1Panel"}).Error; err != nil {
@@ -64,11 +64,11 @@ var InitSetting = &gormigrate.Migration{
if err := tx.Create(&model.Setting{Key: "SSLID", Value: "0"}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "SSL", Value: "disable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "SSL", Value: constant.StatusDisable}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "DeveloperMode", Value: "disable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "DeveloperMode", Value: constant.StatusDisable}).Error; err != nil {
return err
}
if err := tx.Create(&model.Setting{Key: "ProxyType", Value: ""}).Error; err != nil {
@@ -111,10 +111,10 @@ var InitSetting = &gormigrate.Migration{
if err := tx.Create(&model.Setting{Key: "ExpirationDays", Value: "0"}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "ComplexityVerification", Value: "enable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "ComplexityVerification", Value: constant.StatusEnable}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "MFAStatus", Value: "disable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "MFAStatus", Value: constant.StatusDisable}).Error; err != nil {
return err
}
if err := tx.Create(&model.Setting{Key: "MFASecret", Value: ""}).Error; err != nil {
@@ -132,7 +132,7 @@ var InitSetting = &gormigrate.Migration{
if err := tx.Create(&model.Setting{Key: "BindAddress", Value: "0.0.0.0"}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "Ipv6", Value: "disable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "Ipv6", Value: constant.StatusDisable}).Error; err != nil {
return err
}
if err := tx.Create(&model.Setting{Key: "BindDomain", Value: ""}).Error; err != nil {
@@ -219,7 +219,7 @@ var InitTerminalSetting = &gormigrate.Migration{
if err := tx.Create(&model.Setting{Key: "FontSize", Value: "12"}).Error; err != nil {
return err
}
- if err := tx.Create(&model.Setting{Key: "CursorBlink", Value: "enable"}).Error; err != nil {
+ if err := tx.Create(&model.Setting{Key: "CursorBlink", Value: constant.StatusEnable}).Error; err != nil {
return err
}
if err := tx.Create(&model.Setting{Key: "CursorStyle", Value: "block"}).Error; err != nil {
@@ -270,3 +270,16 @@ var AddTaskDB = &gormigrate.Migration{
)
},
}
+
+var UpdateSettingStatus = &gormigrate.Migration{
+ ID: "20241218-update-setting-status",
+ Migrate: func(tx *gorm.DB) error {
+ if err := tx.Model(model.Setting{}).Where("value = ?", "enable").Update("value", constant.StatusEnable).Error; err != nil {
+ return err
+ }
+ if err := tx.Model(model.Setting{}).Where("value = ?", "disable").Update("value", constant.StatusDisable).Error; err != nil {
+ return err
+ }
+ return nil
+ },
+}
diff --git a/core/middleware/session.go b/core/middleware/session.go
index 7ee602ba7..7e9d6cd0e 100644
--- a/core/middleware/session.go
+++ b/core/middleware/session.go
@@ -38,7 +38,7 @@ func SessionAuth() gin.HandlerFunc {
global.LOG.Errorf("create operation record failed, err: %v", err)
return
}
- _ = global.SESSION.Set(c, psession, httpsSetting.Value == "enable", lifeTime)
+ _ = global.SESSION.Set(c, psession, httpsSetting.Value == constant.StatusEnable, lifeTime)
c.Next()
}
}
diff --git a/core/server/server.go b/core/server/server.go
index 72dc4cd52..b0802defb 100644
--- a/core/server/server.go
+++ b/core/server/server.go
@@ -9,6 +9,7 @@ import (
"os"
"path"
+ "github.com/1Panel-dev/1Panel/core/constant"
"github.com/1Panel-dev/1Panel/core/global"
"github.com/1Panel-dev/1Panel/core/i18n"
"github.com/1Panel-dev/1Panel/core/init/cron"
@@ -42,7 +43,7 @@ func Start() {
rootRouter := router.Routers()
tcpItem := "tcp4"
- if global.CONF.System.Ipv6 == "enable" {
+ if global.CONF.System.Ipv6 == constant.StatusEnable {
tcpItem = "tcp"
global.CONF.System.BindAddress = fmt.Sprintf("[%s]", global.CONF.System.BindAddress)
}
@@ -57,7 +58,7 @@ func Start() {
type tcpKeepAliveListener struct {
*net.TCPListener
}
- if global.CONF.System.SSL == "enable" {
+ if global.CONF.System.SSL == constant.StatusEnable {
certPath := path.Join(global.CONF.System.BaseDir, "1panel/secret/server.crt")
keyPath := path.Join(global.CONF.System.BaseDir, "1panel/secret/server.key")
certificate, err := os.ReadFile(certPath)
diff --git a/frontend/src/api/interface/host.ts b/frontend/src/api/interface/host.ts
index c6f202c6e..6bf7bc2eb 100644
--- a/frontend/src/api/interface/host.ts
+++ b/frontend/src/api/interface/host.ts
@@ -61,7 +61,8 @@ export namespace Host {
export interface FirewallBase {
name: string;
- status: string;
+ isExist: boolean;
+ isActive: boolean;
version: string;
pingStatus: string;
}
@@ -148,7 +149,7 @@ export namespace Host {
export interface SSHInfo {
autoStart: boolean;
- status: string;
+ isActive: boolean;
message: string;
port: string;
listenAddress: string;
diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue
index 3c1f9777f..4d84b12f7 100644
--- a/frontend/src/components/app-status/index.vue
+++ b/frontend/src/components/app-status/index.vue
@@ -4,7 +4,7 @@
{{ data.app }}
-
+
{{ $t('app.version') }}{{ data.version }}
diff --git a/frontend/src/components/status/index.vue b/frontend/src/components/status/index.vue
index 5e01dfd6f..0e9999aee 100644
--- a/frontend/src/components/status/index.vue
+++ b/frontend/src/components/status/index.vue
@@ -1,8 +1,22 @@
-
+
+
+ {{ msg }}
+
+
+
+ {{ $t('commons.status.' + statusItem) }}
+
+
+
+
+
+
+
+
- {{ $t('commons.status.' + status) }}
-
+ {{ $t('commons.status.' + statusItem) }}
+
@@ -10,15 +24,16 @@
diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts
index 1e7e3746e..b864a6918 100644
--- a/frontend/src/lang/modules/en.ts
+++ b/frontend/src/lang/modules/en.ts
@@ -12,6 +12,7 @@ const message = {
false: 'false',
example: 'e.g.:',
fit2cloud: 'FIT2CLOUD',
+ colon: ': ',
button: {
prev: 'Previous',
next: 'Next',
@@ -252,7 +253,6 @@ const message = {
scanFailed: 'Incomplete',
success: 'Success',
waiting: 'Waiting',
- waiting1: 'Waiting',
failed: 'Failed',
stopped: 'Stopped',
error: 'Error',
@@ -277,7 +277,7 @@ const message = {
deny: 'Denied',
accept: 'Accepted',
used: 'Used',
- unUsed: 'Unused',
+ unused: 'Unused',
starting: 'Starting',
recreating: 'Recreating',
creating: 'Creating',
@@ -289,6 +289,17 @@ const message = {
syncerr: 'Error',
uperr: 'Error',
uninstalling: 'Uninstalling',
+ lost: 'Lost Contact',
+ bound: 'Bound',
+ exceptional: 'Exceptional',
+ free: 'Free',
+ enable: 'Enabled',
+ disable: 'Disabled',
+ deleted: 'Deleted',
+ downloading: 'Downloading',
+ packing: 'Packing',
+ sending: 'Sending',
+ healthy: 'Normal',
},
units: {
second: 'Second',
@@ -1762,10 +1773,6 @@ const message = {
expiresAt: 'Expiration Date',
productName: 'Product Name',
productStatus: 'Product Status',
- lost: 'Lost Contact',
- bound: 'Bound',
- exceptional: 'Exceptional',
- free: 'Free',
lostHelper:
'The license has reached the maximum number of retry attempts. Please manually click the sync button to ensure the professional version functions properly.',
exceptionalHelper:
diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts
index 7a104f9a7..57cad1b04 100644
--- a/frontend/src/lang/modules/tw.ts
+++ b/frontend/src/lang/modules/tw.ts
@@ -11,6 +11,7 @@ const message = {
false: '否',
example: '例:',
fit2cloud: '飛致雲',
+ colon: ': ',
button: {
prev: '上一步',
next: '下一步',
@@ -246,8 +247,7 @@ const message = {
done: '已完成',
scanFailed: '未完成',
success: '成功',
- waiting: '執行中',
- waiting1: '等待中',
+ waiting: '請等待',
failed: '失敗',
stopped: '已停止',
error: '失敗',
@@ -272,7 +272,7 @@ const message = {
deny: '已屏蔽',
accept: '已放行',
used: '已使用',
- unUsed: '未使用',
+ unused: '未使用',
starting: '啟動中',
recreating: '重建中',
creating: '創建中',
@@ -284,6 +284,17 @@ const message = {
syncerr: '失敗',
uperr: '失败',
uninstalling: '卸載中',
+ lost: '已失聯',
+ bound: '已綁定',
+ exceptional: '異常',
+ free: '空閒',
+ enable: '已啟用',
+ disable: '已停止',
+ deleted: '已刪除',
+ downloading: '下載中',
+ packing: '打包中',
+ sending: '下發中',
+ healthy: '正常',
},
units: {
second: '秒',
@@ -1641,10 +1652,6 @@ const message = {
expiresAt: '到期時間',
productName: '產品名稱',
productStatus: '產品狀態',
- lost: '已失聯',
- bound: '已綁定',
- exceptional: '異常',
- free: '空閒',
lostHelper: '許可證已達到最大重試次數,請手動點擊同步按鈕,以確保專業版功能正常使用。',
exceptionalHelper: '許可證同步驗證異常,請手動點擊同步按鈕,以確保專業版功能正常使用。',
quickUpdate: '快速更新',
diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts
index a7e8d78a5..2c4c0737e 100644
--- a/frontend/src/lang/modules/zh.ts
+++ b/frontend/src/lang/modules/zh.ts
@@ -11,6 +11,7 @@ const message = {
false: '否',
example: '例:',
fit2cloud: '飞致云',
+ colon: ': ',
button: {
prev: '上一步',
next: '下一步',
@@ -246,8 +247,7 @@ const message = {
done: '已完成',
scanFailed: '未完成',
success: '成功',
- waiting: '执行中',
- waiting1: '等待中',
+ waiting: '请等待',
failed: '失败',
stopped: '已停止',
error: '失败',
@@ -272,7 +272,7 @@ const message = {
deny: '已屏蔽',
accept: '已放行',
used: '已使用',
- unUsed: '未使用',
+ unused: '未使用',
starting: '启动中',
recreating: '重建中',
creating: '创建中',
@@ -284,6 +284,17 @@ const message = {
syncerr: '失败',
uperr: '失败',
uninstalling: '卸载中',
+ lost: '已失联',
+ bound: '已绑定',
+ exceptional: '异常',
+ free: '空闲',
+ enable: '已启用',
+ disable: '已停止',
+ deleted: '已删除',
+ downloading: '下载中',
+ packing: '打包中',
+ sending: '下发中',
+ healthy: '正常',
},
units: {
second: '秒',
@@ -1641,10 +1652,6 @@ const message = {
expiresAt: '到期时间',
productName: '产品名称',
productStatus: '产品状态',
- lost: '已失联',
- bound: '已绑定',
- exceptional: '异常',
- free: '空闲',
lostHelper: '许可证已达到最大重试次数,请手动点击同步按钮,以确保专业版功能正常使用。',
exceptionalHelper: '许可证同步验证异常,请手动点击同步按钮,以确保专业版功能正常使用。',
quickUpdate: '快速更新',
diff --git a/frontend/src/styles/common.scss b/frontend/src/styles/common.scss
index a83e760ee..bce1bac66 100644
--- a/frontend/src/styles/common.scss
+++ b/frontend/src/styles/common.scss
@@ -407,10 +407,6 @@ html {
width: 200px !important;
}
-.p-w-250 {
- width: 250px !important;
-}
-
.p-w-100 {
width: 100px !important;
}
diff --git a/frontend/src/utils/xpack.ts b/frontend/src/utils/xpack.ts
index 10a320aa9..f2a60c9e4 100644
--- a/frontend/src/utils/xpack.ts
+++ b/frontend/src/utils/xpack.ts
@@ -55,7 +55,7 @@ export async function loadProductProFromDB() {
if (!res || !res.data) {
globalStore.isProductPro = false;
} else {
- globalStore.isProductPro = res.data.status === 'bound';
+ globalStore.isProductPro = res.data.status === 'Bound';
if (globalStore.isProductPro) {
globalStore.productProExpires = Number(res.data.productPro);
}
@@ -68,7 +68,7 @@ export async function loadMasterProductProFromDB() {
if (!res || !res.data) {
globalStore.isMasterProductPro = false;
} else {
- globalStore.isMasterProductPro = res.data.status === 'bound';
+ globalStore.isMasterProductPro = res.data.status === 'Bound';
}
switchTheme();
initFavicon();
@@ -83,7 +83,7 @@ export async function getXpackSettingForTheme() {
initFavicon();
return;
}
- globalStore.isMasterProductPro = res.data.status === 'bound';
+ globalStore.isMasterProductPro = res.data.status === 'Bound';
if (!globalStore.isMasterProductPro) {
globalStore.isMasterProductPro = false;
resetXSetting();
diff --git a/frontend/src/views/container/compose/index.vue b/frontend/src/views/container/compose/index.vue
index 55adbbf2f..236c69668 100644
--- a/frontend/src/views/container/compose/index.vue
+++ b/frontend/src/views/container/compose/index.vue
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/frontend/src/views/container/image/index.vue b/frontend/src/views/container/image/index.vue
index ed5f3a426..a6d9f3992 100644
--- a/frontend/src/views/container/image/index.vue
+++ b/frontend/src/views/container/image/index.vue
@@ -21,8 +21,8 @@
-
-
+
+
@@ -36,12 +36,7 @@
-
- {{ $t('commons.status.used') }}
-
-
- {{ $t('commons.status.unUsed') }}
-
+
{
page: paginationConfig.currentPage,
pageSize: paginationConfig.pageSize,
};
- await searchImage(repoSearch).then((res) => {
- data.value = res.data.items || [];
- paginationConfig.total = res.data.total;
- });
+ loading.value = true;
+ await searchImage(repoSearch)
+ .then((res) => {
+ loading.value = false;
+ data.value = res.data.items || [];
+ paginationConfig.total = res.data.total;
+ })
+ .catch(() => {
+ loading.value = false;
+ });
};
const loadRepos = async () => {
const res = await listImageRepo();
diff --git a/frontend/src/views/container/network/index.vue b/frontend/src/views/container/network/index.vue
index 106d63f36..2ba3ed857 100644
--- a/frontend/src/views/container/network/index.vue
+++ b/frontend/src/views/container/network/index.vue
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/frontend/src/views/container/repo/index.vue b/frontend/src/views/container/repo/index.vue
index 98819db13..686007624 100644
--- a/frontend/src/views/container/repo/index.vue
+++ b/frontend/src/views/container/repo/index.vue
@@ -9,8 +9,8 @@
-
-
+
+
@@ -32,15 +32,7 @@
-
- {{ $t('commons.status.success') }}
-
-
-
- {{ row.message }}
-
- {{ $t('commons.status.failed') }}
-
+
Docker
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
{{ $t('app.version') }}: {{ form.version }}
diff --git a/frontend/src/views/container/template/index.vue b/frontend/src/views/container/template/index.vue
index e6f0c7046..50025187f 100644
--- a/frontend/src/views/container/template/index.vue
+++ b/frontend/src/views/container/template/index.vue
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/frontend/src/views/container/volume/index.vue b/frontend/src/views/container/volume/index.vue
index b33b279b6..1cdcc6d1d 100644
--- a/frontend/src/views/container/volume/index.vue
+++ b/frontend/src/views/container/volume/index.vue
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/frontend/src/views/cronjob/index.vue b/frontend/src/views/cronjob/index.vue
index 09320137b..1ce8152f8 100644
--- a/frontend/src/views/cronjob/index.vue
+++ b/frontend/src/views/cronjob/index.vue
@@ -26,8 +26,8 @@
-
-
+
+
@@ -54,24 +54,12 @@
-
- {{ $t('commons.button.enable') }}
-
-
- {{ $t('commons.button.disable') }}
-
+ :status="row.status"
+ />
+
diff --git a/frontend/src/views/cronjob/record/index.vue b/frontend/src/views/cronjob/record/index.vue
index 4b207cfc6..d871d2bd7 100644
--- a/frontend/src/views/cronjob/record/index.vue
+++ b/frontend/src/views/cronjob/record/index.vue
@@ -27,12 +27,7 @@
{{ $t('cronjob.' + dialogData.rowData.type) }} - {{ dialogData.rowData.name }}
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
@@ -99,15 +94,7 @@
-
- {{ $t('commons.status.success') }}
-
-
- {{ $t('commons.status.waiting') }}
-
-
- {{ $t('commons.status.failed') }}
-
+
{{ row.startTime }}
diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue
index b3da2e082..61a13afbb 100644
--- a/frontend/src/views/database/mysql/index.vue
+++ b/frontend/src/views/database/mysql/index.vue
@@ -64,7 +64,7 @@
-
+
{{ $t('commons.table.type') }}
diff --git a/frontend/src/views/database/postgresql/index.vue b/frontend/src/views/database/postgresql/index.vue
index e5601d2fe..eadb46a8e 100644
--- a/frontend/src/views/database/postgresql/index.vue
+++ b/frontend/src/views/database/postgresql/index.vue
@@ -47,7 +47,7 @@
PGAdmin4
-
+
{{ $t('commons.table.type') }}
diff --git a/frontend/src/views/host/firewall/forward/index.vue b/frontend/src/views/host/firewall/forward/index.vue
index c3a6bace3..7697ec22b 100644
--- a/frontend/src/views/host/firewall/forward/index.vue
+++ b/frontend/src/views/host/firewall/forward/index.vue
@@ -27,8 +27,8 @@
-
-
+
+
diff --git a/frontend/src/views/host/firewall/ip/index.vue b/frontend/src/views/host/firewall/ip/index.vue
index 528057a20..e0c4bc41b 100644
--- a/frontend/src/views/host/firewall/ip/index.vue
+++ b/frontend/src/views/host/firewall/ip/index.vue
@@ -34,8 +34,8 @@
-
-
+
+
diff --git a/frontend/src/views/host/firewall/port/index.vue b/frontend/src/views/host/firewall/port/index.vue
index 301b159ea..4c3badc16 100644
--- a/frontend/src/views/host/firewall/port/index.vue
+++ b/frontend/src/views/host/firewall/port/index.vue
@@ -56,8 +56,8 @@
-
-
+
+
diff --git a/frontend/src/views/host/firewall/status/index.vue b/frontend/src/views/host/firewall/status/index.vue
index 26853fa43..0700cef9b 100644
--- a/frontend/src/views/host/firewall/status/index.vue
+++ b/frontend/src/views/host/firewall/status/index.vue
@@ -5,12 +5,7 @@
{{ baseInfo.name }}
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
{{ $t('app.version') }}: {{ baseInfo.version }}
@@ -67,7 +62,7 @@ const loadBaseInfo = async (search: boolean) => {
onPing.value = baseInfo.value.pingStatus;
oldStatus.value = onPing.value;
emit('update:name', baseInfo.value.name);
- emit('update:is-active', baseInfo.value.status);
+ emit('update:is-active', baseInfo.value.isActive);
if (search) {
emit('search');
} else {
diff --git a/frontend/src/views/host/ssh/log/log.vue b/frontend/src/views/host/ssh/log/log.vue
index 5e673fea7..8740fd5c4 100644
--- a/frontend/src/views/host/ssh/log/log.vue
+++ b/frontend/src/views/host/ssh/log/log.vue
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/frontend/src/views/host/ssh/ssh/index.vue b/frontend/src/views/host/ssh/ssh/index.vue
index 5226cd37b..04d8d7adc 100644
--- a/frontend/src/views/host/ssh/ssh/index.vue
+++ b/frontend/src/views/host/ssh/ssh/index.vue
@@ -7,22 +7,7 @@
SSH
-
- {{ $t('commons.status.running') }}
-
-
-
-
- {{ $t('commons.status.stopped') }}
-
-
-
+
diff --git a/frontend/src/views/log/login/index.vue b/frontend/src/views/log/login/index.vue
index 55612146b..f37f2c77b 100644
--- a/frontend/src/views/log/login/index.vue
+++ b/frontend/src/views/log/login/index.vue
@@ -16,8 +16,8 @@
-
-
+
+
@@ -27,14 +27,7 @@
-
- {{ $t('commons.status.success') }}
-
-
-
- {{ $t('commons.status.failed') }}
-
-
+
-
-
+
+
@@ -55,22 +55,7 @@
-
- {{ $t('commons.status.success') }}
-
-
-
-
- {{ $t('commons.status.failed') }}
-
-
-
+
{
};
const loadDetail = (log: string) => {
- if (log.indexOf('[enable]') !== -1) {
- log = log.replace('[enable]', '[' + i18n.global.t('commons.button.enable') + ']');
- }
- if (log.indexOf('[Enable]') !== -1) {
- log = log.replace('[Enable]', '[' + i18n.global.t('commons.button.enable') + ']');
- }
- if (log.indexOf('[disable]') !== -1) {
- log = log.replace('[disable]', '[' + i18n.global.t('commons.button.disable') + ']');
- }
- if (log.indexOf('[Disable]') !== -1) {
- log = log.replace('[Disable]', '[' + i18n.global.t('commons.button.disable') + ']');
- }
- if (log.indexOf('[light]') !== -1) {
- log = log.replace('[light]', '[' + i18n.global.t('setting.light') + ']');
- }
- if (log.indexOf('[dark]') !== -1) {
- log = log.replace('[dark]', '[' + i18n.global.t('setting.dark') + ']');
- }
- if (log.indexOf('[delete]') !== -1) {
- log = log.replace('[delete]', '[' + i18n.global.t('commons.button.delete') + ']');
- }
- if (log.indexOf('[get]') !== -1) {
- log = log.replace('[get]', '[' + i18n.global.t('commons.button.get') + ']');
- }
- if (log.indexOf('[operate]') !== -1) {
- log = log.replace('[operate]', '[' + i18n.global.t('commons.table.operate') + ']');
- }
- if (log.indexOf('[UserName]') !== -1) {
- return log.replace('[UserName]', '[' + i18n.global.t('commons.login.username') + ']');
- }
- if (log.indexOf('[PanelName]') !== -1) {
- return log.replace('[PanelName]', '[' + i18n.global.t('setting.title') + ']');
- }
- if (log.indexOf('[Language]') !== -1) {
- return log.replace('[Language]', '[' + i18n.global.t('setting.language') + ']');
- }
- if (log.indexOf('[Theme]') !== -1) {
- return log.replace('[Theme]', '[' + i18n.global.t('setting.theme') + ']');
- }
- if (log.indexOf('[MenuTabs]') !== -1) {
- return log.replace('[MenuTabs]', '[' + i18n.global.t('setting.menuTabs') + ']');
- }
- if (log.indexOf('[SessionTimeout]') !== -1) {
- return log.replace('[SessionTimeout]', '[' + i18n.global.t('setting.sessionTimeout') + ']');
- }
- if (log.indexOf('SecurityEntrance') !== -1) {
- return log.replace('[SecurityEntrance]', '[' + i18n.global.t('setting.entrance') + ']');
- }
- if (log.indexOf('[ExpirationDays]') !== -1) {
- return log.replace('[ExpirationDays]', '[' + i18n.global.t('setting.expirationTime') + ']');
- }
- if (log.indexOf('[ComplexityVerification]') !== -1) {
- return log.replace('[ComplexityVerification]', '[' + i18n.global.t('setting.complexity') + ']');
- }
- if (log.indexOf('[MFAStatus]') !== -1) {
- return log.replace('[MFAStatus]', '[' + i18n.global.t('setting.mfa') + ']');
- }
- if (log.indexOf('[MonitorStatus]') !== -1) {
- return log.replace('[MonitorStatus]', '[' + i18n.global.t('monitor.enableMonitor') + ']');
- }
- if (log.indexOf('[MonitorStoreDays]') !== -1) {
- return log.replace('[MonitorStoreDays]', '[' + i18n.global.t('setting.monitor') + ']');
- }
- if (log.indexOf('[MonitorStoreDays]') !== -1) {
- return log.replace('[MonitorStoreDays]', '[' + i18n.global.t('setting.monitor') + ']');
- }
- if (log.indexOf('[MonitorStoreDays]') !== -1) {
- return log.replace('[MonitorStoreDays]', '[' + i18n.global.t('setting.monitor') + ']');
+ for (const [key, value] of Object.entries(replacements)) {
+ if (log.indexOf(key) !== -1) {
+ log = log.replace(key, '[' + i18n.global.t(value) + ']');
+ }
}
return log;
};
+const replacements = {
+ '[enable]': 'commons.button.enable',
+ '[Enable]': 'commons.button.enable',
+ '[disable]': 'commons.button.disable',
+ '[Disable]': 'commons.button.disable',
+ '[light]': 'setting.light',
+ '[dark]': 'setting.dark',
+ '[delete]': 'commons.button.delete',
+ '[get]': 'commons.button.get',
+ '[operate]': 'commons.table.operate',
+ '[UserName]': 'commons.button.username',
+ '[PanelName]': 'setting.title',
+ '[Language]': 'setting.language',
+ '[Theme]': 'setting.theme',
+ '[MenuTabs]': 'setting.menuTabs',
+ '[SessionTimeout]': 'setting.sessionTimeout',
+ '[SecurityEntrance]': 'setting.entrance',
+ '[ExpirationDays]': 'setting.expirationTime',
+ '[ComplexityVerification]': 'setting.complexity',
+ '[MFAStatus]': 'setting.mfa',
+ '[MonitorStatus]': 'setting.enableMonitor',
+ '[MonitorStoreDays]': 'setting.monitor',
+};
+
const onSubmitClean = async () => {
await cleanLogs({ logType: 'operation' });
search();
diff --git a/frontend/src/views/log/task/index.vue b/frontend/src/views/log/task/index.vue
index 5b4dc9c66..7f11ad705 100644
--- a/frontend/src/views/log/task/index.vue
+++ b/frontend/src/views/log/task/index.vue
@@ -12,7 +12,7 @@
-
+
@@ -21,22 +21,7 @@
-
- {{ $t('commons.status.success') }}
-
-
- {{ $t('process.running') }}
-
-
-
- {{ $t('commons.status.failed') }}
-
-
+
diff --git a/frontend/src/views/setting/backup-account/index.vue b/frontend/src/views/setting/backup-account/index.vue
index a8240bcd5..8082f04e6 100644
--- a/frontend/src/views/setting/backup-account/index.vue
+++ b/frontend/src/views/setting/backup-account/index.vue
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/frontend/src/views/setting/license/index.vue b/frontend/src/views/setting/license/index.vue
index dda9dd46c..f684049ec 100644
--- a/frontend/src/views/setting/license/index.vue
+++ b/frontend/src/views/setting/license/index.vue
@@ -27,29 +27,14 @@
-
-
- {{ $t('license.' + row.status) }}
-
-
-
-
- {{ $t('license.' + row.status) }}
-
-
-
- {{ $t('license.' + row.status) }}
-
+
-
-
+
-
@@ -125,6 +110,16 @@ const paginationConfig = reactive({
name: '',
});
+const loadMsg = (status: string) => {
+ if (status === 'Exceptional') {
+ return i18n.global.t('license.exceptionalHelper');
+ }
+ if (status === 'Lost') {
+ return i18n.global.t('license.lostHelper');
+ }
+ return '';
+};
+
const onSync = async (row: any) => {
loading.value = true;
await syncLicense(row.id)
@@ -219,7 +214,7 @@ const buttons = [
{
label: i18n.global.t('commons.button.unbind'),
disabled: (row: any) => {
- return row.status === 'free';
+ return row.status === 'Free';
},
click: (row: any) => {
if (row.freeCount != 0) {
diff --git a/frontend/src/views/setting/panel/index.vue b/frontend/src/views/setting/panel/index.vue
index 0fae60a42..94db6dbea 100644
--- a/frontend/src/views/setting/panel/index.vue
+++ b/frontend/src/views/setting/panel/index.vue
@@ -45,10 +45,10 @@
-
+
{{ $t('commons.button.enable') }}
-
+
{{ $t('commons.button.disable') }}
@@ -104,10 +104,10 @@
@change="onSave('DeveloperMode', form.developerMode)"
v-model="form.developerMode"
>
-
+
{{ $t('commons.button.enable') }}
-
+
{{ $t('commons.button.disable') }}
@@ -326,7 +326,7 @@ const onSave = async (key: string, val: any) => {
}
}
if (key === 'MenuTabs') {
- globalStore.setOpenMenuTabs(val === 'enable');
+ globalStore.setOpenMenuTabs(val === 'Enable');
}
let param = {
key: key,
diff --git a/frontend/src/views/setting/safe/index.vue b/frontend/src/views/setting/safe/index.vue
index b586f8751..3b969a02e 100644
--- a/frontend/src/views/setting/safe/index.vue
+++ b/frontend/src/views/setting/safe/index.vue
@@ -107,11 +107,11 @@
{{ $t('setting.https') }}
-
+
{{ $t('setting.domainOrIP') }} {{ sslInfo.domain }}
{{ $t('setting.timeOut') }} {{ sslInfo.timeout }}
@@ -145,8 +145,8 @@
{{ $t('setting.complexityHelper') }}
@@ -157,8 +157,8 @@
{{ $t('setting.mfaHelper') }}
@@ -219,15 +219,15 @@ const mobile = computed(() => {
const form = reactive({
serverPort: 9999,
- ipv6: 'disable',
+ ipv6: 'Disable',
bindAddress: '',
- ssl: 'disable',
+ ssl: 'Disable',
sslType: 'self',
securityEntrance: '',
expirationDays: 0,
expirationTime: '',
- complexityVerification: 'disable',
- mfaStatus: 'disable',
+ complexityVerification: 'Disable',
+ mfaStatus: 'Disable',
mfaInterval: 30,
allowIPs: '',
bindDomain: '',
@@ -244,7 +244,7 @@ const search = async () => {
form.bindAddress = res.data.bindAddress;
form.ssl = res.data.ssl;
form.sslType = res.data.sslType;
- if (form.ssl === 'enable') {
+ if (form.ssl === 'Enable') {
loadInfo();
}
form.securityEntrance = res.data.securityEntrance;
@@ -281,7 +281,7 @@ const onSaveComplexity = async () => {
};
const handleMFA = async () => {
- if (form.mfaStatus === 'enable') {
+ if (form.mfaStatus === 'Enable') {
mfaRef.value.acceptParams({ interval: form.mfaInterval });
return;
}
@@ -290,7 +290,7 @@ const handleMFA = async () => {
cancelButtonText: i18n.global.t('commons.button.cancel'),
}).then(async () => {
loading.value = true;
- await updateSetting({ key: 'MFAStatus', value: 'disable' })
+ await updateSetting({ key: 'MFAStatus', value: 'Disable' })
.then(() => {
loading.value = false;
search();
@@ -321,7 +321,7 @@ const onChangeAllowIPs = () => {
allowIPsRef.value.acceptParams({ allowIPs: form.allowIPs });
};
const handleSSL = async () => {
- if (form.ssl === 'enable') {
+ if (form.ssl === 'Enable') {
let params = {
ssl: form.ssl,
sslType: form.sslType,
@@ -336,7 +336,7 @@ const handleSSL = async () => {
type: 'info',
})
.then(async () => {
- await updateSSL({ ssl: 'disable', domain: '', sslType: form.sslType, key: '', cert: '', sslID: 0 });
+ await updateSSL({ ssl: 'Disable', domain: '', sslType: form.sslType, key: '', cert: '', sslID: 0 });
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
let href = window.location.href;
globalStore.isLogin = false;
@@ -349,7 +349,7 @@ const handleSSL = async () => {
window.location.href = `http://${address}`;
})
.catch(() => {
- form.ssl = 'enable';
+ form.ssl = 'Enable';
});
};
diff --git a/frontend/src/views/setting/snapshot/index.vue b/frontend/src/views/setting/snapshot/index.vue
index eaa8be445..65edcad12 100644
--- a/frontend/src/views/setting/snapshot/index.vue
+++ b/frontend/src/views/setting/snapshot/index.vue
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/frontend/src/views/toolbox/clam/index.vue b/frontend/src/views/toolbox/clam/index.vue
index c42fd5bb1..7a3163151 100644
--- a/frontend/src/views/toolbox/clam/index.vue
+++ b/frontend/src/views/toolbox/clam/index.vue
@@ -75,24 +75,16 @@
sortable
>
-
- {{ $t('commons.status.enabled') }}
-
-
+
- {{ $t('commons.status.disabled') }}
-
+ />
-
diff --git a/frontend/src/views/toolbox/clam/record/index.vue b/frontend/src/views/toolbox/clam/record/index.vue
index e1e4cdc43..5536d4a87 100644
--- a/frontend/src/views/toolbox/clam/record/index.vue
+++ b/frontend/src/views/toolbox/clam/record/index.vue
@@ -73,12 +73,7 @@
-
- {{ $t('commons.status.done') }}
-
-
- {{ $t('commons.status.scanFailed') }}
-
+
{{ row.name }}
diff --git a/frontend/src/views/toolbox/clam/status/index.vue b/frontend/src/views/toolbox/clam/status/index.vue
index a4c05fd68..e2a0fd54f 100644
--- a/frontend/src/views/toolbox/clam/status/index.vue
+++ b/frontend/src/views/toolbox/clam/status/index.vue
@@ -5,12 +5,7 @@
ClamAV
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
{{ $t('app.version') }}:{{ data.version }}
@@ -40,12 +35,7 @@
FreshClam
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
{{ $t('app.version') }}:{{ data.freshVersion }}
diff --git a/frontend/src/views/toolbox/fail2ban/index.vue b/frontend/src/views/toolbox/fail2ban/index.vue
index 056887389..39b755333 100644
--- a/frontend/src/views/toolbox/fail2ban/index.vue
+++ b/frontend/src/views/toolbox/fail2ban/index.vue
@@ -5,12 +5,7 @@
Fail2ban
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
{{ form.version }}
diff --git a/frontend/src/views/toolbox/ftp/index.vue b/frontend/src/views/toolbox/ftp/index.vue
index 86af6ba12..ebaa55fd6 100644
--- a/frontend/src/views/toolbox/ftp/index.vue
+++ b/frontend/src/views/toolbox/ftp/index.vue
@@ -5,12 +5,7 @@
FTP
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
@@ -92,27 +87,17 @@
-
- {{ $t('database.isDelete') }}
-
-
+
- {{ $t('commons.status.enabled') }}
-
-
+
- {{ $t('commons.status.disabled') }}
-
+ />
diff --git a/frontend/src/views/toolbox/ftp/log/index.vue b/frontend/src/views/toolbox/ftp/log/index.vue
index 0bd9ddeab..ba5319bea 100644
--- a/frontend/src/views/toolbox/ftp/log/index.vue
+++ b/frontend/src/views/toolbox/ftp/log/index.vue
@@ -9,8 +9,7 @@
- {{ $t('commons.status.success') }}
- {{ $t('commons.status.failed') }}
+
diff --git a/frontend/src/views/toolbox/supervisor/index.vue b/frontend/src/views/toolbox/supervisor/index.vue
index 737aa4b21..85990e5be 100644
--- a/frontend/src/views/toolbox/supervisor/index.vue
+++ b/frontend/src/views/toolbox/supervisor/index.vue
@@ -60,33 +60,17 @@
-
- {{ $t('commons.status.running') }}
-
-
+
- {{ $t('commons.status.unhealthy') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+ />
+
@@ -166,7 +150,6 @@ import { GlobalStore } from '@/store';
import i18n from '@/lang';
import { HostTool } from '@/api/interface/host-tool';
import { MsgSuccess } from '@/utils/message';
-import { VideoPlay, VideoPause, RefreshRight } from '@element-plus/icons-vue';
import router from '@/routers';
const globalStore = GlobalStore();
diff --git a/frontend/src/views/toolbox/supervisor/status/index.vue b/frontend/src/views/toolbox/supervisor/status/index.vue
index ac08b16ad..28c386e1d 100644
--- a/frontend/src/views/toolbox/supervisor/status/index.vue
+++ b/frontend/src/views/toolbox/supervisor/status/index.vue
@@ -5,7 +5,7 @@
{{ 'Supervisor' }}
-
+
{{ $t('app.version') }}:{{ data.version }}
diff --git a/frontend/src/views/website/runtime/php/supervisor/index.vue b/frontend/src/views/website/runtime/php/supervisor/index.vue
index b0a81ab49..3bf42623f 100644
--- a/frontend/src/views/website/runtime/php/supervisor/index.vue
+++ b/frontend/src/views/website/runtime/php/supervisor/index.vue
@@ -42,27 +42,17 @@
-
- {{ $t('commons.status.running') }}
-
-
+
- {{ $t('commons.status.unhealthy') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+ />
+
@@ -138,7 +128,6 @@ import { GlobalStore } from '@/store';
import i18n from '@/lang';
import { HostTool } from '@/api/interface/host-tool';
import { MsgSuccess } from '@/utils/message';
-import { VideoPlay, VideoPause, RefreshRight } from '@element-plus/icons-vue';
const globalStore = GlobalStore();
const loading = ref(false);
diff --git a/frontend/src/views/website/website/config/basic/proxy/index.vue b/frontend/src/views/website/website/config/basic/proxy/index.vue
index 2841ef4e1..e38aebb78 100644
--- a/frontend/src/views/website/website/config/basic/proxy/index.vue
+++ b/frontend/src/views/website/website/config/basic/proxy/index.vue
@@ -14,12 +14,7 @@
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
({
proxyPass: 'http://',
proxyHost: '$host',
replaces: {},
+ proxySSLName: '',
});
const openCreate = () => {
diff --git a/frontend/src/views/website/website/config/basic/redirect/index.vue b/frontend/src/views/website/website/config/basic/redirect/index.vue
index ed7fbd33f..7cef4411a 100644
--- a/frontend/src/views/website/website/config/basic/redirect/index.vue
+++ b/frontend/src/views/website/website/config/basic/redirect/index.vue
@@ -30,12 +30,7 @@
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+
-
- {{ $t('commons.status.running') }}
-
-
- {{ $t('commons.status.stopped') }}
-
+ />
+