93 lines
5.3 KiB
Python
93 lines
5.3 KiB
Python
"""
|
|
URL configuration for core app.
|
|
"""
|
|
|
|
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = 'core'
|
|
|
|
urlpatterns = [
|
|
# Dashboard and main views
|
|
path('', views.DashboardView.as_view(), name='dashboard'),
|
|
path('audit-log/', views.AuditLogListView.as_view(), name='audit_log'),
|
|
path('system-configuration/', views.SystemConfigurationListView.as_view(), name='system_configuration'),
|
|
|
|
# Tenant CRUD URLs
|
|
path('tenants/', views.TenantListView.as_view(), name='tenant_list'),
|
|
path('tenants/create/', views.TenantCreateView.as_view(), name='tenant_create'),
|
|
path('tenants/<int:pk>/', views.TenantDetailView.as_view(), name='tenant_detail'),
|
|
path('tenants/<int:pk>/edit/', views.TenantUpdateView.as_view(), name='tenant_update'),
|
|
path('tenants/<int:pk>/delete/', views.TenantDeleteView.as_view(), name='tenant_delete'),
|
|
path('tenants/<int:pk>/activate/', views.activate_tenant, name='activate_tenant'),
|
|
path('tenants/<int:pk>/deactivate/', views.deactivate_tenant, name='deactivate_tenant'),
|
|
|
|
# Department CRUD URLs
|
|
# path('departments/', views.DepartmentListView.as_view(), name='department_list'),
|
|
# path('departments/create/', views.DepartmentCreateView.as_view(), name='department_create'),
|
|
# path('departments/<int:pk>/', views.DepartmentDetailView.as_view(), name='department_detail'),
|
|
# path('departments/<int:pk>/edit/', views.DepartmentUpdateView.as_view(), name='department_update'),
|
|
# path('departments/<int:pk>/delete/', views.DepartmentDeleteView.as_view(), name='department_delete'),
|
|
|
|
|
|
# System Configuration CRUD URLs
|
|
path('system-configuration/create/', views.SystemConfigurationCreateView.as_view(), name='system_configuration_create'),
|
|
path('system-configuration/<int:pk>/', views.SystemConfigurationDetailView.as_view(), name='system_configuration_detail'),
|
|
path('system-configuration/<int:pk>/edit/', views.SystemConfigurationUpdateView.as_view(), name='system_configuration_update'),
|
|
path('system-configuration/<int:pk>/delete/', views.SystemConfigurationDeleteView.as_view(), name='system_configuration_delete'),
|
|
|
|
|
|
# System Notification CRUD URLs
|
|
path('notifications/', views.SystemNotificationListView.as_view(), name='system_notification_list'),
|
|
path('notifications/create/', views.SystemNotificationCreateView.as_view(), name='system_notification_create'),
|
|
path('notifications/<int:pk>/', views.SystemNotificationDetailView.as_view(), name='system_notification_detail'),
|
|
path('notifications/<int:pk>/edit/', views.SystemNotificationUpdateView.as_view(), name='system_notification_update'),
|
|
path('notifications/<int:pk>/delete/', views.SystemNotificationDeleteView.as_view(), name='system_notification_delete'),
|
|
path('notifications/<int:pk>/activate', views.activate_notification, name='activate_notification'),
|
|
path('notifications/<int:pk>/deactivate', views.deactivate_notification, name='deactivate_notification'),
|
|
|
|
# Audit Log Detail URL
|
|
path('audit-log/<uuid:pk>/', views.AuditLogDetailView.as_view(), name='audit_log_detail'),
|
|
|
|
# Integration Log URLs
|
|
path('integration-logs/', views.IntegrationLogListView.as_view(), name='integration_log_list'),
|
|
path('integration-logs/<uuid:pk>/', views.IntegrationLogDetailView.as_view(), name='integration_log_detail'),
|
|
|
|
# HTMX views
|
|
path('htmx/dashboard-stats/', views.dashboard_stats, name='dashboard_stats'),
|
|
path('htmx/audit-log-search/', views.audit_log_search, name='audit_log_search'),
|
|
path('htmx/system-notifications/', views.system_notifications, name='system_notifications'),
|
|
path('htmx/dismiss-notification/<uuid:notification_id>/', views.dismiss_notification, name='dismiss_notification'),
|
|
path('htmx/tenant-info/', views.tenant_info, name='tenant_info'),
|
|
path('htmx/system-health/', views.system_health, name='system_health'),
|
|
path('htmx/tenant-stats/', views.tenant_stats, name='tenant_stats'),
|
|
path('htmx/configuration-search/', views.configuration_search, name='configuration_search'),
|
|
path('htmx/audit-log-list/', views.audit_log_list_htmx, name='audit_log_list_htmx'),
|
|
|
|
# Action URLs
|
|
|
|
|
|
# path('notifications/<uuid:pk>/dismiss/', views.dismiss_notification, name='dismiss_notification'),
|
|
path('system-configuration/reset/', views.reset_system_configuration, name='reset_system_configuration'),
|
|
path('audit-log/export/', views.export_audit_log, name='export_audit_log'),
|
|
|
|
# Search and Filter URLs
|
|
path('search/', views.CoreSearchView.as_view(), name='search'),
|
|
path('search/tenants/', views.tenant_search, name='tenant_search'),
|
|
path('search/audit-logs/', views.audit_log_search, name='audit_log_search'),
|
|
|
|
# Bulk Operations
|
|
path('tenants/bulk-activate/', views.bulk_activate_tenants, name='bulk_activate_tenants'),
|
|
path('tenants/bulk-deactivate/', views.bulk_deactivate_tenants, name='bulk_deactivate_tenants'),
|
|
|
|
path('audit-log/bulk-export/', views.bulk_export_audit_logs, name='bulk_export_audit_logs'),
|
|
|
|
# API-like endpoints for AJAX
|
|
path('api/tenant-validation/', views.validate_tenant_data, name='validate_tenant_data'),
|
|
|
|
path('api/system-status/', views.get_system_status, name='get_system_status'),
|
|
path('api/configuration-backup/', views.backup_configuration, name='backup_configuration'),
|
|
path('api/configuration-restore/', views.restore_configuration, name='restore_configuration'),
|
|
]
|
|
|