Skip to content

Commit f854531

Browse files
committed
fixed merge conflict
2 parents 510c6fe + 5e5c0f8 commit f854531

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1102
-577
lines changed

.github/workflows/django.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
max-parallel: 4
1919
matrix:
20-
python-version: [3.8, 3.9, "3.10"]
20+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2121

2222
# https://github.com/actions/example-services/tree/master/.github/workflows
2323
services:
@@ -70,7 +70,7 @@ jobs:
7070

7171
- name: Install Dependencies
7272
run: |
73-
sudo apt-get update && sudo apt-get install libsasl2-dev libldap2-dev libssl-dev unixodbc unixodbc-dev
73+
sudo apt-get update && sudo apt-get install libsasl2-dev libkrb5-dev libldap2-dev libssl-dev unixodbc unixodbc-dev
7474
python -m pip install --upgrade pip
7575
pip install codecov coverage flake8 -r requirements.txt
7676

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@
2222
功能清单
2323
====
2424

25-
| 数据库 | 查询 | 审核 | 执行 | 备份 | 数据字典 | 慢日志 | 会话管理 | 账号管理 | 参数管理 | 数据归档 |
26-
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
27-
| MySQL |||||||||||
28-
| MsSQL || × || × || × | × | × | × | × |
29-
| Redis || × || × | × | × | × | × | × | × |
30-
| PgSQL || × || × | × | × | × | × | × | × |
31-
| Oracle |||||| × || × | × | × |
32-
| MongoDB |||| × | × | × ||| × | × |
33-
| Phoenix || × || × | × | × | × | × | × | × |
34-
| ODPS || × | × | × | × | × | × | × | × | × |
25+
| 数据库 | 查询 | 审核 | 执行 | 备份 | 数据字典 | 慢日志 | 会话管理 | 账号管理 | 参数管理 | 数据归档 |
26+
|------------| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
27+
| MySQL |||||||||||
28+
| MsSQL || × || × || × | × | × | × | × |
29+
| Redis || × || × | × | × | × | × | × | × |
30+
| PgSQL || × || × | × | × | × | × | × | × |
31+
| Oracle |||||| × || × | × | × |
32+
| MongoDB |||| × | × | × ||| × | × |
33+
| Phoenix || × || × | × | × | × | × | × | × |
34+
| ODPS || × | × | × | × | × | × | × | × | × |
3535
| ClickHouse |||| × | × | × | × | × | × | × |
36+
| Cassandra || × || × | × | × | × | × | × | × |
3637

3738

3839

archery/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = (1, 9, 1)
1+
version = (1, 10, 0)
22
display_version = ".".join(str(i) for i in version)

archery/settings.py

+32-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
environ.Env.read_env(os.path.join(BASE_DIR, ".env"))
2020
env = environ.Env(
2121
DEBUG=(bool, False),
22-
ALLOWED_HOSTS=(List[str], ["*"]),
22+
ALLOWED_HOSTS=(list, ["*"]),
2323
SECRET_KEY=(str, "hfusaf2m4ot#7)fkw#di2bu6(cv0@opwmafx5n#6=3d%x^hpl6"),
2424
DATABASE_URL=(str, "mysql://root:@127.0.0.1:3306/archery"),
2525
CACHE_URL=(str, "redis://127.0.0.1:6379/0"),
@@ -38,6 +38,22 @@
3838
Q_CLUISTER_SYNC=(bool, False), # qcluster 同步模式, debug 时可以调整为 True
3939
# CSRF_TRUSTED_ORIGINS=subdomain.example.com,subdomain.example2.com subdomain.example.com
4040
CSRF_TRUSTED_ORIGINS=(list, []),
41+
ENABLED_ENGINES=(
42+
list,
43+
[
44+
"mysql",
45+
"clickhouse",
46+
"goinception",
47+
"mssql",
48+
"redis",
49+
"pgsql",
50+
"oracle",
51+
"mongo",
52+
"phoenix",
53+
"odps",
54+
"cassandra",
55+
],
56+
),
4157
)
4258

4359
# SECURITY WARNING: keep the secret key used in production secret!
@@ -57,6 +73,21 @@
5773
# 请求限制
5874
DATA_UPLOAD_MAX_MEMORY_SIZE = 15728640
5975

