Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
18fbfb44
Commit
18fbfb44
authored
Dec 12, 2017
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Feature] 修改url pattern 精确匹配uuid
parent
cb570026
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
65 deletions
+66
-65
api_urls.py
apps/assets/urls/api_urls.py
+11
-11
views_urls.py
apps/assets/urls/views_urls.py
+18
-18
view_urls.py
apps/ops/urls/view_urls.py
+5
-4
api_urls.py
apps/perms/urls/api_urls.py
+7
-7
views_urls.py
apps/perms/urls/views_urls.py
+5
-5
views_urls.py
apps/terminal/urls/views_urls.py
+5
-5
api_urls.py
apps/users/urls/api_urls.py
+5
-5
views_urls.py
apps/users/urls/views_urls.py
+10
-10
No files found.
apps/assets/urls/api_urls.py
View file @
18fbfb44
...
@@ -15,39 +15,39 @@ router.register(r'v1/system-user', api.SystemUserViewSet, 'system-user')
...
@@ -15,39 +15,39 @@ router.register(r'v1/system-user', api.SystemUserViewSet, 'system-user')
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^v1/assets-bulk/$'
,
api
.
AssetListUpdateApi
.
as_view
(),
name
=
'asset-bulk-update'
),
url
(
r'^v1/assets-bulk/$'
,
api
.
AssetListUpdateApi
.
as_view
(),
name
=
'asset-bulk-update'
),
url
(
r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/auth-info/'
,
api
.
SystemUserAuthInfoApi
.
as_view
(),
url
(
r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/auth-info/'
,
api
.
SystemUserAuthInfoApi
.
as_view
(),
name
=
'system-user-auth-info'
),
name
=
'system-user-auth-info'
),
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
+
)/groups/$'
,
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
{36}
)/groups/$'
,
api
.
AssetUpdateGroupApi
.
as_view
(),
name
=
'asset-update-group'
),
api
.
AssetUpdateGroupApi
.
as_view
(),
name
=
'asset-update-group'
),
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
+
)/refresh/$'
,
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
{36}
)/refresh/$'
,
api
.
AssetRefreshHardwareView
.
as_view
(),
name
=
'asset-refresh'
),
api
.
AssetRefreshHardwareView
.
as_view
(),
name
=
'asset-refresh'
),
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
+
)/admin-user-test/$'
,
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
{36}
)/admin-user-test/$'
,
api
.
AssetAdminUserTestView
.
as_view
(),
name
=
'asset-admin-user-test'
),
api
.
AssetAdminUserTestView
.
as_view
(),
name
=
'asset-admin-user-test'
),
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
+
)/system-users/$'
,
url
(
r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]
{36}
)/system-users/$'
,
api
.
SystemUserUpdateApi
.
as_view
(),
name
=
'asset-update-system-users'
),
api
.
SystemUserUpdateApi
.
as_view
(),
name
=
'asset-update-system-users'
),
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
+
)/push-system-user/$'
,
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
{36}
)/push-system-user/$'
,
api
.
AssetGroupPushSystemUserView
.
as_view
(),
name
=
'asset-group-push-system-user'
),
api
.
AssetGroupPushSystemUserView
.
as_view
(),
name
=
'asset-group-push-system-user'
),
# update the system users, which add and delete the asset to the system user
# update the system users, which add and delete the asset to the system user
url
(
r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
url
(
r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
api
.
SystemUserUpdateAssetsApi
.
as_view
(),
name
=
'systemuser-update-assets'
),
api
.
SystemUserUpdateAssetsApi
.
as_view
(),
name
=
'systemuser-update-assets'
),
url
(
r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/groups/$'
,
url
(
r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/groups/$'
,
api
.
SystemUserUpdateAssetGroupApi
.
as_view
(),
name
=
'systemuser-update-assetgroups'
),
api
.
SystemUserUpdateAssetGroupApi
.
as_view
(),
name
=
'systemuser-update-assetgroups'
),
# update the asset group, which add or delete the asset to the group
# update the asset group, which add or delete the asset to the group
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
api
.
AssetGroupUpdateApi
.
as_view
(),
name
=
'asset-groups-update'
),
api
.
AssetGroupUpdateApi
.
as_view
(),
name
=
'asset-groups-update'
),
# update the asset group, and add or delete the system_user to the group
# update the asset group, and add or delete the system_user to the group
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
+
)/system-users/$'
,
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
{36}
)/system-users/$'
,
api
.
AssetGroupUpdateSystemUserApi
.
as_view
(),
name
=
'asset-groups-update-systemusers'
),
api
.
AssetGroupUpdateSystemUserApi
.
as_view
(),
name
=
'asset-groups-update-systemusers'
),
# update the Cluster, and add or delete the assets to the Cluster
# update the Cluster, and add or delete the assets to the Cluster
url
(
r'^v1/cluster/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
url
(
r'^v1/cluster/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
api
.
ClusterUpdateAssetsApi
.
as_view
(),
name
=
'cluster-update-assets'
),
api
.
ClusterUpdateAssetsApi
.
as_view
(),
name
=
'cluster-update-assets'
),
]
]
...
...
apps/assets/urls/views_urls.py
View file @
18fbfb44
...
@@ -12,8 +12,8 @@ urlpatterns = [
...
@@ -12,8 +12,8 @@ urlpatterns = [
url
(
r'^asset/export/$'
,
views
.
AssetExportView
.
as_view
(),
name
=
'asset-export'
),
url
(
r'^asset/export/$'
,
views
.
AssetExportView
.
as_view
(),
name
=
'asset-export'
),
url
(
r'^asset/import/$'
,
views
.
BulkImportAssetView
.
as_view
(),
name
=
'asset-import'
),
url
(
r'^asset/import/$'
,
views
.
BulkImportAssetView
.
as_view
(),
name
=
'asset-import'
),
url
(
r'^asset/(?P<pk>[0-9a-zA-Z\-]{36})/$'
,
views
.
AssetDetailView
.
as_view
(),
name
=
'asset-detail'
),
url
(
r'^asset/(?P<pk>[0-9a-zA-Z\-]{36})/$'
,
views
.
AssetDetailView
.
as_view
(),
name
=
'asset-detail'
),
url
(
r'^asset/(?P<pk>[0-9a-zA-Z\-]
+
)/update/$'
,
views
.
AssetUpdateView
.
as_view
(),
name
=
'asset-update'
),
url
(
r'^asset/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update/$'
,
views
.
AssetUpdateView
.
as_view
(),
name
=
'asset-update'
),
url
(
r'^asset/(?P<pk>[0-9a-zA-Z\-]
+
)/delete/$'
,
views
.
AssetDeleteView
.
as_view
(),
name
=
'asset-delete'
),
url
(
r'^asset/(?P<pk>[0-9a-zA-Z\-]
{36}
)/delete/$'
,
views
.
AssetDeleteView
.
as_view
(),
name
=
'asset-delete'
),
url
(
r'^asset-modal$'
,
views
.
AssetModalListView
.
as_view
(),
name
=
'asset-modal-list'
),
url
(
r'^asset-modal$'
,
views
.
AssetModalListView
.
as_view
(),
name
=
'asset-modal-list'
),
url
(
r'^asset/update/$'
,
views
.
AssetBulkUpdateView
.
as_view
(),
name
=
'asset-bulk-update'
),
url
(
r'^asset/update/$'
,
views
.
AssetBulkUpdateView
.
as_view
(),
name
=
'asset-bulk-update'
),
...
@@ -23,34 +23,34 @@ urlpatterns = [
...
@@ -23,34 +23,34 @@ urlpatterns = [
# Resource asset group url
# Resource asset group url
url
(
r'^asset-group/$'
,
views
.
AssetGroupListView
.
as_view
(),
name
=
'asset-group-list'
),
url
(
r'^asset-group/$'
,
views
.
AssetGroupListView
.
as_view
(),
name
=
'asset-group-list'
),
url
(
r'^asset-group/create/$'
,
views
.
AssetGroupCreateView
.
as_view
(),
name
=
'asset-group-create'
),
url
(
r'^asset-group/create/$'
,
views
.
AssetGroupCreateView
.
as_view
(),
name
=
'asset-group-create'
),
url
(
r'^asset-group/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
AssetGroupDetailView
.
as_view
(),
name
=
'asset-group-detail'
),
url
(
r'^asset-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
AssetGroupDetailView
.
as_view
(),
name
=
'asset-group-detail'
),
url
(
r'^asset-group/(?P<pk>[0-9a-zA-Z\-]
+
)/update/$'
,
views
.
AssetGroupUpdateView
.
as_view
(),
name
=
'asset-group-update'
),
url
(
r'^asset-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update/$'
,
views
.
AssetGroupUpdateView
.
as_view
(),
name
=
'asset-group-update'
),
url
(
r'^asset-group/(?P<pk>[0-9a-zA-Z\-]
+
)/delete/$'
,
views
.
AssetGroupDeleteView
.
as_view
(),
name
=
'asset-group-delete'
),
url
(
r'^asset-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/delete/$'
,
views
.
AssetGroupDeleteView
.
as_view
(),
name
=
'asset-group-delete'
),
# Resource cluster url
# Resource cluster url
url
(
r'^cluster/$'
,
views
.
ClusterListView
.
as_view
(),
name
=
'cluster-list'
),
url
(
r'^cluster/$'
,
views
.
ClusterListView
.
as_view
(),
name
=
'cluster-list'
),
url
(
r'^cluster/create/$'
,
views
.
ClusterCreateView
.
as_view
(),
name
=
'cluster-create'
),
url
(
r'^cluster/create/$'
,
views
.
ClusterCreateView
.
as_view
(),
name
=
'cluster-create'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
ClusterDetailView
.
as_view
(),
name
=
'cluster-detail'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
ClusterDetailView
.
as_view
(),
name
=
'cluster-detail'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
+
)/update/'
,
views
.
ClusterUpdateView
.
as_view
(),
name
=
'cluster-update'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update/'
,
views
.
ClusterUpdateView
.
as_view
(),
name
=
'cluster-update'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
+
)/delete/$'
,
views
.
ClusterDeleteView
.
as_view
(),
name
=
'cluster-delete'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
{36}
)/delete/$'
,
views
.
ClusterDeleteView
.
as_view
(),
name
=
'cluster-delete'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
views
.
ClusterAssetsView
.
as_view
(),
name
=
'cluster-assets'
),
url
(
r'^cluster/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
views
.
ClusterAssetsView
.
as_view
(),
name
=
'cluster-assets'
),
# Resource admin user url
# Resource admin user url
url
(
r'^admin-user/$'
,
views
.
AdminUserListView
.
as_view
(),
name
=
'admin-user-list'
),
url
(
r'^admin-user/$'
,
views
.
AdminUserListView
.
as_view
(),
name
=
'admin-user-list'
),
url
(
r'^admin-user/create/$'
,
views
.
AdminUserCreateView
.
as_view
(),
name
=
'admin-user-create'
),
url
(
r'^admin-user/create/$'
,
views
.
AdminUserCreateView
.
as_view
(),
name
=
'admin-user-create'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
AdminUserDetailView
.
as_view
(),
name
=
'admin-user-detail'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
AdminUserDetailView
.
as_view
(),
name
=
'admin-user-detail'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
+
)/update/$'
,
views
.
AdminUserUpdateView
.
as_view
(),
name
=
'admin-user-update'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update/$'
,
views
.
AdminUserUpdateView
.
as_view
(),
name
=
'admin-user-update'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
+
)/delete/$'
,
views
.
AdminUserDeleteView
.
as_view
(),
name
=
'admin-user-delete'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/delete/$'
,
views
.
AdminUserDeleteView
.
as_view
(),
name
=
'admin-user-delete'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
views
.
AdminUserAssetsView
.
as_view
(),
name
=
'admin-user-assets'
),
url
(
r'^admin-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
views
.
AdminUserAssetsView
.
as_view
(),
name
=
'admin-user-assets'
),
# Resource system user url
# Resource system user url
url
(
r'^system-user/$'
,
views
.
SystemUserListView
.
as_view
(),
name
=
'system-user-list'
),
url
(
r'^system-user/$'
,
views
.
SystemUserListView
.
as_view
(),
name
=
'system-user-list'
),
url
(
r'^system-user/create/$'
,
views
.
SystemUserCreateView
.
as_view
(),
name
=
'system-user-create'
),
url
(
r'^system-user/create/$'
,
views
.
SystemUserCreateView
.
as_view
(),
name
=
'system-user-create'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
SystemUserDetailView
.
as_view
(),
name
=
'system-user-detail'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
SystemUserDetailView
.
as_view
(),
name
=
'system-user-detail'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/update/$'
,
views
.
SystemUserUpdateView
.
as_view
(),
name
=
'system-user-update'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update/$'
,
views
.
SystemUserUpdateView
.
as_view
(),
name
=
'system-user-update'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/delete/$'
,
views
.
SystemUserDeleteView
.
as_view
(),
name
=
'system-user-delete'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/delete/$'
,
views
.
SystemUserDeleteView
.
as_view
(),
name
=
'system-user-delete'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/asset/$'
,
views
.
SystemUserAssetView
.
as_view
(),
name
=
'system-user-asset'
),
url
(
r'^system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset/$'
,
views
.
SystemUserAssetView
.
as_view
(),
name
=
'system-user-asset'
),
# url(r'^system-user/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-group$', views.SystemUserAssetGroupView.as_view(),
# url(r'^system-user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-group$', views.SystemUserAssetGroupView.as_view(),
# name='system-user-asset-group'),
# name='system-user-asset-group'),
]
]
...
...
apps/ops/urls/view_urls.py
View file @
18fbfb44
...
@@ -12,8 +12,8 @@ app_name = "ops"
...
@@ -12,8 +12,8 @@ app_name = "ops"
urlpatterns
=
[
urlpatterns
=
[
# TResource Task url
# TResource Task url
url
(
r'^task/$'
,
views
.
TaskListView
.
as_view
(),
name
=
'task-list'
),
url
(
r'^task/$'
,
views
.
TaskListView
.
as_view
(),
name
=
'task-list'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
TaskDetailView
.
as_view
(),
name
=
'task-detail'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
TaskDetailView
.
as_view
(),
name
=
'task-detail'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
+
)/adhoc/$'
,
views
.
TaskAdhocView
.
as_view
(),
name
=
'task-adhoc'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
{36}
)/adhoc/$'
,
views
.
TaskAdhocView
.
as_view
(),
name
=
'task-adhoc'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
+
)/history/$'
,
views
.
TaskHistoryView
.
as_view
(),
name
=
'task-history'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
{36}
)/history/$'
,
views
.
TaskHistoryView
.
as_view
(),
name
=
'task-history'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
+
)/run/$'
,
views
.
TaskRunView
.
as_view
(),
name
=
'task-run'
),
url
(
r'^task/(?P<pk>[0-9a-zA-Z\-]
{36}
)/run/$'
,
views
.
TaskRunView
.
as_view
(),
name
=
'task-run'
),
]
]
\ No newline at end of file
apps/perms/urls/api_urls.py
View file @
18fbfb44
...
@@ -16,24 +16,24 @@ urlpatterns = [
...
@@ -16,24 +16,24 @@ urlpatterns = [
url
(
r'^v1/user/my/assets/$'
,
api
.
MyGrantedAssetsApi
.
as_view
(),
name
=
'my-assets'
),
url
(
r'^v1/user/my/assets/$'
,
api
.
MyGrantedAssetsApi
.
as_view
(),
name
=
'my-assets'
),
url
(
r'^v1/user/my/asset-groups/$'
,
api
.
MyGrantedAssetGroupsApi
.
as_view
(),
name
=
'my-asset-groups'
),
url
(
r'^v1/user/my/asset-groups/$'
,
api
.
MyGrantedAssetGroupsApi
.
as_view
(),
name
=
'my-asset-groups'
),
url
(
r'^v1/user/my/asset-groups-assets/$'
,
api
.
MyGrantedAssetGroupsWithAssetsApi
.
as_view
(),
name
=
'my-asset-group-assets'
),
url
(
r'^v1/user/my/asset-groups-assets/$'
,
api
.
MyGrantedAssetGroupsWithAssetsApi
.
as_view
(),
name
=
'my-asset-group-assets'
),
url
(
r'^v1/user/my/asset-group/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
api
.
MyAssetGroupOfAssetsApi
.
as_view
(),
name
=
'my-asset-group-of-assets'
),
url
(
r'^v1/user/my/asset-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
api
.
MyAssetGroupOfAssetsApi
.
as_view
(),
name
=
'my-asset-group-of-assets'
),
# 查询某个用户授权的资产和资产组
# 查询某个用户授权的资产和资产组
url
(
r'^v1/user/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
url
(
r'^v1/user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
api
.
UserGrantedAssetsApi
.
as_view
(),
api
.
UserGrantedAssetsApi
.
as_view
(),
name
=
'user-assets'
),
name
=
'user-assets'
),
url
(
r'^v1/user/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-groups/$'
,
url
(
r'^v1/user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-groups/$'
,
api
.
UserGrantedAssetGroupsApi
.
as_view
(),
api
.
UserGrantedAssetGroupsApi
.
as_view
(),
name
=
'user-asset-groups'
),
name
=
'user-asset-groups'
),
url
(
r'^v1/user/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-groups-assets/$'
,
url
(
r'^v1/user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-groups-assets/$'
,
api
.
UserGrantedAssetGroupsWithAssetsApi
.
as_view
(),
api
.
UserGrantedAssetGroupsWithAssetsApi
.
as_view
(),
name
=
'user-asset-groups'
),
name
=
'user-asset-groups'
),
# 查询某个用户组授权的资产和资产组
# 查询某个用户组授权的资产和资产组
url
(
r'^v1/user-group/(?P<pk>[0-9a-zA-Z\-]
+
)/assets/$'
,
url
(
r'^v1/user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets/$'
,
api
.
UserGroupGrantedAssetsApi
.
as_view
(),
api
.
UserGroupGrantedAssetsApi
.
as_view
(),
name
=
'user-group-assets'
),
name
=
'user-group-assets'
),
url
(
r'^v1/user-group/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-groups/$'
,
url
(
r'^v1/user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-groups/$'
,
api
.
UserGroupGrantedAssetGroupsApi
.
as_view
(),
api
.
UserGroupGrantedAssetGroupsApi
.
as_view
(),
name
=
'user-group-asset-groups'
),
name
=
'user-group-asset-groups'
),
...
@@ -51,7 +51,7 @@ urlpatterns = [
...
@@ -51,7 +51,7 @@ urlpatterns = [
name
=
'validate-user-asset-permission'
),
name
=
'validate-user-asset-permission'
),
# 删除asset permission中的某个系统用户
# 删除asset permission中的某个系统用户
url
(
r'^v1/asset-permissions/(?P<pk>[0-9a-zA-Z\-]
+
)/system-user/remove/$'
,
url
(
r'^v1/asset-permissions/(?P<pk>[0-9a-zA-Z\-]
{36}
)/system-user/remove/$'
,
api
.
RemoveSystemUserAssetPermission
.
as_view
(),
api
.
RemoveSystemUserAssetPermission
.
as_view
(),
name
=
'remove-system-user-asset-permission'
),
name
=
'remove-system-user-asset-permission'
),
]
]
...
...
apps/perms/urls/views_urls.py
View file @
18fbfb44
...
@@ -8,11 +8,11 @@ app_name = 'perms'
...
@@ -8,11 +8,11 @@ app_name = 'perms'
urlpatterns
=
[
urlpatterns
=
[
url
(
r'^asset-permission$'
,
views
.
AssetPermissionListView
.
as_view
(),
name
=
'asset-permission-list'
),
url
(
r'^asset-permission$'
,
views
.
AssetPermissionListView
.
as_view
(),
name
=
'asset-permission-list'
),
url
(
r'^asset-permission/create$'
,
views
.
AssetPermissionCreateView
.
as_view
(),
name
=
'asset-permission-create'
),
url
(
r'^asset-permission/create$'
,
views
.
AssetPermissionCreateView
.
as_view
(),
name
=
'asset-permission-create'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
+
)/update$'
,
views
.
AssetPermissionUpdateView
.
as_view
(),
name
=
'asset-permission-update'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update$'
,
views
.
AssetPermissionUpdateView
.
as_view
(),
name
=
'asset-permission-update'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
+
)$'
,
views
.
AssetPermissionDetailView
.
as_view
(),
name
=
'asset-permission-detail'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
{36}
)$'
,
views
.
AssetPermissionDetailView
.
as_view
(),
name
=
'asset-permission-detail'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
+
)/delete$'
,
views
.
AssetPermissionDeleteView
.
as_view
(),
name
=
'asset-permission-delete'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
{36}
)/delete$'
,
views
.
AssetPermissionDeleteView
.
as_view
(),
name
=
'asset-permission-delete'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
+
)/user$'
,
views
.
AssetPermissionUserView
.
as_view
(),
name
=
'asset-permission-user-list'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
{36}
)/user$'
,
views
.
AssetPermissionUserView
.
as_view
(),
name
=
'asset-permission-user-list'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
+
)/asset$'
,
views
.
AssetPermissionAssetView
.
as_view
(),
name
=
'asset-permission-asset-list'
),
url
(
r'^asset-permission/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset$'
,
views
.
AssetPermissionAssetView
.
as_view
(),
name
=
'asset-permission-asset-list'
),
]
]
apps/terminal/urls/views_urls.py
View file @
18fbfb44
...
@@ -11,15 +11,15 @@ app_name = 'terminal'
...
@@ -11,15 +11,15 @@ app_name = 'terminal'
urlpatterns
=
[
urlpatterns
=
[
# Terminal view
# Terminal view
url
(
r'^terminal/$'
,
views
.
TerminalListView
.
as_view
(),
name
=
'terminal-list'
),
url
(
r'^terminal/$'
,
views
.
TerminalListView
.
as_view
(),
name
=
'terminal-list'
),
url
(
r'^terminal/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
TerminalDetailView
.
as_view
(),
name
=
'terminal-detail'
),
url
(
r'^terminal/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
TerminalDetailView
.
as_view
(),
name
=
'terminal-detail'
),
url
(
r'^terminal/(?P<pk>[0-9a-zA-Z\-]
+
)/connect/$'
,
views
.
TerminalConnectView
.
as_view
(),
name
=
'terminal-connect'
),
url
(
r'^terminal/(?P<pk>[0-9a-zA-Z\-]
{36}
)/connect/$'
,
views
.
TerminalConnectView
.
as_view
(),
name
=
'terminal-connect'
),
url
(
r'^terminal/(?P<pk>[0-9a-zA-Z\-]
+
)/update/$'
,
views
.
TerminalUpdateView
.
as_view
(),
name
=
'terminal-update'
),
url
(
r'^terminal/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update/$'
,
views
.
TerminalUpdateView
.
as_view
(),
name
=
'terminal-update'
),
url
(
r'^(?P<pk>[0-9a-zA-Z\-]
+
)/accept/$'
,
views
.
TerminalAcceptView
.
as_view
(),
name
=
'terminal-accept'
),
url
(
r'^(?P<pk>[0-9a-zA-Z\-]
{36}
)/accept/$'
,
views
.
TerminalAcceptView
.
as_view
(),
name
=
'terminal-accept'
),
# Session view
# Session view
url
(
r'^session-online/$'
,
views
.
SessionOnlineListView
.
as_view
(),
name
=
'session-online-list'
),
url
(
r'^session-online/$'
,
views
.
SessionOnlineListView
.
as_view
(),
name
=
'session-online-list'
),
url
(
r'^session-offline/$'
,
views
.
SessionOfflineListView
.
as_view
(),
name
=
'session-offline-list'
),
url
(
r'^session-offline/$'
,
views
.
SessionOfflineListView
.
as_view
(),
name
=
'session-offline-list'
),
url
(
r'^session/(?P<pk>[0-9a-zA-Z\-]
+
)/$'
,
views
.
SessionDetailView
.
as_view
(),
name
=
'session-detail'
),
url
(
r'^session/(?P<pk>[0-9a-zA-Z\-]
{36}
)/$'
,
views
.
SessionDetailView
.
as_view
(),
name
=
'session-detail'
),
# Command view
# Command view
url
(
r'^command/$'
,
views
.
CommandListView
.
as_view
(),
name
=
'command-list'
),
url
(
r'^command/$'
,
views
.
CommandListView
.
as_view
(),
name
=
'command-list'
),
...
...
apps/users/urls/api_urls.py
View file @
18fbfb44
...
@@ -19,15 +19,15 @@ urlpatterns = [
...
@@ -19,15 +19,15 @@ urlpatterns = [
url
(
r'^v1/token/$'
,
api
.
UserToken
.
as_view
(),
name
=
'user-token'
),
url
(
r'^v1/token/$'
,
api
.
UserToken
.
as_view
(),
name
=
'user-token'
),
url
(
r'^v1/profile/$'
,
api
.
UserProfile
.
as_view
(),
name
=
'user-profile'
),
url
(
r'^v1/profile/$'
,
api
.
UserProfile
.
as_view
(),
name
=
'user-profile'
),
url
(
r'^v1/auth/$'
,
api
.
UserAuthApi
.
as_view
(),
name
=
'user-auth'
),
url
(
r'^v1/auth/$'
,
api
.
UserAuthApi
.
as_view
(),
name
=
'user-auth'
),
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
+
)/password/reset/$'
,
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
{36}
)/password/reset/$'
,
api
.
UserResetPasswordApi
.
as_view
(),
name
=
'user-reset-password'
),
api
.
UserResetPasswordApi
.
as_view
(),
name
=
'user-reset-password'
),
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
+
)/pubkey/reset/$'
,
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
{36}
)/pubkey/reset/$'
,
api
.
UserResetPKApi
.
as_view
(),
name
=
'user-public-key-reset'
),
api
.
UserResetPKApi
.
as_view
(),
name
=
'user-public-key-reset'
),
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
+
)/pubkey/update/$'
,
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
{36}
)/pubkey/update/$'
,
api
.
UserUpdatePKApi
.
as_view
(),
name
=
'user-public-key-update'
),
api
.
UserUpdatePKApi
.
as_view
(),
name
=
'user-public-key-update'
),
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
+
)/groups/$'
,
url
(
r'^v1/users/(?P<pk>[0-9a-zA-Z\-]
{36}
)/groups/$'
,
api
.
UserUpdateGroupApi
.
as_view
(),
name
=
'user-update-group'
),
api
.
UserUpdateGroupApi
.
as_view
(),
name
=
'user-update-group'
),
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
+
)/users/$'
,
url
(
r'^v1/groups/(?P<pk>[0-9a-zA-Z\-]
{36}
)/users/$'
,
api
.
UserGroupUpdateUserApi
.
as_view
(),
name
=
'user-group-update-user'
),
api
.
UserGroupUpdateUserApi
.
as_view
(),
name
=
'user-group-update-user'
),
]
]
...
...
apps/users/urls/views_urls.py
View file @
18fbfb44
...
@@ -29,21 +29,21 @@ urlpatterns = [
...
@@ -29,21 +29,21 @@ urlpatterns = [
url
(
r'^user/create$'
,
views
.
UserCreateView
.
as_view
(),
name
=
'user-create'
),
url
(
r'^user/create$'
,
views
.
UserCreateView
.
as_view
(),
name
=
'user-create'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]{36})/update$'
,
views
.
UserUpdateView
.
as_view
(),
name
=
'user-update'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]{36})/update$'
,
views
.
UserUpdateView
.
as_view
(),
name
=
'user-update'
),
url
(
r'^user/update$'
,
views
.
UserBulkUpdateView
.
as_view
(),
name
=
'user-bulk-update'
),
url
(
r'^user/update$'
,
views
.
UserBulkUpdateView
.
as_view
(),
name
=
'user-bulk-update'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
+
)$'
,
views
.
UserDetailView
.
as_view
(),
name
=
'user-detail'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
{36}
)$'
,
views
.
UserDetailView
.
as_view
(),
name
=
'user-detail'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-permission$'
,
views
.
UserAssetPermissionView
.
as_view
(),
name
=
'user-asset-permission'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-permission$'
,
views
.
UserAssetPermissionView
.
as_view
(),
name
=
'user-asset-permission'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-permission/create$'
,
views
.
UserAssetPermissionCreateView
.
as_view
(),
name
=
'user-asset-permission-create'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-permission/create$'
,
views
.
UserAssetPermissionCreateView
.
as_view
(),
name
=
'user-asset-permission-create'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
+
)/assets'
,
views
.
UserGrantedAssetView
.
as_view
(),
name
=
'user-granted-asset'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets'
,
views
.
UserGrantedAssetView
.
as_view
(),
name
=
'user-granted-asset'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
+
)/login-history'
,
views
.
UserDetailView
.
as_view
(),
name
=
'user-login-history'
),
url
(
r'^user/(?P<pk>[0-9a-zA-Z\-]
{36}
)/login-history'
,
views
.
UserDetailView
.
as_view
(),
name
=
'user-login-history'
),
# User group view
# User group view
url
(
r'^user-group$'
,
views
.
UserGroupListView
.
as_view
(),
name
=
'user-group-list'
),
url
(
r'^user-group$'
,
views
.
UserGroupListView
.
as_view
(),
name
=
'user-group-list'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
+
)$'
,
views
.
UserGroupDetailView
.
as_view
(),
name
=
'user-group-detail'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)$'
,
views
.
UserGroupDetailView
.
as_view
(),
name
=
'user-group-detail'
),
url
(
r'^user-group/create$'
,
views
.
UserGroupCreateView
.
as_view
(),
name
=
'user-group-create'
),
url
(
r'^user-group/create$'
,
views
.
UserGroupCreateView
.
as_view
(),
name
=
'user-group-create'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
+
)/update$'
,
views
.
UserGroupUpdateView
.
as_view
(),
name
=
'user-group-update'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/update$'
,
views
.
UserGroupUpdateView
.
as_view
(),
name
=
'user-group-update'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-permission$'
,
views
.
UserGroupAssetPermissionView
.
as_view
(),
name
=
'user-group-asset-permission'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-permission$'
,
views
.
UserGroupAssetPermissionView
.
as_view
(),
name
=
'user-group-asset-permission'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
+
)/asset-permission/create$'
,
views
.
UserGroupAssetPermissionCreateView
.
as_view
(),
name
=
'user-group-asset-permission-create'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/asset-permission/create$'
,
views
.
UserGroupAssetPermissionCreateView
.
as_view
(),
name
=
'user-group-asset-permission-create'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
+
)/assets'
,
views
.
UserGroupGrantedAssetView
.
as_view
(),
name
=
'user-group-granted-asset'
),
url
(
r'^user-group/(?P<pk>[0-9a-zA-Z\-]
{36}
)/assets'
,
views
.
UserGroupGrantedAssetView
.
as_view
(),
name
=
'user-group-granted-asset'
),
# Login log
# Login log
url
(
r'^login-log/$'
,
views
.
LoginLogListView
.
as_view
(),
name
=
'login-log-list'
),
url
(
r'^login-log/$'
,
views
.
LoginLogListView
.
as_view
(),
name
=
'login-log-list'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment