Skip to content

Commit

Permalink
fixed merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
quanbisen committed Aug 25, 2023
2 parents 510c6fe + 5e5c0f8 commit f854531
Show file tree
Hide file tree
Showing 46 changed files with 1,102 additions and 577 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

# https://github.com/actions/example-services/tree/master/.github/workflows
services:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:

- name: Install Dependencies
run: |
sudo apt-get update && sudo apt-get install libsasl2-dev libldap2-dev libssl-dev unixodbc unixodbc-dev
sudo apt-get update && sudo apt-get install libsasl2-dev libkrb5-dev libldap2-dev libssl-dev unixodbc unixodbc-dev
python -m pip install --upgrade pip
pip install codecov coverage flake8 -r requirements.txt
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@
功能清单
====

| 数据库 | 查询 | 审核 | 执行 | 备份 | 数据字典 | 慢日志 | 会话管理 | 账号管理 | 参数管理 | 数据归档 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| MySQL |||||||||||
| MsSQL || × || × || × | × | × | × | × |
| Redis || × || × | × | × | × | × | × | × |
| PgSQL || × || × | × | × | × | × | × | × |
| Oracle |||||| × || × | × | × |
| MongoDB |||| × | × | × ||| × | × |
| Phoenix || × || × | × | × | × | × | × | × |
| ODPS || × | × | × | × | × | × | × | × | × |
| 数据库 | 查询 | 审核 | 执行 | 备份 | 数据字典 | 慢日志 | 会话管理 | 账号管理 | 参数管理 | 数据归档 |
|------------| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| MySQL |||||||||||
| MsSQL || × || × || × | × | × | × | × |
| Redis || × || × | × | × | × | × | × | × |
| PgSQL || × || × | × | × | × | × | × | × |
| Oracle |||||| × || × | × | × |
| MongoDB |||| × | × | × ||| × | × |
| Phoenix || × || × | × | × | × | × | × | × |
| ODPS || × | × | × | × | × | × | × | × | × |
| ClickHouse |||| × | × | × | × | × | × | × |
| Cassandra || × || × | × | × | × | × | × | × |



Expand Down
2 changes: 1 addition & 1 deletion archery/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = (1, 9, 1)
version = (1, 10, 0)
display_version = ".".join(str(i) for i in version)
34 changes: 32 additions & 2 deletions archery/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
environ.Env.read_env(os.path.join(BASE_DIR, ".env"))
env = environ.Env(
DEBUG=(bool, False),
ALLOWED_HOSTS=(List[str], ["*"]),
ALLOWED_HOSTS=(list, ["*"]),
SECRET_KEY=(str, "hfusaf2m4ot#7)fkw#di2bu6(cv0@opwmafx5n#6=3d%x^hpl6"),
DATABASE_URL=(str, "mysql://root:@127.0.0.1:3306/archery"),
CACHE_URL=(str, "redis://127.0.0.1:6379/0"),
Expand All @@ -38,6 +38,22 @@
Q_CLUISTER_SYNC=(bool, False), # qcluster 同步模式, debug 时可以调整为 True
# CSRF_TRUSTED_ORIGINS=subdomain.example.com,subdomain.example2.com subdomain.example.com
CSRF_TRUSTED_ORIGINS=(list, []),
ENABLED_ENGINES=(
list,
[
"mysql",
"clickhouse",
"goinception",
"mssql",
"redis",
"pgsql",
"oracle",
"mongo",
"phoenix",
"odps",
"cassandra",
],
),
)

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

AVAILABLE_ENGINES = {
"mysql": {"path": "sql.engines.mysql:MysqlEngine"},
"cassandra": {"path": "sql.engines.cassandra:CassandraEngine"},
"clickhouse": {"path": "sql.engines.clickhouse:ClickHouseEngine"},
"goinception": {"path": "sql.engines.goinception:GoInceptionEngine"},
"mssql": {"path": "sql.engines.mssql:MssqlEngine"},
"redis": {"path": "sql.engines.redis:RedisEngine"},
"pgsql": {"path": "sql.engines.pgsql:PgSQLEngine"},
"oracle": {"path": "sql.engines.oracle:OracleEngine"},
"mongo": {"path": "sql.engines.mongo:MongoEngine"},
"phoenix": {"path": "sql.engines.phoenix:PhoenixEngine"},
"odps": {"path": "sql.engines.odps:ODPSEngine"},
}
ENABLED_ENGINES = env("ENABLED_ENGINES")

