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

V2.5 dev #1099

Merged
merged 71 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
173552a
feat: 🎸 更新了loginview
jinji-hanbin Jul 25, 2022
8f57aec
Merge pull request #1067 from longguikeji/feature-402
hanbinloop Jul 25, 2022
877d946
feat: 🎸 更新了服务信息
jinji-hanbin Jul 25, 2022
5756744
feat: 🎸 完善整个cas文档
jinji-hanbin Jul 25, 2022
ec05e2d
Merge pull request #1068 from longguikeji/feature-402
hanbinloop Jul 25, 2022
5be174c
feat: 🎸 租户配置页面添加注销住户页面
guancyxx Jul 25, 2022
87261b3
Merge branch 'v2.5-dev' of github.com:longguikeji/arkid into v2.5-dev
guancyxx Jul 26, 2022
c64b645
fix: 🐛 添加mkdocstrings-python-legacy依赖
fanhe-lg Jul 26, 2022
70d762e
docs: ✏️ 更新前端说明文档
longgui-penglei Jul 26, 2022
b3a8101
Merge pull request #1069 from longguikeji/feature-503
longgui-penglei Jul 26, 2022
4711b9b
feat: 🎸 add arkstore app
luolu-lg Jul 26, 2022
c8c2248
Merge pull request #1070 from longguikeji/feature-arkstore-app
luolu-lg Jul 26, 2022
5dfed4d
fix: 🐛 get arkstore app detail
luolu-lg Jul 26, 2022
f6d2d77
Merge pull request #1071 from longguikeji/feature-fix-arkstore-app
luolu-lg Jul 26, 2022
1a72c71
Feature fix rent status (#1072)
luolu-lg Jul 26, 2022
6deb9b6
feat: 🎸 更新插件基类逻辑
jinji-hanbin Jul 26, 2022
b28feea
Merge pull request #1073 from longguikeji/feature-402
hanbinloop Jul 26, 2022
abce331
Merge branch 'v2.5-dev' of github.com:longguikeji/arkid into v2.5-dev
guancyxx Jul 27, 2022
c51d74f
feat: 🎸 创建租户权限给到普通用户
guancyxx Jul 27, 2022
c93e82c
feat: 🎸 文档权限
guancyxx Jul 27, 2022
67899fa
Merge pull request #1074 from longguikeji/feature-549
guancyxx Jul 27, 2022
fb77875
feat: 🎸 更新权限信息
jinji-hanbin Jul 27, 2022
a2d4050
Merge pull request #1075 from longguikeji/feature-402
hanbinloop Jul 27, 2022
0e10f7b
feat: 🎸 更新了租赁逻辑
jinji-hanbin Jul 27, 2022
0ac7205
feat: 🎸 更新冲突
jinji-hanbin Jul 27, 2022
6de9704
Merge pull request #1076 from longguikeji/feature-402
hanbinloop Jul 27, 2022
9314291
feat: 🎸 分页失败
jinji-hanbin Jul 27, 2022
859b1ca
Merge pull request #1077 from longguikeji/feature-402
hanbinloop Jul 27, 2022
620d2ad
feat: 🎸 更新了权限开放信息
jinji-hanbin Jul 27, 2022
29b5a70
Merge pull request #1078 from longguikeji/feature-402
hanbinloop Jul 27, 2022
3673c8d
fix: 🐛 修复删除应用时事件影响到其他插件
guancyxx Jul 27, 2022
2b48dc7
Merge pull request #1079 from longguikeji/feature-549
guancyxx Jul 27, 2022
f63c2df
feat: 🎸 cas逻辑代码被城管拿掉
jinji-hanbin Jul 27, 2022
ee9eac0
Merge pull request #1080 from longguikeji/feature-402
hanbinloop Jul 27, 2022
345ec47
feat: 🎸 登陆界面中文显示
guancyxx Jul 28, 2022
af0be1b
fix: 🐛 登陆界面按钮中文问题+本地存储插件获取资源接口权限设置
guancyxx Jul 28, 2022
53c2cab
feat: 🎸 静态存储权限取消
guancyxx Jul 28, 2022
03b8c0d
fix: 🐛 修复审批请求通过后的逻辑
fanhe-lg Jul 28, 2022
b72ad48
feat: 🎸 恢复arkid_store代码
guancyxx Jul 28, 2022
7c55acb
Merge pull request #1082 from longguikeji/feature-549
guancyxx Jul 28, 2022
61cefcd
feat: 🎸 更新了api描述
jinji-hanbin Jul 28, 2022
ec004e7
Merge pull request #1083 from longguikeji/feature-402
hanbinloop Jul 28, 2022
dc1e034
fix: 🐛 arkstore purchased apps (#1084)
luolu-lg Jul 28, 2022
bb2af65
fix: 🐛 arkstore error message (#1085)
luolu-lg Jul 28, 2022
57cbf38
feat: 🎸 把入口权限放在列表里
jinji-hanbin Jul 28, 2022
6723514
feat: 🎸 请求参数不同,body不同生成不同的审批请求
fanhe-lg Jul 28, 2022
74559c8
Merge pull request #1086 from longguikeji/feature-555
fanhe-lg Jul 28, 2022
572b7a5
ci: 镜像加速
notevery Jul 28, 2022
c911ec8
ci: 镜像加速args
notevery Jul 28, 2022
3896888
feat: 🎸 更新了权限分组内容
jinji-hanbin Jul 28, 2022
548c374
feat: 🎸 代码编辑错误
jinji-hanbin Jul 28, 2022
d912577
Merge pull request #1087 from longguikeji/feature-402
hanbinloop Jul 28, 2022
2b99d01
ci: 优化dockerfile
notevery Jul 28, 2022
3db9ed0
fix: 🐛 arkid_saas oidc app (#1088)
luolu-lg Jul 28, 2022
4debfe5
feat: 🎸 插件更新
jinji-hanbin Jul 29, 2022
63f6f5b
Merge pull request #1089 from longguikeji/feature-402
hanbinloop Jul 29, 2022
d7fc1d8
fix: 🐛 arkid_saas app filter (#1090)
luolu-lg Jul 29, 2022
864d49e
fix: 🐛 pip aliyun mirror (#1091)
luolu-lg Jul 29, 2022
e91718c
fix: 🐛 修复审批请求403报错提示
fanhe-lg Jul 29, 2022
4647042
Merge pull request #1092 from longguikeji/feature-555
fanhe-lg Jul 29, 2022
e48f322
fix: 🐛 审批请求未审核返回200
fanhe-lg Jul 29, 2022
a01f174
Merge pull request #1093 from longguikeji/feature-555
fanhe-lg Jul 29, 2022
1925f29
fix: 🐛 rent extension (#1094)
luolu-lg Jul 29, 2022
5608195
fix: 🐛 更新register_url的规则
welylongguikeji Jul 29, 2022
ce47e37
Merge branch 'v2.5-dev' of https://github.com/longguikeji/arkid into …
welylongguikeji Jul 29, 2022
2f8b62d
fix: 🐛 extension models app load (#1095)
luolu-lg Jul 29, 2022
bbc6c3d
fix: 🐛 install app after delete (#1096)
luolu-lg Jul 29, 2022
311bd3f
feat: 🎸 更新权限分组时会先清理以前里面的内容
jinji-hanbin Jul 29, 2022
2b398f7
feat: 🎸 更新了权限分组的问题
jinji-hanbin Jul 29, 2022
1b55d93
Merge pull request #1097 from longguikeji/feature-402
hanbinloop Jul 29, 2022
9e3cae1
fix: 🐛 extension settings (#1098)
luolu-lg Jul 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 8 additions & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
ARG BASEIMAGE=python:3.8-buster
FROM ${BASEIMAGE} as build_deps
EXPOSE 80
WORKDIR /var/arkid
ARG BASEIMAGE=registry.cn-zhangjiakou.aliyuncs.com/ark-releases/python38:latest
FROM ${BASEIMAGE}
ARG DEBIAN=http://mirrors.aliyun.com/debian
ARG DEBIANSRT=http://mirrors.aliyun.com/debian-security
ARG PIP="https://mirrors.aliyun.com/pypi/simple/"
#ARG DEBIAN=http://deb.debian.org/debian
#ARG DEBIANSRT=http://security.debian.org/debian-security
#ARG PIP="https://pypi.python.org/simple"

RUN set -eux; \
sed -i "s@http://deb.debian.org/debian@$DEBIAN@g" /etc/apt/sources.list; \
sed -i "s@http://security.debian.org/debian-security@$DEBIANSRT@g" /etc/apt/sources.list ; \
apt-get update; \
apt-get install -y --no-install-recommends \
gettext xmlsec1 supervisor \
freetds-dev freetds-bin \
python-dev python-pip \
default-libmysqlclient-dev tini gosu; \
# verify that the binary works
gosu nobody true; \
rm -rf /var/lib/apt/lists/*; \
groupadd -r arkid && useradd -r -g arkid arkid; \
setcap 'cap_net_bind_service=+ep' /usr/local/bin/python3.8

ADD requirements.txt ./
RUN sed -i "s@https://mirrors.aliyun.com/pypi/simple@$PIP@g" requirements.txt;
RUN pip install --no-cache-dir -r requirements.txt
ARG PIP=https://mirrors.aliyun.com/pypi/simple
WORKDIR /var/arkid

ADD . .
RUN chmod +x docker-entrypoint.sh
RUN sed -i "s@https://mirrors.aliyun.com/pypi/simple@$PIP@g" requirements.txt; \
cat requirements.txt; \
pip install --no-cache-dir -r requirements.txt; \
chmod +x docker-entrypoint.sh
ENTRYPOINT ["/var/arkid/docker-entrypoint.sh"]
CMD ["tini", "--", "/usr/local/bin/python3.8", "manage.py", "runserver", "0.0.0.0:80"]
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ mkdocs-material = "*"
pyjwt = "*"
django-celery-beat = "*"
django-cors-headers = "*"
mkdocstrings-python-legacy = "*"

[requires]
python_version = "3.8"
46 changes: 39 additions & 7 deletions Pipfile.lock

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

112 changes: 86 additions & 26 deletions api/v1/pages/app_manage/app_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,35 @@
name = '应用列表'


page = pages.TablePage(tag=tag, name=name)
page = pages.TabsPage(tag=tag, name=name)

edit_page = pages.FormPage(name=_("编辑应用"))
config_page = pages.FormPage(name=_("配置应用"))
openapi_page = pages.FormPage(name=_("开放API配置"))
appstore_page = pages.TabsPage(name=_("APP Store", "应用商店"))
app_list_page = pages.TablePage(name=_("APP Store", "应用商店"))
app_purchased_page = pages.TablePage(name=_("Purchased", "已购买"))
order_page = pages.FormPage(name=_('Order', '购买'))
store_page = pages.CardsPage(name=_("APP Store", "应用商店"))
app_purchased_page = pages.CardsPage(name=_("Purchased", "已安装"))
order_page = pages.StepPage(name=_('Order', '购买'))
trial_page = pages.FormPage(name=_('Trial', '试用'))
installed_page = pages.CardsPage(name='本地应用')
price_page = pages.CardsPage(name='选择价格')
copies_page = pages.FormPage(name='人天份数')
payment_page = pages.FormPage(name='支付')

pages.register_front_pages(page)
pages.register_front_pages(installed_page)
pages.register_front_pages(edit_page)
pages.register_front_pages(config_page)
pages.register_front_pages(openapi_page)
pages.register_front_pages(appstore_page)
pages.register_front_pages(app_list_page)
pages.register_front_pages(store_page)
pages.register_front_pages(app_purchased_page)
pages.register_front_pages(order_page)
pages.register_front_pages(trial_page)
pages.register_front_pages(price_page)
pages.register_front_pages(copies_page)
pages.register_front_pages(payment_page)

appstore_page.add_pages([
app_list_page,
app_purchased_page
])

router = routers.FrontRouter(
path=tag,
Expand All @@ -35,7 +42,13 @@
page=page,
)

page.create_actions(
page.add_pages([
installed_page,
store_page,
app_purchased_page
])

installed_page.create_actions(
init_action=actions.DirectAction(
path='/api/v1/tenant/{tenant_id}/apps/',
method=actions.FrontActionMethod.GET,
Expand All @@ -44,10 +57,6 @@
'create':actions.CreateAction(
path='/api/v1/tenant/{tenant_id}/apps/'
),
'appstore':actions.OpenAction(
name='应用商店',
page=appstore_page
)
},
local_actions={
"config":actions.OpenAction(
Expand Down Expand Up @@ -104,15 +113,16 @@
}
)

app_list_page.create_actions(
store_page.create_actions(
init_action=actions.DirectAction(
path='/api/v1/tenant/{tenant_id}/arkstore/apps/',
method=actions.FrontActionMethod.GET
),
local_actions={
"order": actions.OpenAction(
name='购买',
page=order_page
"order": actions.DirectAction(
name='安装到本地',
path='/api/v1/tenant/{tenant_id}/arkstore/install/{uuid}/',
method=actions.FrontActionMethod.POST
)
},
)
Expand All @@ -123,23 +133,73 @@
method=actions.FrontActionMethod.GET
),
local_actions={
"install": actions.DirectAction(
path="/api/v1/tenant/{tenant_id}/install/{uuid}/",
method=actions.FrontActionMethod.POST
"order": actions.OpenAction(
name='购买',
page=order_page
),
"trial": actions.OpenAction(
name='试用',
page=trial_page
)
},
)

order_page.create_actions(
order_page.add_pages([
price_page,
copies_page,
payment_page
])

price_page.create_actions(
init_action=actions.DirectAction(
path='/api/v1/tenant/{tenant_id}/arkstore/order/extensions/{uuid}/',
method=actions.FrontActionMethod.GET,
method=actions.FrontActionMethod.GET
),
local_actions={
'next': actions.NextAction(
name="选择价格"
),
}
)

copies_page.create_actions(
init_action=actions.DirectAction(
path="/api/v1/tenant/{tenant_id}/arkstore/order/extensions/{uuid}/set_copies/",
method=actions.FrontActionMethod.POST
),
global_actions={
'next': actions.NextAction(
name="创建订单",
path="/api/v1/tenant/{tenant_id}/arkstore/order/extensions/{uuid}/",
method=actions.FrontActionMethod.POST
),
}
)

payment_page.create_actions(
init_action=actions.DirectAction(
path="/api/v1/tenant/{tenant_id}/arkstore/order/{order_no}/payment/",
method=actions.FrontActionMethod.GET
),
global_actions={
"payed": actions.DirectAction(
name='已支付',
path='/api/v1/tenant/{tenant_id}/arkstore/order/status/extensions/{uuid}/',
'next': actions.NextAction(
name="已支付",
path="/api/v1/tenant/{tenant_id}/arkstore/purchase/order/{order_no}/payment_status/",
method=actions.FrontActionMethod.GET
),
}
)

trial_page.create_actions(
init_action=actions.DirectAction(
path='/api/v1/tenant/{tenant_id}/arkstore/trial/extensions/{uuid}/',
method=actions.FrontActionMethod.GET,
),
global_actions={
"confirm": actions.DirectAction(
name='试用',
path='/api/v1/tenant/{tenant_id}/arkstore/trial/extensions/{uuid}/',
method=actions.FrontActionMethod.POST
),
},
)
2 changes: 1 addition & 1 deletion api/v1/pages/developer_manage/api_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
router = FrontRouter(
path=tag,
name=name,
url='/api/v1/redoc'
url='/api/v1/docs/redoc/'
)
19 changes: 19 additions & 0 deletions api/v1/pages/tenant_manage/tenant_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
name = '租户配置'

page = pages.FormPage(tag = tag, name = name)
delete_tenant_page = pages.FormPage("注销租户")

pages.register_front_pages(page)
pages.register_front_pages(delete_tenant_page)

router = routers.FrontRouter(
path=tag,
Expand All @@ -23,5 +25,22 @@
"confirm": actions.ConfirmAction(
path="/api/v1/tenants/{tenant_id}/config/"
),
"logout": actions.CreateAction(
name="注销",
path="/api/v1/tenants/{tenant_id}/logout/",
method=actions.FrontActionMethod.POST,
)
}
)

delete_tenant_page.create_actions(
init_action=actions.DirectAction(
path="/api/v1/tenants/{tenant_id}/logout/",
method=actions.FrontActionMethod.POST,
),
global_actions={
"confirm": actions.ConfirmAction(
path="/api/v1/tenants/{tenant_id}/logout/"
),
}
)
8 changes: 4 additions & 4 deletions api/v1/schema/approve_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ class Config:
model_fields = ['id']

username: str = Field(title=_('Username', '用户名'))
path: str = Field(title=_('Path', '请求路径'))
request_path: str = Field(title=_('Path', '请求路径'))
method: str = Field(title=_('Method', '请求方法'))
status: str = Field(title=_('Status', '状态'))

@staticmethod
def resolve_username(obj):
return obj.user.username

@staticmethod
def resolve_path(obj):
return obj.action.path
# @staticmethod
# def resolve_path(obj):
# return obj.action.path

@staticmethod
def resolve_method(obj):
Expand Down
Loading