76+
AVAILABLE_ENGINES = {
77+
"mysql": {"path": "sql.engines.mysql:MysqlEngine"},
78+
"cassandra": {"path": "sql.engines.cassandra:CassandraEngine"},
79+
"clickhouse": {"path": "sql.engines.clickhouse:ClickHouseEngine"},
80+
"goinception": {"path": "sql.engines.goinception:GoInceptionEngine"},
81+
"mssql": {"path": "sql.engines.mssql:MssqlEngine"},
82+
"redis": {"path": "sql.engines.redis:RedisEngine"},
83+
"pgsql": {"path": "sql.engines.pgsql:PgSQLEngine"},
84+
"oracle": {"path": "sql.engines.oracle:OracleEngine"},
85+
"mongo": {"path": "sql.engines.mongo:MongoEngine"},
86+
"phoenix": {"path": "sql.engines.phoenix:PhoenixEngine"},
87+
"odps": {"path": "sql.engines.odps:ODPSEngine"},
88+
}
89+
ENABLED_ENGINES = env("ENABLED_ENGINES")
90+
6091
# Application definition
6192
INSTALLED_APPS = (
6293
"django.contrib.admin",
@@ -245,7 +276,6 @@
245276
ENABLE_OIDC = env("ENABLE_OIDC", False)
246277
if ENABLE_OIDC:
247278
INSTALLED_APPS += ("mozilla_django_oidc",)
248-
MIDDLEWARE += ("mozilla_django_oidc.middleware.SessionRefresh",)
249279
AUTHENTICATION_BACKENDS = (
250280
"common.authenticate.oidc_auth.OIDCAuthenticationBackend",
251281
"django.contrib.auth.backends.ModelBackend",

common/templates/login.html

+16-20
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,30 @@
1818
<body style="background-color:#edeff1;">
1919
<div class="row lsb-login">
2020
<div class="col-sm-4 mypanalbox">
21+
<h3 class="text-center">用户登录
22+
</h3>
2123
<form class="login-form fade-in-effect" id="login" method="post" role="form">
2224
{% csrf_token %}
23-
<div class="form-group is-focused">
24-
<label class="control-label" for="inputUsername">Username</label>
25-
<input class="form-control ng-valid ng-dirty ng-touched" id="inputUsername" name="username" type="text"
26-
required>
27-
</div>
28-
<div class="form-group is-focused">
29-
<label class="control-label" for="inputPassword">Password</label>
30-
<input class="form-control ng-valid ng-dirty ng-touched" id="inputPassword" name="password"
31-
type="password" required>
32-
</div>
33-
<div class="form-group">
34-
<button class="btn btn-primary btn-block" id="btnLogin" type="button"><i class="fa-lock"></i>登录</button>
35-
</div>
36-
{% if sign_up_enabled %}
37-
<div class="form-group">
38-
<a href="#" data-toggle="modal" data-target="#sign-up">注册用户</a>
39-
</div>
40-
{% endif %}
4125
{% if dingding_enabled %}
4226
<div class="form-group">
43-
<a href="/dingding/authenticate/">以钉钉登录</a>
27+
<a class="btn btn-primary btn-block" role="button" href="/dingding/authenticate/">以钉钉登录</a>
4428
</div>
4529
{% elif oidc_enabled %}
4630
<div class="form-group">
47-
<a href="/oidc/authenticate/">以OIDC登录</a>
31+
<a class="btn btn-primary btn-block" role="button" href="/oidc/authenticate/">以OIDC登录</a>
32+
</div>
33+
{% endif %}
34+
{% if dingding_enabled or oidc_enabled %}
35+
<a data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
36+
显示传统登录
37+
</a>
38+
<div class="collapse" id="collapseExample">
39+
<div>
40+
{% include 'legacy_login_form.html' %}
41+
</div>
4842
</div>
43+
{% else %}
44+
{% include 'legacy_login_form.html' %}
4945
{% endif %}
5046
</form>
5147
</div>

downloads/dictionary/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

downloads/dictionary/.gitkeep

Whitespace-only changes.

downloads/dictionary/test_instance_test_archery.html

-18
This file was deleted.

requirements.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
Django==4.1.9
2-
mysqlclient==2.0.3
1+
Django==4.1.10
2+
mysqlclient==2.*
33
requests==2.31.0
44
simplejson==3.17.2
55
mybatis_mapper2sql==0.1.9
66
django-auth-ldap==4.1.0
77
python-dateutil==2.8.1
88
pymongo==3.11.0
9-
psycopg2-binary==2.8.6
9+
psycopg2-binary==2.*
1010
pymysql==0.9.3
1111
mysql-replication==0.22
1212
django-q==1.3.9
1313
django-redis==5.2.0
1414
redis==3.5.3
15-
pyodbc==4.0.30
15+
pyodbc==4.*
1616
gunicorn==20.0.4
1717
pyecharts==1.9.1
1818
aliyun-python-sdk-rds==2.1.1
1919
cx-Oracle==7.3.0
2020
supervisor==4.1.0
21-
phoenixdb==0.7
21+
phoenixdb==1.2.1
2222
django-mirage-field==1.4.0
2323
schema-sync==0.9.7
2424
parsedatetime==2.4
2525
sshtunnel==0.1.5
2626
pycryptodome==3.10.1
2727
pyodps==0.*
2828
pandas==1.5.*
29-
clickhouse-driver==0.2.3
29+
clickhouse-driver==0.*
3030
djangorestframework==3.13.1
3131
djangorestframework-simplejwt==5.2.0
3232
django-filter==21.1
@@ -38,4 +38,5 @@ django-environ==0.8.1
3838
alibabacloud_dysmsapi20170525==2.0.9
3939
tencentcloud-sdk-python==3.0.656
4040
mozilla-django-oidc==3.0.0
41-
django-auth-dingding==0.0.3
41+
django-auth-dingding==0.0.3
42+
cassandra-driver

0 commit comments

Comments
 (0)