jumpserver/apps/terminal/urls.py

26 lines
710 B
Python
Raw Normal View History

2016-10-17 07:24:41 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
from django.conf.urls import url
2016-11-10 18:13:13 +00:00
from rest_framework import routers
2016-10-17 07:24:41 +00:00
import views
import api
app_name = 'terminal'
urlpatterns = [
url(r'^terminal$', views.TerminalListView.as_view(), name='terminal-list'),
2016-10-19 10:33:14 +00:00
url(r'^terminal/(?P<pk>\d+)/update$', views.TerminalUpdateView.as_view(), name='terminal-update'),
2016-10-17 07:24:41 +00:00
]
2016-11-10 18:13:13 +00:00
router = routers.DefaultRouter()
2016-11-16 09:45:46 +00:00
router.register(r'v1/terminal/heatbeat', api.TerminalHeatbeatViewSet, 'terminal-heatbeat')
router.register(r'v1/terminal', api.TerminalViewSet, 'terminal')
2016-11-13 14:34:38 +00:00
# urlpatterns += [
# url(r'v1/terminal/heatbeat/', api.TerminalHeatbeatApi.as_view(), name='api-terminal-heatbeat')
# ]
2016-11-10 18:13:13 +00:00
urlpatterns += router.urls