Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ 功能建议 ] 实例排序优化 #1290

Closed
RankRao opened this issue Dec 20, 2021 · 3 comments
Closed

[ 功能建议 ] 实例排序优化 #1290

RankRao opened this issue Dec 20, 2021 · 3 comments

Comments

@RankRao
Copy link

RankRao commented Dec 20, 2021

在【SQL查询】【慢查日志】【会话管理】等页面的选择主机列表,目前是按照id排序的,可以按照名称排序吗?这样相似名称或者相似项目的主机就会排在一起了,而不是目前的散乱分布

@nick2wang
Copy link
Collaborator

麻烦在于人为设置的实例名称可能包含数字字母和汉字,而mysql使用utf8字符集时默认对汉字的排序是无效的,django orm又不支持convert(instance_name using gbk)语法

@LeoQuote
Copy link
Collaborator

@nick2wang 前端实现可能会简单一点

nick2wang added a commit to nick2wang/Archery that referenced this issue Jan 11, 2022
实例列表排序(支持汉字排序) hhyo#1290
@nick2wang
Copy link
Collaborator

@nick2wang 前端实现可能会简单一点

找到一个可行的方法修改了下,后面如果有用到汉字排序也方便复用
https://stackoverflow.com/questions/38517743/django-how-to-make-a-query-with-order-by-convert-name-using-gbk-asc

hhyo pushed a commit that referenced this issue Jan 11, 2022
实例列表排序(支持汉字排序) #1290
@hhyo hhyo closed this as completed Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants