diff --git a/backend/app/api/v1/dashboard.go b/backend/app/api/v1/dashboard.go new file mode 100644 index 000000000..fd0128f1e --- /dev/null +++ b/backend/app/api/v1/dashboard.go @@ -0,0 +1,43 @@ +package v1 + +import ( + "errors" + + "github.com/1Panel-dev/1Panel/backend/app/api/v1/helper" + "github.com/1Panel-dev/1Panel/backend/constant" + "github.com/gin-gonic/gin" +) + +func (b *BaseApi) LoadDashboardBaseInfo(c *gin.Context) { + ioOption, ok := c.Params.Get("ioOption") + if !ok { + helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, errors.New("error ioOption in path")) + return + } + netOption, ok := c.Params.Get("netOption") + if !ok { + helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, errors.New("error netOption in path")) + return + } + data, err := dashboardService.LoadBaseInfo(ioOption, netOption) + if err != nil { + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) + return + } + helper.SuccessWithData(c, data) +} + +func (b *BaseApi) LoadDashboardCurrentInfo(c *gin.Context) { + ioOption, ok := c.Params.Get("ioOption") + if !ok { + helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, errors.New("error ioOption in path")) + return + } + netOption, ok := c.Params.Get("netOption") + if !ok { + helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, errors.New("error netOption in path")) + return + } + data := dashboardService.LoadCurrentInfo(ioOption, netOption) + helper.SuccessWithData(c, data) +} diff --git a/backend/app/api/v1/dashboard_test.go b/backend/app/api/v1/dashboard_test.go new file mode 100644 index 000000000..b8c7982d3 --- /dev/null +++ b/backend/app/api/v1/dashboard_test.go @@ -0,0 +1,16 @@ +package v1 + +import ( + "fmt" + "testing" + + "github.com/shirou/gopsutil/net" +) + +func TestCopu(t *testing.T) { + fmt.Println(net.IOCounters(false)) + fmt.Println(net.IOCounters(true)) +} + +// [{"name":"all","bytesSent":15498384367,"bytesRecv":18415197440,"packetsSent":11608058,"packetsRecv":12976591,"errin":0,"errout":21,"dropin":0,"dropout":1181,"fifoin":0,"fifoout":0}] +// [{"name":"lo0","bytesSent":12947010452,"bytesRecv":12947010452,"packetsSent":6519135,"packetsRecv":6519135,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"gif0","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"stf0","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"ap1","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"en0","bytesSent":2531548007,"bytesRecv":5443547837,"packetsSent":5019082,"packetsRecv":6374381,"errin":0,"errout":0,"dropin":0,"dropout":1065,"fifoin":0,"fifoout":0} {"name":"en1","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"en2","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"bridge0","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"awdl0","bytesSent":103717,"bytesRecv":157244,"packetsSent":412,"packetsRecv":460,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"llw0","bytesSent":0,"bytesRecv":0,"packetsSent":0,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"utun0","bytesSent":21810,"bytesRecv":0,"packetsSent":121,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"utun1","bytesSent":21810,"bytesRecv":0,"packetsSent":121,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"utun2","bytesSent":21810,"bytesRecv":0,"packetsSent":121,"packetsRecv":0,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0} {"name":"en5","bytesSent":6093969,"bytesRecv":6264468,"packetsSent":47985,"packetsRecv":48051,"errin":0,"errout":21,"dropin":0,"dropout":116,"fifoin":0,"fifoout":0} {"name":"utun3","bytesSent":13576933,"bytesRecv":18231580,"packetsSent":21129,"packetsRecv":34612,"errin":0,"errout":0,"dropin":0,"dropout":0,"fifoin":0,"fifoout":0}] diff --git a/backend/app/api/v1/entry.go b/backend/app/api/v1/entry.go index beda05032..6306eb915 100644 --- a/backend/app/api/v1/entry.go +++ b/backend/app/api/v1/entry.go @@ -9,7 +9,8 @@ type ApiGroup struct { var ApiGroupApp = new(ApiGroup) var ( - authService = service.ServiceGroupApp.AuthService + authService = service.ServiceGroupApp.AuthService + dashboardService = service.ServiceGroupApp.DashboardService appService = service.ServiceGroupApp.AppService appInstallService = service.ServiceGroupApp.AppInstallService diff --git a/backend/app/api/v1/monitor.go b/backend/app/api/v1/monitor.go index fff909f4e..cb3ad7263 100644 --- a/backend/app/api/v1/monitor.go +++ b/backend/app/api/v1/monitor.go @@ -9,6 +9,7 @@ import ( "github.com/1Panel-dev/1Panel/backend/constant" "github.com/1Panel-dev/1Panel/backend/global" "github.com/gin-gonic/gin" + "github.com/shirou/gopsutil/disk" "github.com/shirou/gopsutil/net" ) @@ -91,3 +92,13 @@ func (b *BaseApi) GetNetworkOptions(c *gin.Context) { } helper.SuccessWithData(c, options) } + +func (b *BaseApi) GetIOOptions(c *gin.Context) { + diskStat, _ := disk.IOCounters() + var options []string + options = append(options, "all") + for _, net := range diskStat { + options = append(options, net.Name) + } + helper.SuccessWithData(c, options) +} diff --git a/backend/app/dto/dashboard.go b/backend/app/dto/dashboard.go index 65735f7f1..3d4e96bad 100644 --- a/backend/app/dto/dashboard.go +++ b/backend/app/dto/dashboard.go @@ -1,26 +1,71 @@ package dto +import "time" + type DashboardBase struct { - HaloEnabled bool `json:"haloEnabled"` - DateeaseEnabled bool `json:"dateeaseEnabled"` - JumpServerEnabled bool `json:"jumpserverEnabled"` - MeterSphereEnabled bool `json:"metersphereEnabled"` + HaloID uint `json:"haloID"` + DateeaseID uint `json:"dateeaseID"` + JumpServerID uint `json:"jumpserverID"` + MeterSphereID uint `json:"metersphereID"` + KubeoperatorID uint `json:"kubeoperatorID"` + KubepiID uint `json:"kubepiID"` WebsiteNumber int `json:"websiteNumber"` DatabaseNumber int `json:"databaseNumber"` CronjobNumber int `json:"cronjobNumber"` AppInstalldNumber int `json:"appInstalldNumber"` - HostName string `json:"hostname"` - Os string `json:"os"` + Hostname string `json:"hostname"` + OS string `json:"os"` Platform string `json:"platform"` PlatformFamily string `json:"platformFamily"` PlatformVersion string `json:"platformVersion"` KernelArch string `json:"kernelArch"` + KernelVersion string `json:"kernelVersion"` VirtualizationSystem string `json:"virtualizationSystem"` - CPUCores int `json:"cpuCores"` - CPULogicalCores int `json:"cpuLogicalCores"` - CPUModelName string `json:"cpuModelName"` - CPUPercent float64 `json:"cpuPercent"` + CPUCores int `json:"cpuCores"` + CPULogicalCores int `json:"cpuLogicalCores"` + CPUModelName string `json:"cpuModelName"` + + CurrentInfo DashboardCurrent `json:"currentInfo"` +} + +type DashboardCurrent struct { + Procs uint64 `json:"procs"` + + Load1 float64 `json:"load1"` + Load5 float64 `json:"load5"` + Load15 float64 `json:"load15"` + LoadUsagePercent float64 `json:"loadUsagePercent"` + + CPUPercent []float64 `json:"cpuPercent"` + CPUUsedPercent float64 `json:"cpuUsedPercent"` + CPUUsed float64 `json:"cpuUsed"` + CPUTotal int `json:"cpuTotal"` + + MemoryTotal uint64 `json:"memoryTotal"` + MemoryAvailable uint64 `json:"memoryAvailable"` + MemoryUsed uint64 `json:"memoryUsed"` + MemoryUsedPercent float64 `json:"MemoryUsedPercent"` + + IOReadBytes uint64 `json:"ioReadBytes"` + IOWriteBytes uint64 `json:"ioWriteBytes"` + IOCount uint64 `json:"ioCount"` + IOTime uint64 `json:"ioTime"` + + Total uint64 `json:"total"` + Free uint64 `json:"free"` + Used uint64 `json:"used"` + UsedPercent float64 `json:"usedPercent"` + + InodesTotal uint64 `json:"inodesTotal"` + InodesUsed uint64 `json:"inodesUsed"` + InodesFree uint64 `json:"inodesFree"` + InodesUsedPercent float64 `json:"inodesUsedPercent"` + + NetBytesSent uint64 `json:"netBytesSent"` + NetBytesRecv uint64 `json:"netBytesRecv"` + + ShotTime time.Time `json:"shotTime"` } diff --git a/backend/app/service/dashboard.go b/backend/app/service/dashboard.go index c6aed8861..e15fae20f 100644 --- a/backend/app/service/dashboard.go +++ b/backend/app/service/dashboard.go @@ -1,54 +1,80 @@ package service import ( + "encoding/json" "time" "github.com/1Panel-dev/1Panel/backend/app/dto" - "github.com/jinzhu/copier" "github.com/shirou/gopsutil/cpu" + "github.com/shirou/gopsutil/disk" "github.com/shirou/gopsutil/host" + "github.com/shirou/gopsutil/load" + "github.com/shirou/gopsutil/mem" + "github.com/shirou/gopsutil/net" ) type DashboardService struct{} type IDashboardService interface { - LoadBaseInfo() (*dto.DashboardBase, error) + LoadBaseInfo(ioOption string, netOption string) (*dto.DashboardBase, error) + LoadCurrentInfo(ioOption string, netOption string) *dto.DashboardCurrent } func NewIDashboardService() IDashboardService { return &DashboardService{} } -func (u *DashboardService) LoadBaseInfo() (*dto.DashboardBase, error) { +func (u *DashboardService) LoadBaseInfo(ioOption string, netOption string) (*dto.DashboardBase, error) { var baseInfo dto.DashboardBase hostInfo, err := host.Info() if err != nil { return nil, err } - if err := copier.Copy(baseInfo, hostInfo); err != nil { - return nil, err - } - appInstall, err := appInstallRepo.GetBy() + baseInfo.Hostname = hostInfo.Hostname + baseInfo.OS = hostInfo.OS + baseInfo.Platform = hostInfo.Platform + baseInfo.PlatformFamily = hostInfo.PlatformFamily + baseInfo.PlatformVersion = hostInfo.PlatformVersion + baseInfo.KernelArch = hostInfo.KernelArch + baseInfo.KernelVersion = hostInfo.KernelVersion + ss, _ := json.Marshal(hostInfo) + baseInfo.VirtualizationSystem = string(ss) + + apps, err := appRepo.GetBy() if err != nil { return nil, err } - for _, app := range appInstall { - switch app.App.Key { + for _, app := range apps { + switch app.Key { case "dateease": - baseInfo.DateeaseEnabled = true + baseInfo.DateeaseID = app.ID case "halo": - baseInfo.HaloEnabled = true + baseInfo.HaloID = app.ID case "metersphere": - baseInfo.MeterSphereEnabled = true + baseInfo.MeterSphereID = app.ID case "jumpserver": - baseInfo.JumpServerEnabled = true + baseInfo.JumpServerID = app.ID + case "kubeoperator": + baseInfo.KubeoperatorID = app.ID + case "kubepi": + baseInfo.KubepiID = app.ID } } + + appInstall, err := appInstallRepo.GetBy() + if err != nil { + return nil, err + } baseInfo.AppInstalldNumber = len(appInstall) dbs, err := mysqlRepo.List() if err != nil { return nil, err } baseInfo.DatabaseNumber = len(dbs) + website, err := websiteRepo.GetBy() + if err != nil { + return nil, err + } + baseInfo.WebsiteNumber = len(website) cornjobs, err := cronjobRepo.List() if err != nil { return nil, err @@ -62,10 +88,85 @@ func (u *DashboardService) LoadBaseInfo() (*dto.DashboardBase, error) { baseInfo.CPUModelName = cpuInfo[0].ModelName baseInfo.CPUCores, _ = cpu.Counts(false) baseInfo.CPULogicalCores, _ = cpu.Counts(true) - totalPercent, _ := cpu.Percent(1*time.Second, false) - if len(totalPercent) == 1 { - baseInfo.CPUPercent = totalPercent[0] - } + baseInfo.CurrentInfo = *u.LoadCurrentInfo(ioOption, netOption) return &baseInfo, nil } + +func (u *DashboardService) LoadCurrentInfo(ioOption string, netOption string) *dto.DashboardCurrent { + var currentInfo dto.DashboardCurrent + hostInfo, _ := host.Info() + currentInfo.Procs = hostInfo.Procs + + currentInfo.CPUTotal, _ = cpu.Counts(true) + totalPercent, _ := cpu.Percent(0, false) + if len(totalPercent) == 1 { + currentInfo.CPUUsedPercent = totalPercent[0] + currentInfo.CPUUsed = currentInfo.CPUUsedPercent * 0.01 * float64(currentInfo.CPUTotal) + } + currentInfo.CPUPercent, _ = cpu.Percent(0, true) + + loadInfo, _ := load.Avg() + currentInfo.Load1 = loadInfo.Load1 + currentInfo.Load5 = loadInfo.Load5 + currentInfo.Load15 = loadInfo.Load15 + currentInfo.LoadUsagePercent = loadInfo.Load1 / (float64(currentInfo.CPUTotal*2) * 0.75) * 100 + + memoryInfo, _ := mem.VirtualMemory() + currentInfo.MemoryTotal = memoryInfo.Total + currentInfo.MemoryAvailable = memoryInfo.Available + currentInfo.MemoryUsed = memoryInfo.Used + currentInfo.MemoryUsedPercent = memoryInfo.UsedPercent + + state, _ := disk.Usage("/") + currentInfo.Total = state.Total + currentInfo.Free = state.Free + currentInfo.Used = state.Used + currentInfo.UsedPercent = state.UsedPercent + currentInfo.InodesTotal = state.InodesTotal + currentInfo.InodesUsed = state.InodesUsed + currentInfo.InodesFree = state.InodesFree + currentInfo.InodesUsedPercent = state.InodesUsedPercent + + if ioOption == "all" { + diskInfo, _ := disk.IOCounters() + for _, state := range diskInfo { + currentInfo.IOReadBytes += state.ReadBytes + currentInfo.IOWriteBytes += state.WriteBytes + currentInfo.IOCount += (state.ReadCount + state.WriteCount) + currentInfo.IOTime += state.ReadTime / 1000 / 1000 + if state.WriteTime > state.ReadTime { + currentInfo.IOTime += state.WriteTime / 1000 / 1000 + } + } + } else { + diskInfo, _ := disk.IOCounters(ioOption) + for _, state := range diskInfo { + currentInfo.IOReadBytes += state.ReadBytes + currentInfo.IOWriteBytes += state.WriteBytes + currentInfo.IOTime += state.ReadTime / 1000 / 1000 + if state.WriteTime > state.ReadTime { + currentInfo.IOTime += state.WriteTime / 1000 / 1000 + } + } + } + + if netOption == "all" { + netInfo, _ := net.IOCounters(false) + if len(netInfo) != 0 { + currentInfo.NetBytesSent = netInfo[0].BytesSent + currentInfo.NetBytesRecv = netInfo[0].BytesRecv + } + } else { + netInfo, _ := net.IOCounters(true) + for _, state := range netInfo { + if state.Name == netOption { + currentInfo.NetBytesSent = state.BytesSent + currentInfo.NetBytesRecv = state.BytesRecv + } + } + } + + currentInfo.ShotTime = time.Now() + return ¤tInfo +} diff --git a/backend/app/service/entry.go b/backend/app/service/entry.go index 2689c0efd..88acc1142 100644 --- a/backend/app/service/entry.go +++ b/backend/app/service/entry.go @@ -4,6 +4,7 @@ import "github.com/1Panel-dev/1Panel/backend/app/repo" type ServiceGroup struct { AuthService + DashboardService AppService AppInstallService diff --git a/backend/init/router/router.go b/backend/init/router/router.go index 65afafac4..159ac3df7 100644 --- a/backend/init/router/router.go +++ b/backend/init/router/router.go @@ -67,6 +67,7 @@ func Routers() *gin.Engine { // PrivateGroup.Use(middleware.SafetyAuth()) { systemRouter.InitBaseRouter(PrivateGroup) + systemRouter.InitDashboardRouter(PrivateGroup) systemRouter.InitHostRouter(PrivateGroup) systemRouter.InitBackupRouter(PrivateGroup) systemRouter.InitGroupRouter(PrivateGroup) diff --git a/backend/middleware/password_expired.go b/backend/middleware/password_expired.go index 5b6989d99..27b07975c 100644 --- a/backend/middleware/password_expired.go +++ b/backend/middleware/password_expired.go @@ -20,6 +20,7 @@ func PasswordExpired() gin.HandlerFunc { expiredDays, _ := strconv.Atoi(setting.Value) if expiredDays == 0 { c.Next() + return } if _, err := c.Cookie(constant.PasswordExpiredName); err != nil { diff --git a/backend/router/entry.go b/backend/router/entry.go index 04a6cef4c..292926f2a 100644 --- a/backend/router/entry.go +++ b/backend/router/entry.go @@ -2,6 +2,7 @@ package router type RouterGroup struct { BaseRouter + DashboardRouter HostRouter BackupRouter GroupRouter diff --git a/backend/router/ro_dashboard.go b/backend/router/ro_dashboard.go new file mode 100644 index 000000000..9dd927905 --- /dev/null +++ b/backend/router/ro_dashboard.go @@ -0,0 +1,22 @@ +package router + +import ( + v1 "github.com/1Panel-dev/1Panel/backend/app/api/v1" + "github.com/1Panel-dev/1Panel/backend/middleware" + + "github.com/gin-gonic/gin" +) + +type DashboardRouter struct{} + +func (s *CronjobRouter) InitDashboardRouter(Router *gin.RouterGroup) { + cmdRouter := Router.Group("dashboard"). + Use(middleware.JwtAuth()). + Use(middleware.SessionAuth()). + Use(middleware.PasswordExpired()) + baseApi := v1.ApiGroupApp.BaseApi + { + cmdRouter.GET("/base/:ioOption/:netOption", baseApi.LoadDashboardBaseInfo) + cmdRouter.GET("/current/:ioOption/:netOption", baseApi.LoadDashboardCurrentInfo) + } +} diff --git a/backend/router/ro_monitor.go b/backend/router/ro_monitor.go index f150441de..f2bce66d3 100644 --- a/backend/router/ro_monitor.go +++ b/backend/router/ro_monitor.go @@ -18,5 +18,6 @@ func (s *MonitorRouter) InitMonitorRouter(Router *gin.RouterGroup) { { monitorRouter.POST("/search", baseApi.LoadMonitor) monitorRouter.GET("/netoptions", baseApi.GetNetworkOptions) + monitorRouter.GET("/iooptions", baseApi.GetIOOptions) } } diff --git a/frontend/src/api/interface/dashboard.ts b/frontend/src/api/interface/dashboard.ts new file mode 100644 index 000000000..1635d2038 --- /dev/null +++ b/frontend/src/api/interface/dashboard.ts @@ -0,0 +1,68 @@ +export namespace Dashboard { + export interface BaseInfo { + haloID: number; + dateeaseID: number; + jumpserverID: number; + metersphereID: number; + kubeoperatorID: number; + kubepiID: number; + + websiteNumber: number; + databaseNumber: number; + cronjobNumber: number; + appInstalldNumber: number; + + hostname: string; + os: string; + platform: string; + platformFamily: string; + platformVersion: string; + kernelArch: string; + kernelVersion: string; + virtualizationSystem: string; + + cpuCores: number; + cpuLogicalCores: number; + cpuModelName: string; + + currentInfo: CurrentInfo; + } + export interface CurrentInfo { + procs: number; + + load1: number; + load5: number; + load15: number; + loadUsagePercent: number; + + cpuPercent: Array; + cpuUsedPercent: number; + cpuUsed: number; + cpuTotal: number; + + memoryTotal: number; + memoryAvailable: number; + memoryUsed: number; + MemoryUsedPercent: number; + + ioReadBytes: number; + ioWriteBytes: number; + ioTime: number; + ioCount: number; + + total: number; + free: number; + used: number; + usedPercent: number; + + inodesTotal: number; + inodesUsed: number; + inodesFree: number; + inodesUsedPercent: number; + + netBytesSent: number; + netBytesRecv: number; + + shotTime: Date; + } +} diff --git a/frontend/src/api/modules/dashboard.ts b/frontend/src/api/modules/dashboard.ts new file mode 100644 index 000000000..962141b28 --- /dev/null +++ b/frontend/src/api/modules/dashboard.ts @@ -0,0 +1,10 @@ +import http from '@/api'; +import { Dashboard } from '../interface/dashboard'; + +export const loadBaseInfo = (ioOption: string, netOption: string) => { + return http.get(`/dashboard/base/${ioOption}/${netOption}`); +}; + +export const loadCurrentInfo = (ioOption: string, netOption: string) => { + return http.get(`/dashboard/current/${ioOption}/${netOption}`); +}; diff --git a/frontend/src/api/modules/monitor.ts b/frontend/src/api/modules/monitor.ts index ec566b293..4d129bed2 100644 --- a/frontend/src/api/modules/monitor.ts +++ b/frontend/src/api/modules/monitor.ts @@ -8,3 +8,7 @@ export const loadMonitor = (param: Monitor.MonitorSearch) => { export const getNetworkOptions = () => { return http.get>(`/monitors/netoptions`); }; + +export const getIOOptions = () => { + return http.get>(`/monitors/iooptions`); +}; diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 46360aa8d..8bc528f2b 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -147,7 +147,38 @@ export default { logs: 'Log', }, home: { - welcome: 'Welcome', + overview: 'Overview', + appInstalled: 'App installed', + systemInfo: 'System info', + hostname: 'Hostname', + platformVersion: 'Platform version', + kernelVersion: 'Kernel version', + kernelArch: 'Kernel arch', + network: 'Network', + io: 'Disk IO', + totalSend: 'Total send', + totalRecv: 'Total recv', + rwPerSecond: 'RW per second', + ioDelay: 'IO delay', + time: 'Times', + + core: 'Physical core', + logicCore: 'Logic core', + loadAverage: 'Average load in the last {0} minutes', + load: 'Load', + mount: 'Mount point', + total: 'Total', + used: 'Used', + free: 'Free', + percent: 'Percent', + app: 'Recommended Apps', + haloInfo: 'Easy to use and powerful open source website tools', + deInfo: 'Open source data visualization tool available to everyone', + jsInfo: 'The popular Open source fortress machine', + msInfo: 'One-stop open source continuous testing platform', + koInfo: 'Open source lightweight Kubernetes distribution', + kubepiInfo: 'Modern open source K8s panel', + goInstall: 'Go install', }, tabs: { more: 'More', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 26479ff24..37b44ea94 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -148,7 +148,38 @@ export default { logs: '面板日志', }, home: { - welcome: '欢迎使用', + overview: '概 览', + appInstalled: '已安装应用', + systemInfo: '系统信息', + hostname: '主机名称', + platformVersion: '发行版本', + kernelVersion: '内核版本', + kernelArch: '系统类型', + network: '流量', + io: '磁盘 IO', + totalSend: '总发送', + totalRecv: '总接收', + rwPerSecond: '每秒读写', + ioDelay: 'IO 延迟', + time: '次', + + core: '物理核心', + logicCore: '逻辑核心', + loadAverage: '最近 {0} 分钟平均负载', + load: '负载', + mount: '挂载点', + total: '总数', + used: '已用', + free: '可用', + percent: '使用率', + app: '推荐应用', + haloInfo: '好用又强大的开源建站工具', + deInfo: '人人可用的开源数据可视化分析工具', + jsInfo: '广受欢迎的开源堡垒机', + msInfo: '一站式开源持续测试平台', + koInfo: '开源的轻量级 Kubernetes 发行版', + kubepiInfo: '现代化的开源 K8s 面板', + goInstall: '去安装', }, tabs: { more: '更多', diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index 43a9c389d..031a97c8e 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -1,57 +1,64 @@