from django.urls import path, include
from rest_framework import routers
from .views import CpuView, DiskView, DrfRequestLogViewSet, LogView, LogDetailView, MemoryView

API_BASE_URL = 'api/ops/'
HTML_BASE_URL = 'ops/'
router = routers.DefaultRouter()
router.register('request_log', DrfRequestLogViewSet, basename="request_log")
urlpatterns = [
    path(API_BASE_URL, include(router.urls)),
    path(API_BASE_URL + 'log/', LogView.as_view()),
    path(API_BASE_URL + 'log/<str:name>/', LogDetailView.as_view()),
    path(API_BASE_URL + 'server/cpu/', CpuView.as_view()),
    path(API_BASE_URL + 'server/memory/', MemoryView.as_view()),
    path(API_BASE_URL + 'server/disk/', DiskView.as_view())
]
