From 66a345364f4cdcf5702fe817d6aa01d236a03f8d Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 22 Mar 2023 18:48:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=20(#371)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/group.go | 2 +- frontend/src/components/group/index.vue | 4 ++-- frontend/src/lang/modules/en.ts | 2 +- frontend/src/lang/modules/zh.ts | 4 ++-- frontend/src/views/home/index.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/app/service/group.go b/backend/app/service/group.go index 9247eb161..4f0feb4ed 100644 --- a/backend/app/service/group.go +++ b/backend/app/service/group.go @@ -22,7 +22,7 @@ func NewIGroupService() IGroupService { } func (u *GroupService) List(req dto.GroupSearch) ([]dto.GroupInfo, error) { - groups, err := groupRepo.GetList(commonRepo.WithByType(req.Type)) + groups, err := groupRepo.GetList(commonRepo.WithByType(req.Type), commonRepo.WithOrderBy("created_at desc")) if err != nil { return nil, constant.ErrRecordNotFound } diff --git a/frontend/src/components/group/index.vue b/frontend/src/components/group/index.vue index f29b8c5f3..f6b291f07 100644 --- a/frontend/src/components/group/index.vue +++ b/frontend/src/components/group/index.vue @@ -20,7 +20,7 @@ - +
@@ -145,7 +145,7 @@ const openCreate = () => { isDefault: false, edit: true, }; - data.value.push(g); + data.value.unshift(g); }; const deleteGroup = (index: number) => { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 127373e71..823a582d7 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -229,7 +229,7 @@ const message = { io: 'Disk IO', totalSend: 'Total send', totalRecv: 'Total recv', - rwPerSecond: 'RW per second', + rwPerSecond: 'IO times', ioDelay: 'IO delay', time: 'Times', uptime: 'Up Time', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 752b64f9f..9cfac2eaa 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -234,8 +234,8 @@ const message = { io: '磁盘 IO', totalSend: '总发送', totalRecv: '总接收', - rwPerSecond: '每秒读写', - ioDelay: 'IO 延迟', + rwPerSecond: '读写次数', + ioDelay: '读写延迟', time: '次', uptime: '启动时间', runningTime: '运行时间', diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 0ec1a9caa..35881ab88 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -104,7 +104,7 @@ {{ $t('home.rwPerSecond') }}: {{ currentChartInfo.ioCount }} {{ $t('home.time') }} - {{ $t('home.rwPerSecond') }}: {{ currentInfo.ioTime }} ms + {{ $t('home.ioDelay') }}: {{ currentInfo.ioTime }} ms