1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-03-17 03:04:46 +08:00

fix: 优化分组显示 (#371)

This commit is contained in:
ssongliu 2023-03-22 18:48:29 +08:00 committed by GitHub
parent a3cb8be08f
commit 66a345364f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@ func NewIGroupService() IGroupService {
} }
func (u *GroupService) List(req dto.GroupSearch) ([]dto.GroupInfo, error) { 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 { if err != nil {
return nil, constant.ErrRecordNotFound return nil, constant.ErrRecordNotFound
} }

View File

@ -20,7 +20,7 @@
<el-form ref="groupForm" v-if="row.edit" :model="row"> <el-form ref="groupForm" v-if="row.edit" :model="row">
<el-form-item prop="name" v-if="row.edit" :rules="Rules.name"> <el-form-item prop="name" v-if="row.edit" :rules="Rules.name">
<el-input v-model="row.name"></el-input> <div style="margin-top: 20px; width: 100%"><el-input v-model="row.name" /></div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
@ -145,7 +145,7 @@ const openCreate = () => {
isDefault: false, isDefault: false,
edit: true, edit: true,
}; };
data.value.push(g); data.value.unshift(g);
}; };
const deleteGroup = (index: number) => { const deleteGroup = (index: number) => {

View File

@ -229,7 +229,7 @@ const message = {
io: 'Disk IO', io: 'Disk IO',
totalSend: 'Total send', totalSend: 'Total send',
totalRecv: 'Total recv', totalRecv: 'Total recv',
rwPerSecond: 'RW per second', rwPerSecond: 'IO times',
ioDelay: 'IO delay', ioDelay: 'IO delay',
time: 'Times', time: 'Times',
uptime: 'Up Time', uptime: 'Up Time',

View File

@ -234,8 +234,8 @@ const message = {
io: '磁盘 IO', io: '磁盘 IO',
totalSend: '总发送', totalSend: '总发送',
totalRecv: '总接收', totalRecv: '总接收',
rwPerSecond: '每秒读写', rwPerSecond: '读写次数',
ioDelay: 'IO 延迟', ioDelay: '读写延迟',
time: '次', time: '次',
uptime: '启动时间', uptime: '启动时间',
runningTime: '运行时间', runningTime: '运行时间',

View File

@ -104,7 +104,7 @@
<el-tag> <el-tag>
{{ $t('home.rwPerSecond') }}: {{ currentChartInfo.ioCount }} {{ $t('home.time') }} {{ $t('home.rwPerSecond') }}: {{ currentChartInfo.ioCount }} {{ $t('home.time') }}
</el-tag> </el-tag>
<el-tag>{{ $t('home.rwPerSecond') }}: {{ currentInfo.ioTime }} ms</el-tag> <el-tag>{{ $t('home.ioDelay') }}: {{ currentInfo.ioTime }} ms</el-tag>
</div> </div>
<div v-if="chartOption === 'io'" style="margin-top: 40px"> <div v-if="chartOption === 'io'" style="margin-top: 40px">