jumpserver/apps/audits/urls/api_urls.py

30 lines
923 B
Python
Raw Normal View History

2018-04-06 03:27:52 +00:00
# ~*~ coding: utf-8 ~*~
from __future__ import unicode_literals
from django.urls.conf import re_path
2018-04-06 03:27:52 +00:00
from rest_framework.routers import DefaultRouter
from common import api as capi
2018-04-06 03:27:52 +00:00
from .. import api
app_name = "audits"
router = DefaultRouter()
router.register(r'ftp-logs', api.FTPLogViewSet, 'ftp-log')
2020-04-29 11:05:56 +00:00
router.register(r'login-logs', api.UserLoginLogViewSet, 'login-log')
2020-05-08 08:48:26 +00:00
router.register(r'operate-logs', api.OperateLogViewSet, 'operate-log')
router.register(r'password-change-logs', api.PasswordChangeLogViewSet, 'password-change-log')
router.register(r'command-execution-logs', api.CommandExecutionViewSet, 'command-execution-log')
2020-06-04 12:00:39 +00:00
router.register(r'command-executions-hosts-relations', api.CommandExecutionHostRelationViewSet, 'command-executions-hosts-relation')
2018-04-06 03:27:52 +00:00
urlpatterns = [
]
old_version_urlpatterns = [
re_path('(?P<resource>ftp-log)/.*', capi.redirect_plural_name_api)
]
2018-04-06 03:27:52 +00:00
urlpatterns += router.urls