Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mouday committed Mar 25, 2023
1 parent 027ea25 commit 9b447b1
Show file tree
Hide file tree
Showing 27 changed files with 214 additions and 156 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@

## 安装

如果需要检测域名有效期,需要安装依赖 `whois`

Linux
```bash
yum install -y whois
```

### 方式一:pip安装

运行环境:
Expand Down Expand Up @@ -92,7 +85,7 @@ make pro
# 启动开发服务
make dev
```

## 项目简介

- https://gitee.com/mouday/domain-admin
Expand Down Expand Up @@ -318,6 +311,10 @@ JSON.stringify([...document.querySelectorAll('a')].map(a=>a.href))
## 更新日志
- 1.1.5
- 移除whois依赖,使用socket方式替代
- 前端域名列表增加字段排序
- 1.1.4
- 修复Linux二级域名报错问题
Expand Down
24 changes: 19 additions & 5 deletions domain_admin/api/domain_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def get_domain_list():
keyword = request.json.get('keyword')
group_id = request.json.get('group_id')

order_prop = request.json.get('order_prop', 'expire_days')
order_type = request.json.get('order_type', 'ascending')

query = DomainModel.select().where(
DomainModel.user_id == current_user_id
)
Expand All @@ -100,11 +103,22 @@ def get_domain_list():
if keyword:
query = query.where(DomainModel.domain.contains(keyword))

lst = query.order_by(
DomainModel.expire_days.asc(),
DomainModel.domain_expire_days.asc(),
DomainModel.id.desc(),
).paginate(page, size)
ordering = []
if order_prop == 'expire_days':
if order_type == 'descending':
ordering.append(DomainModel.expire_days.desc())
else:
ordering.append(DomainModel.expire_days.asc())

elif order_prop == 'domain_expire_days':
if order_type == 'descending':
ordering.append(DomainModel.domain_expire_days.desc())
else:
ordering.append(DomainModel.domain_expire_days.asc())

ordering.append(DomainModel.id.desc())

lst = query.order_by(*ordering).paginate(page, size)

total = query.count()

Expand Down
2 changes: 1 addition & 1 deletion domain_admin/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
content="no-referrer"
/>
<title>Domain Admin-域名证书SSL监测系统</title>
<script type="module" crossorigin src="/js/index.ab9ad1e8.js"></script>
<script type="module" crossorigin src="/js/index.a3a2d706.js"></script>
<link rel="modulepreload" crossorigin href="/js/vendor-vue.6a3d94bb.js">
<link rel="modulepreload" crossorigin href="/js/element-icon.ce1f4739.js">
<link rel="modulepreload" crossorigin href="/js/element-plus.ff3f2c9d.js">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion domain_admin/public/js/ConnectStatus.accaf735.js

This file was deleted.

1 change: 0 additions & 1 deletion domain_admin/public/js/index.1050e661.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9b447b1

Please sign in to comment.