From f88a3059be081d498b936dc6658017870c312deb Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:04:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E6=A0=B7=E5=BC=8F=20(#6440)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/dashboard.go | 4 ++-- frontend/src/styles/common.scss | 6 +++++ .../src/views/container/compose/index.vue | 17 +++----------- frontend/src/views/container/index.vue | 6 ----- frontend/src/views/container/repo/index.vue | 17 +++----------- .../src/views/database/mysql/remote/index.vue | 15 ++++++++----- .../database/postgresql/remote/index.vue | 15 ++++++++----- frontend/src/views/database/redis/index.vue | 16 +++++++++----- .../src/views/database/redis/remote/index.vue | 12 +++++----- .../src/views/host/terminal/command/index.vue | 22 +++++++++++-------- .../src/views/host/terminal/host/index.vue | 12 +++++----- frontend/src/views/log/login/index.vue | 18 +++++++-------- frontend/src/views/toolbox/ftp/index.vue | 12 +++++----- 13 files changed, 83 insertions(+), 89 deletions(-) diff --git a/backend/app/service/dashboard.go b/backend/app/service/dashboard.go index b40da97b5..239843170 100644 --- a/backend/app/service/dashboard.go +++ b/backend/app/service/dashboard.go @@ -151,12 +151,12 @@ func (u *DashboardService) LoadCurrentInfo(ioOption string, netOption string) *d currentInfo.Procs = hostInfo.Procs currentInfo.CPUTotal, _ = cpu.Counts(true) - totalPercent, _ := cpu.Percent(1*time.Second, false) + totalPercent, _ := cpu.Percent(100*time.Millisecond, false) if len(totalPercent) == 1 { currentInfo.CPUUsedPercent = totalPercent[0] currentInfo.CPUUsed = currentInfo.CPUUsedPercent * 0.01 * float64(currentInfo.CPUTotal) } - currentInfo.CPUPercent, _ = cpu.Percent(1*time.Second, true) + currentInfo.CPUPercent, _ = cpu.Percent(100*time.Millisecond, true) loadInfo, _ := load.Avg() currentInfo.Load1 = loadInfo.Load1 diff --git a/frontend/src/styles/common.scss b/frontend/src/styles/common.scss index 146e77c81..779cac84d 100644 --- a/frontend/src/styles/common.scss +++ b/frontend/src/styles/common.scss @@ -444,6 +444,12 @@ html { cursor: pointer; } +.dialog-footer{ + display: flex; + align-items: center; + justify-content: flex-end; +} + .monaco-editor-tree-light .el-tree-node__content:hover { background-color: #e5eefd; } diff --git a/frontend/src/views/container/compose/index.vue b/frontend/src/views/container/compose/index.vue index 1ff40d1f9..42747b2ae 100644 --- a/frontend/src/views/container/compose/index.vue +++ b/frontend/src/views/container/compose/index.vue @@ -25,28 +25,17 @@