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
baba65ad
Commit
baba65ad
authored
Dec 05, 2016
by
yumaojun03
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改url模块, 匹配整体架构风格.
parent
d0460d86
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
urls.py
apps/jumpserver/urls.py
+1
-1
__init__.py
apps/ops/urls/__init__.py
+0
-0
api_urls.py
apps/ops/urls/api_urls.py
+15
-0
view_urls.py
apps/ops/urls/view_urls.py
+25
-0
No files found.
apps/jumpserver/urls.py
View file @
baba65ad
...
...
@@ -30,7 +30,7 @@ urlpatterns = [
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
(
'^ops/'
,
include
(
'ops.urls.view_urls'
),
name
=
'ops'
),
url
(
'^ops/'
,
include
(
'ops.urls.view_urls'
,
namespace
=
'ops'
)
),
url
(
r'^api/users/'
,
include
(
'users.urls.api_urls'
,
namespace
=
'api-users'
)),
url
(
r'^api/assets/'
,
include
(
'assets.urls.api_urls'
,
namespace
=
'api-assets'
)),
...
...
apps/ops/urls/__init__.py
0 → 100644
View file @
baba65ad
apps/ops/urls/api_urls.py
0 → 100644
View file @
baba65ad
from
rest_framework.routers
import
DefaultRouter
from
ops.api
import
views
as
ops_api_view
api_router
=
DefaultRouter
()
api_router
.
register
(
r'host_alia'
,
ops_api_view
.
HostAliaViewSet
)
api_router
.
register
(
r'user_alia'
,
ops_api_view
.
UserAliaViewSet
)
api_router
.
register
(
r'cmd_alia'
,
ops_api_view
.
CmdAliaViewSet
)
api_router
.
register
(
r'runas_alia'
,
ops_api_view
.
RunasAliaViewSet
)
api_router
.
register
(
r'extra_conf'
,
ops_api_view
.
ExtraconfViewSet
)
api_router
.
register
(
r'privilege'
,
ops_api_view
.
PrivilegeViewSet
)
api_router
.
register
(
r'sudo'
,
ops_api_view
.
SudoViewSet
)
api_router
.
register
(
r'cron'
,
ops_api_view
.
CronTableViewSet
)
urlpatterns
=
api_router
.
urls
\ No newline at end of file
apps/ops/urls/view_urls.py
0 → 100644
View file @
baba65ad
# ~*~ coding: utf-8 ~*~
from
__future__
import
unicode_literals
from
django.conf.urls
import
url
from
ops
import
views
as
page_view
app_name
=
'ops'
urlpatterns
=
[
# Resource Sudo url
url
(
r'^sudo/list$'
,
page_view
.
SudoListView
.
as_view
(),
name
=
'page-sudo-list'
),
url
(
r'^sudo/create$'
,
page_view
.
SudoCreateView
.
as_view
(),
name
=
'page-sudo-create'
),
url
(
r'^sudo/detail$'
,
page_view
.
SudoDetailView
.
as_view
(),
name
=
'page-sudo-detail'
),
url
(
r'^sudo/update$'
,
page_view
.
SudoUpdateView
.
as_view
(),
name
=
'page-sudo-update'
),
# Resource Cron url
url
(
r'^cron/list$'
,
page_view
.
CronListView
.
as_view
(),
name
=
'page-cron-list'
),
url
(
r'^cron/create$'
,
page_view
.
CronCreateView
.
as_view
(),
name
=
'page-cron-create'
),
url
(
r'^cron/detail$'
,
page_view
.
CronDetailView
.
as_view
(),
name
=
'page-cron-detail'
),
url
(
r'^cron/update$'
,
page_view
.
CronUpdateView
.
as_view
(),
name
=
'page-cron-update'
),
]
\ No newline at end of file
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