jumpserver/apps/terminal/urls.py

26 lines
621 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()
router.register(r'v1/terminal', api.TerminalViewSet, 'api-terminal')
2016-10-17 07:24:41 +00:00
urlpatterns += [
2016-11-10 18:13:13 +00:00
url(r'^v1/terminal/heatbeat/$', api.TerminalHeatbeatApi.as_view(), name='terminal-heatbeat-api'),
2016-10-17 07:24:41 +00:00
]
2016-11-10 18:13:13 +00:00
urlpatterns += router.urls