# Application definition
INSTALLED_APPS = (
"django.contrib.admin",
Expand Down Expand Up @@ -245,7 +276,6 @@
ENABLE_OIDC = env("ENABLE_OIDC", False)
if ENABLE_OIDC:
INSTALLED_APPS += ("mozilla_django_oidc",)
MIDDLEWARE += ("mozilla_django_oidc.middleware.SessionRefresh",)
AUTHENTICATION_BACKENDS = (
"common.authenticate.oidc_auth.OIDCAuthenticationBackend",
"django.contrib.auth.backends.ModelBackend",
Expand Down
36 changes: 16 additions & 20 deletions common/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,30 @@
<body style="background-color:#edeff1;">
<div class="row lsb-login">
<div class="col-sm-4 mypanalbox">
<h3 class="text-center">用户登录
</h3>
<form class="login-form fade-in-effect" id="login" method="post" role="form">
{% csrf_token %}
<div class="form-group is-focused">
<label class="control-label" for="inputUsername">Username</label>
<input class="form-control ng-valid ng-dirty ng-touched" id="inputUsername" name="username" type="text"
required>
</div>
<div class="form-group is-focused">
<label class="control-label" for="inputPassword">Password</label>
<input class="form-control ng-valid ng-dirty ng-touched" id="inputPassword" name="password"
type="password" required>
</div>
<div class="form-group">
<button class="btn btn-primary btn-block" id="btnLogin" type="button"><i class="fa-lock"></i>登录</button>
</div>
{% if sign_up_enabled %}
<div class="form-group">
<a href="#" data-toggle="modal" data-target="#sign-up">注册用户</a>
</div>
{% endif %}
{% if dingding_enabled %}
<div class="form-group">
<a href="/dingding/authenticate/">以钉钉登录</a>
<a class="btn btn-primary btn-block" role="button" href="/dingding/authenticate/">以钉钉登录</a>
</div>
{% elif oidc_enabled %}
<div class="form-group">
<a href="/oidc/authenticate/">以OIDC登录</a>
<a class="btn btn-primary btn-block" role="button" href="/oidc/authenticate/">以OIDC登录</a>
</div>
{% endif %}
{% if dingding_enabled or oidc_enabled %}
<a data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
显示传统登录
</a>
<div class="collapse" id="collapseExample">
<div>
{% include 'legacy_login_form.html' %}
</div>
</div>
{% else %}
{% include 'legacy_login_form.html' %}
{% endif %}
</form>
</div>
Expand Down
1 change: 1 addition & 0 deletions downloads/dictionary/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
Empty file added downloads/dictionary/.gitkeep
Empty file.
18 changes: 0 additions & 18 deletions downloads/dictionary/test_instance_test_archery.html

This file was deleted.

15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
Django==4.1.9
mysqlclient==2.0.3
Django==4.1.10
mysqlclient==2.*
requests==2.31.0
simplejson==3.17.2
mybatis_mapper2sql==0.1.9
django-auth-ldap==4.1.0
python-dateutil==2.8.1
pymongo==3.11.0
psycopg2-binary==2.8.6
psycopg2-binary==2.*
pymysql==0.9.3
mysql-replication==0.22
django-q==1.3.9
django-redis==5.2.0
redis==3.5.3
pyodbc==4.0.30
pyodbc==4.*
gunicorn==20.0.4
pyecharts==1.9.1
aliyun-python-sdk-rds==2.1.1
cx-Oracle==7.3.0
supervisor==4.1.0
phoenixdb==0.7
phoenixdb==1.2.1
django-mirage-field==1.4.0
schema-sync==0.9.7
parsedatetime==2.4
sshtunnel==0.1.5
pycryptodome==3.10.1
pyodps==0.*
pandas==1.5.*
clickhouse-driver==0.2.3
clickhouse-driver==0.*
djangorestframework==3.13.1
djangorestframework-simplejwt==5.2.0
django-filter==21.1
Expand All @@ -38,4 +38,5 @@ django-environ==0.8.1
alibabacloud_dysmsapi20170525==2.0.9
tencentcloud-sdk-python==3.0.656
mozilla-django-oidc==3.0.0
django-auth-dingding==0.0.3
django-auth-dingding==0.0.3
cassandra-driver
Loading

0 comments on commit f854531

Please sign in to comment.