2016-11-16 10:12:14 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2023-08-01 08:40:38 +00:00
|
|
|
from django.urls import path
|
2018-09-07 04:40:26 +00:00
|
|
|
from rest_framework_bulk.routes import BulkRouter
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2019-03-18 03:34:13 +00:00
|
|
|
from .. import api
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2017-12-01 09:28:47 +00:00
|
|
|
app_name = 'terminal'
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2018-09-07 04:40:26 +00:00
|
|
|
router = BulkRouter()
|
|
|
|
router.register(r'sessions', api.SessionViewSet, 'session')
|
2022-11-07 12:41:18 +00:00
|
|
|
router.register(r'terminals/((?P<terminal>[^/.]{36})/)?status', api.StatusViewSet, 'terminal-status')
|
|
|
|
router.register(r'terminals/((?P<terminal>[^/.]{36})/)?sessions', api.SessionViewSet, 'terminal-sessions')
|
2019-08-31 04:07:03 +00:00
|
|
|
router.register(r'terminals', api.TerminalViewSet, 'terminal')
|
2018-07-13 16:47:21 +00:00
|
|
|
router.register(r'tasks', api.TaskViewSet, 'tasks')
|
2019-08-31 04:07:03 +00:00
|
|
|
router.register(r'commands', api.CommandViewSet, 'command')
|
2018-09-07 04:40:26 +00:00
|
|
|
router.register(r'status', api.StatusViewSet, 'status')
|
2019-12-05 07:09:25 +00:00
|
|
|
router.register(r'replay-storages', api.ReplayStorageViewSet, 'replay-storage')
|
|
|
|
router.register(r'command-storages', api.CommandStorageViewSet, 'command-storage')
|
2021-09-07 10:16:27 +00:00
|
|
|
router.register(r'session-sharings', api.SessionSharingViewSet, 'session-sharing')
|
|
|
|
router.register(r'session-join-records', api.SessionJoinRecordsViewSet, 'session-sharing-record')
|
2022-04-12 09:45:10 +00:00
|
|
|
router.register(r'endpoints', api.EndpointViewSet, 'endpoint')
|
|
|
|
router.register(r'endpoint-rules', api.EndpointRuleViewSet, 'endpoint-rule')
|
2022-10-25 04:57:34 +00:00
|
|
|
router.register(r'applets', api.AppletViewSet, 'applet')
|
2022-11-07 12:41:18 +00:00
|
|
|
router.register(r'applet-hosts/((?P<host>[^/.]+)/)?accounts', api.AppletHostAccountsViewSet, 'applet-host-account')
|
|
|
|
router.register(r'applet-hosts/((?P<host>[^/.]+)/)?applets', api.AppletHostAppletViewSet, 'applet-host-applet')
|
2022-10-25 04:57:34 +00:00
|
|
|
router.register(r'applet-hosts', api.AppletHostViewSet, 'applet-host')
|
2022-10-28 10:19:44 +00:00
|
|
|
router.register(r'applet-publications', api.AppletPublicationViewSet, 'applet-publication')
|
2022-11-01 03:52:51 +00:00
|
|
|
router.register(r'applet-host-deployments', api.AppletHostDeploymentViewSet, 'applet-host-deployment')
|
2022-09-22 10:47:16 +00:00
|
|
|
router.register(r'db-listen-ports', api.DBListenPortViewSet, 'db-listen-ports')
|
2023-12-05 08:52:11 +00:00
|
|
|
router.register(r'virtual-apps', api.VirtualAppViewSet, 'virtual-app')
|
|
|
|
router.register(r'app-providers', api.AppProviderViewSet, 'app-provider')
|
|
|
|
router.register(r'app-providers/((?P<provider>[^/.]+)/)?apps', api.AppProviderAppViewSet, 'app-provider-app')
|
|
|
|
router.register(r'virtual-app-publications', api.VirtualAppPublicationViewSet, 'virtual-app-publication')
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2016-12-25 09:44:39 +00:00
|
|
|
urlpatterns = [
|
2021-12-13 02:50:10 +00:00
|
|
|
path('my-sessions/', api.MySessionAPIView.as_view(), name='my-session'),
|
2021-01-20 10:33:38 +00:00
|
|
|
path('terminal-registrations/', api.TerminalRegistrationApi.as_view(), name='terminal-registration'),
|
2022-02-18 06:28:28 +00:00
|
|
|
path('registration/', api.TerminalRegistrationApi.as_view(), name='registration'),
|
2020-04-09 02:43:25 +00:00
|
|
|
path('sessions/join/validate/', api.SessionJoinValidateAPI.as_view(), name='join-session-validate'),
|
2018-07-27 10:56:40 +00:00
|
|
|
path('sessions/<uuid:pk>/replay/',
|
2018-11-23 02:25:35 +00:00
|
|
|
api.SessionReplayViewSet.as_view({'get': 'retrieve', 'post': 'create'}),
|
2018-07-27 10:56:40 +00:00
|
|
|
name='session-replay'),
|
|
|
|
path('tasks/kill-session/', api.KillSessionAPI.as_view(), name='kill-session'),
|
2021-12-29 12:07:56 +00:00
|
|
|
path('tasks/kill-session-for-ticket/', api.KillSessionForTicketAPI.as_view(), name='kill-session-for-ticket'),
|
2019-08-31 04:07:03 +00:00
|
|
|
path('terminals/config/', api.TerminalConfig.as_view(), name='terminal-config'),
|
2020-10-27 03:35:31 +00:00
|
|
|
path('commands/insecure-command/', api.InsecureCommandAlertAPI.as_view(), name="command-alert"),
|
2022-11-17 12:48:50 +00:00
|
|
|
path('replay-storages/<uuid:pk>/test-connective/', api.ReplayStorageTestConnectiveApi.as_view(),
|
|
|
|
name='replay-storage-test-connective'),
|
|
|
|
path('command-storages/<uuid:pk>/test-connective/', api.CommandStorageTestConnectiveApi.as_view(),
|
|
|
|
name='command-storage-test-connective'),
|
2020-12-10 12:50:22 +00:00
|
|
|
# components
|
|
|
|
path('components/metrics/', api.ComponentsMetricsAPIView.as_view(), name='components-metrics'),
|
2022-11-17 12:48:50 +00:00
|
|
|
path('components/connect-methods/', api.ConnectMethodListApi.as_view(), name='connect-methods'),
|
2016-12-25 09:44:39 +00:00
|
|
|
]
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2023-01-16 11:02:09 +00:00
|
|
|
urlpatterns += router.urls
|