2016-11-16 10:12:14 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2016-12-25 09:44:39 +00:00
|
|
|
from django.conf.urls import url
|
2016-11-16 10:12:14 +00:00
|
|
|
from rest_framework import routers
|
|
|
|
|
|
|
|
from .. import api
|
|
|
|
|
2017-12-01 09:28:47 +00:00
|
|
|
app_name = 'terminal'
|
2016-11-16 10:12:14 +00:00
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
2017-11-14 01:44:16 +00:00
|
|
|
router.register(r'v1/terminal/(?P<terminal>[0-9]+)?/?status', api.TerminalStatusViewSet, 'terminal-status')
|
|
|
|
router.register(r'v1/terminal/(?P<terminal>[0-9]+)?/?sessions', api.TerminalSessionViewSet, 'terminal-sessions')
|
2017-11-22 02:54:59 +00:00
|
|
|
router.register(r'v1/terminal', api.TerminalViewSet, 'terminal')
|
2017-11-29 11:27:04 +00:00
|
|
|
router.register(r'v1/command', api.SessionCommandViewSet, 'command')
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2016-12-25 09:44:39 +00:00
|
|
|
urlpatterns = [
|
2017-11-22 02:54:59 +00:00
|
|
|
url(r'^v1/sessions/(?P<pk>[0-9a-zA-Z\-_]+)/replay/$', api.SessionReplayAPI.as_view(), name='session-replay'),
|
2016-12-25 09:44:39 +00:00
|
|
|
]
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2016-12-30 14:21:50 +00:00
|
|
|
urlpatterns += router.urls
|