mirror of https://github.com/jumpserver/jumpserver
Rename urls
parent
5745c8cc4a
commit
aff37092bf
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
# coding:utf-8
|
||||
from django.conf.urls import url
|
||||
from .. import api
|
||||
from rest_framework import routers
|
||||
|
||||
app_name = 'assets'
|
||||
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'v1/asset-groups', api.AssetGroupViewSet, 'asset-group')
|
||||
router.register(r'v1/assets', api.AssetViewSet, 'asset')
|
||||
router.register(r'v1/idc', api.IDCViewSet, 'idc')
|
||||
router.register(r'v1/admin-user', api.AdminUserViewSet, 'admin-user')
|
||||
router.register(r'v1/system-user', api.SystemUserViewSet, 'system-user')
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^v1/assets_bulk/$', api.AssetListUpdateApi.as_view(), name='asset-bulk-update'),
|
||||
# url(r'^v1/idc/(?P<pk>[0-9]+)/assets/$', api.IDCAssetsApi.as_view(), name='api-idc-assets'),
|
||||
url(r'^v1/system-user/auth/', api.SystemUserAuthApi.as_view(), name='system-user-auth'),
|
||||
]
|
||||
|
||||
urlpatterns += router.urls
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
# coding:utf-8
|
||||
from django.conf.urls import url, include
|
||||
import views
|
||||
import api
|
||||
from rest_framework import routers
|
||||
from django.conf.urls import url
|
||||
from .. import views
|
||||
|
||||
app_name = 'assets'
|
||||
|
||||
|
@ -58,17 +56,3 @@ urlpatterns = [
|
|||
|
||||
]
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'v1/asset-groups', api.AssetGroupViewSet, 'asset-group')
|
||||
router.register(r'v1/assets', api.AssetViewSet, 'asset')
|
||||
router.register(r'v1/idc', api.IDCViewSet, 'idc')
|
||||
router.register(r'v1/admin-user', api.AdminUserViewSet, 'admin-user')
|
||||
router.register(r'v1/system-user', api.SystemUserViewSet, 'system-user')
|
||||
|
||||
urlpatterns += [
|
||||
url(r'^v1/assets_bulk/$', api.AssetListUpdateApi.as_view(), name='asset-bulk-update'),
|
||||
# url(r'^v1/idc/(?P<pk>[0-9]+)/assets/$', api.IDCAssetsApi.as_view(), name='api-idc-assets'),
|
||||
url(r'^v1/system-user/auth/', api.SystemUserAuthApi.as_view(), name='system-user-auth'),
|
||||
]
|
||||
|
||||
urlpatterns += router.urls
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
from django.conf.urls import url
|
||||
from rest_framework import routers
|
||||
|
||||
from .. import api
|
||||
|
||||
app_name = 'audits'
|
||||
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'v1/proxy-log', api.ProxyLogViewSet, 'proxy-log')
|
||||
router.register(r'v1/command-log', api.CommandLogViewSet, 'command-log')
|
||||
|
||||
urlpatterns = router.urls
|
||||
|
|
@ -1,9 +1,5 @@
|
|||
from django.conf.urls import url
|
||||
|
||||
from rest_framework import routers
|
||||
|
||||
import api
|
||||
import views
|
||||
from .. import views
|
||||
|
||||
app_name = 'audits'
|
||||
|
||||
|
@ -15,8 +11,4 @@ urlpatterns = [
|
|||
url(r'^login-log$', views.LoginLogListView.as_view(), name='login-log-list'),
|
||||
]
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'v1/proxy-log', api.ProxyLogViewSet, 'proxy-log')
|
||||
router.register(r'v1/command-log', api.CommandLogViewSet, 'command-log')
|
||||
|
||||
urlpatterns += router.urls
|
|
@ -22,16 +22,16 @@ from django.views.generic.base import TemplateView
|
|||
urlpatterns = [
|
||||
url(r'^captcha/', include('captcha.urls')),
|
||||
url(r'^$', TemplateView.as_view(template_name='base.html'), name='index'),
|
||||
url(r'^users/', include('users.urls', namespace='users')),
|
||||
url(r'^assets/', include('assets.urls', namespace='assets')),
|
||||
url(r'^perms/', include('perms.urls', namespace='perms')),
|
||||
url(r'^audits/', include('audits.urls', namespace='audits')),
|
||||
url(r'^terminal/', include('terminal.urls', namespace='terminal')),
|
||||
url(r'^api/users/', include('users.urls', namespace='api-users')),
|
||||
url(r'^api/assets/', include('assets.urls', namespace='api-assets')),
|
||||
url(r'^api/perms/', include('perms.urls', namespace='api-perms')),
|
||||
url(r'^api/audits/', include('audits.urls', namespace='api-audits')),
|
||||
url(r'^api/terminal/', include('terminal.urls', namespace='api-terminal')),
|
||||
url(r'^users/', include('users.urls.views_urls', namespace='users')),
|
||||
url(r'^assets/', include('assets.urls.views_urls', namespace='assets')),
|
||||
url(r'^perms/', include('perms.urls.views_urls', namespace='perms')),
|
||||
url(r'^audits/', include('audits.urls.views_urls', namespace='audits')),
|
||||
url(r'^terminal/', include('terminal.urls.views_urls', namespace='terminal')),
|
||||
url(r'^api/users/', include('users.urls.api_urls', namespace='api-users')),
|
||||
url(r'^api/assets/', include('assets.urls.api_urls', namespace='api-assets')),
|
||||
url(r'^api/perms/', include('perms.urls.api_urls', namespace='api-perms')),
|
||||
url(r'^api/audits/', include('audits.urls.api_urls', namespace='api-audits')),
|
||||
url(r'^api/terminal/', include('terminal.urls.api_urls', namespace='api-terminal')),
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
# coding:utf-8
|
||||
|
||||
from django.conf.urls import url
|
||||
from rest_framework import routers
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# coding:utf-8
|
||||
|
||||
from django.conf.urls import url
|
||||
from .. import views
|
||||
|
||||
app_name = 'ops'
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -2,30 +2,14 @@
|
|||
|
||||
from django.conf.urls import url
|
||||
from rest_framework import routers
|
||||
import views
|
||||
import api
|
||||
from .. import api
|
||||
|
||||
app_name = 'perms'
|
||||
|
||||
urlpatterns = [
|
||||
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/(?P<pk>[0-9]+)/update$', views.AssetPermissionUpdateView.as_view(),
|
||||
name='asset-permission-update'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)$', views.AssetPermissionDetailView.as_view(),
|
||||
name='asset-permission-detail'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)/delete$', views.AssetPermissionDeleteView.as_view(),
|
||||
name='asset-permission-delete'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)/user$', views.AssetPermissionUserView.as_view(),
|
||||
name='asset-permission-user-list'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)/asset$', views.AssetPermissionAssetView.as_view(),
|
||||
name='asset-permission-asset-list'),
|
||||
]
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register('v1/asset-permissions', api.AssetPermissionViewSet, 'asset-permission')
|
||||
|
||||
urlpatterns += [
|
||||
urlpatterns = [
|
||||
url(r'^v1/user/my/assets/$', api.MyGrantedAssetsApi.as_view(), name='my-assets'),
|
||||
url(r'^v1/user/my/asset-groups/$', api.MyGrantedAssetsGroupsApi.as_view(), name='my-asset-groups'),
|
||||
url(r'^v1/user/my/asset-group/(?P<pk>[0-9]+)/assets/$', api.MyAssetGroupAssetsApi.as_view(),
|
||||
|
@ -50,3 +34,4 @@ urlpatterns += [
|
|||
]
|
||||
|
||||
urlpatterns += router.urls
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
# coding:utf-8
|
||||
|
||||
from django.conf.urls import url
|
||||
from .. import views
|
||||
|
||||
app_name = 'perms'
|
||||
|
||||
urlpatterns = [
|
||||
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/(?P<pk>[0-9]+)/update$', views.AssetPermissionUpdateView.as_view(),
|
||||
name='asset-permission-update'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)$', views.AssetPermissionDetailView.as_view(),
|
||||
name='asset-permission-detail'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)/delete$', views.AssetPermissionDeleteView.as_view(),
|
||||
name='asset-permission-delete'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)/user$', views.AssetPermissionUserView.as_view(),
|
||||
name='asset-permission-user-list'),
|
||||
url(r'^asset-permission/(?P<pk>[0-9]+)/asset$', views.AssetPermissionAssetView.as_view(),
|
||||
name='asset-permission-asset-list'),
|
||||
]
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
from rest_framework import routers
|
||||
|
||||
from .. import api
|
||||
|
||||
app_name = 'terminal'
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'v1/terminal/heatbeat', api.TerminalHeatbeatViewSet, 'terminal-heatbeat')
|
||||
router.register(r'v1/terminal', api.TerminalViewSet, 'terminal')
|
||||
|
||||
urlpatterns = router.urls
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from .. import views
|
||||
|
||||
app_name = 'terminal'
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^terminal$', views.TerminalListView.as_view(), name='terminal-list'),
|
||||
url(r'^terminal/(?P<pk>\d+)/update$', views.TerminalUpdateView.as_view(), name='terminal-update'),
|
||||
]
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env python
|
||||
# ~*~ coding: utf-8 ~*~
|
||||
#
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.conf.urls import url
|
||||
from rest_framework_bulk.routes import BulkRouter
|
||||
from .. import api
|
||||
|
||||
app_name = 'users'
|
||||
|
||||
router = BulkRouter()
|
||||
router.register(r'v1/users', api.UserViewSet, 'user')
|
||||
router.register(r'v1/user-groups', api.UserGroupViewSet, 'user-group')
|
||||
# router.register(r'v1/user-groups', api.AssetViewSet, 'api-groups')
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
# url(r'^v1/users/$', api.UserListUpdateApi.as_view(), name='user-bulk-update-api'),
|
||||
url(r'^v1/users/token/$', api.UserAuthApi.as_view(), name='user-token'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/reset-password/$', api.UserResetPasswordApi.as_view(), name='user-reset-password'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/reset-pk/$', api.UserResetPKApi.as_view(), name='user-reset-pk'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/update-pk/$', api.UserUpdatePKApi.as_view(), name='user-update-pk'),
|
||||
# url(r'^v1/user-groups/$', api.GroupListUpdateApi.as_view(), name='user-group-bulk-update-api'),
|
||||
# url(r'^v1/user-groups/(?P<pk>\d+)/$', api.GroupDetailApi.as_view(), name='user-group-detail-api'),
|
||||
# url(r'^v1/user-groups/(?P<pk>\d+)/user/(?P<uid>\d+)/$',
|
||||
# api.DeleteUserFromGroupApi.as_view(), name='delete-user-from-group-api'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/groups/$',
|
||||
api.UserUpdateGroupApi.as_view(), name='user-update-group'),
|
||||
url(r'^v1/user-groups/(?P<pk>\d+)/users/$',
|
||||
api.UserGroupUpdateUserApi.as_view(), name='user-group-update-user'),
|
||||
]
|
||||
|
||||
urlpatterns += router.urls
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from django.conf.urls import url
|
||||
from rest_framework_bulk.routes import BulkRouter
|
||||
import views
|
||||
import api
|
||||
from .. import views
|
||||
|
||||
app_name = 'users'
|
||||
|
||||
|
@ -41,28 +41,3 @@ urlpatterns = [
|
|||
url(r'^user-group/(?P<pk>[0-9]+)/assets', views.UserGroupGrantedAssetView.as_view(),
|
||||
name='user-group-granted-asset'),
|
||||
]
|
||||
|
||||
|
||||
router = BulkRouter()
|
||||
router.register(r'v1/users', api.UserViewSet, 'user')
|
||||
router.register(r'v1/user-groups', api.UserGroupViewSet, 'user-group')
|
||||
# router.register(r'v1/user-groups', api.AssetViewSet, 'api-groups')
|
||||
|
||||
|
||||
urlpatterns += [
|
||||
# url(r'^v1/users/$', api.UserListUpdateApi.as_view(), name='user-bulk-update-api'),
|
||||
url(r'^v1/users/token/$', api.UserAuthApi.as_view(), name='user-token'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/reset-password/$', api.UserResetPasswordApi.as_view(), name='user-reset-password'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/reset-pk/$', api.UserResetPKApi.as_view(), name='user-reset-pk'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/update-pk/$', api.UserUpdatePKApi.as_view(), name='user-update-pk'),
|
||||
# url(r'^v1/user-groups/$', api.GroupListUpdateApi.as_view(), name='user-group-bulk-update-api'),
|
||||
# url(r'^v1/user-groups/(?P<pk>\d+)/$', api.GroupDetailApi.as_view(), name='user-group-detail-api'),
|
||||
# url(r'^v1/user-groups/(?P<pk>\d+)/user/(?P<uid>\d+)/$',
|
||||
# api.DeleteUserFromGroupApi.as_view(), name='delete-user-from-group-api'),
|
||||
url(r'^v1/users/(?P<pk>\d+)/groups/$',
|
||||
api.UserUpdateGroupApi.as_view(), name='user-update-group'),
|
||||
url(r'^v1/user-groups/(?P<pk>\d+)/users/$',
|
||||
api.UserGroupUpdateUserApi.as_view(), name='user-group-update-user'),
|
||||
]
|
||||
|
||||
urlpatterns += router.urls
|
Loading…
Reference in New Issue