factory/apps/monitor/urls.py

18 lines
730 B
Python
Executable File

from django.urls import path, include
from rest_framework import routers
from .views import DrfRequestLogViewSet, ServerInfoView, LogView, LogDetailView, index, room, video
API_BASE_URL = 'api/monitor/'
HTML_BASE_URL = 'monitor/'
urlpatterns = [
path(HTML_BASE_URL, index),
path(HTML_BASE_URL + 'index/', index),
path(HTML_BASE_URL + 'video/', video),
path(HTML_BASE_URL + '<str:room_name>/', room, name='room'),
path(API_BASE_URL + 'log/', LogView.as_view()),
path(API_BASE_URL + 'log/<str:name>/', LogDetailView.as_view()),
path(API_BASE_URL + 'server/', ServerInfoView.as_view()),
path(API_BASE_URL + 'request_log/', DrfRequestLogViewSet.as_view({'get':'list'}), name='requestlog_view')
]