85 lines
5.4 KiB
Python
85 lines
5.4 KiB
Python
"""
|
|
Communications app URLs with comprehensive CRUD operations.
|
|
"""
|
|
|
|
from django.urls import path, include
|
|
from . import views
|
|
|
|
app_name = 'communications'
|
|
|
|
urlpatterns = [
|
|
# ============================================================================
|
|
# DASHBOARD AND OVERVIEW
|
|
# ============================================================================
|
|
path('', views.CommunicationsDashboardView.as_view(), name='dashboard'),
|
|
|
|
# ============================================================================
|
|
# MESSAGE URLS (FULL CRUD - Operational Data)
|
|
# ============================================================================
|
|
path('messages/', views.MessageListView.as_view(), name='message_list'),
|
|
path('messages/create/', views.MessageCreateView.as_view(), name='message_create'),
|
|
path('messages/<int:pk>/', views.MessageDetailView.as_view(), name='message_detail'),
|
|
path('messages/<int:pk>/update/', views.MessageUpdateView.as_view(), name='message_update'),
|
|
path('messages/<int:pk>/delete/', views.MessageDeleteView.as_view(), name='message_delete'),
|
|
path('messages/recent/', views.recent_messages, name='recent_messages'),
|
|
|
|
# ============================================================================
|
|
# NOTIFICATION TEMPLATE URLS (FULL CRUD - Master Data)
|
|
# ============================================================================
|
|
path('templates/', views.NotificationTemplateListView.as_view(), name='notification_template_list'),
|
|
path('templates/create/', views.NotificationTemplateCreateView.as_view(), name='notification_template_create'),
|
|
path('templates/<int:pk>/', views.NotificationTemplateDetailView.as_view(), name='notification_template_detail'),
|
|
path('templates/<int:pk>/update/', views.NotificationTemplateUpdateView.as_view(), name='notification_template_update'),
|
|
path('templates/<int:pk>/delete/', views.NotificationTemplateDeleteView.as_view(), name='notification_template_delete'),
|
|
|
|
# ============================================================================
|
|
# ALERT RULE URLS (FULL CRUD - Master Data)
|
|
# ============================================================================
|
|
path('alert-rules/', views.AlertRuleListView.as_view(), name='alert_rule_list'),
|
|
path('alert-rules/create/', views.AlertRuleCreateView.as_view(), name='alert_rule_create'),
|
|
path('alert-rules/<int:pk>/', views.AlertRuleDetailView.as_view(), name='alert_rule_detail'),
|
|
path('alert-rules/<int:pk>/update/', views.AlertRuleUpdateView.as_view(), name='alert_rule_update'),
|
|
path('alert-rules/<int:pk>/delete/', views.AlertRuleDeleteView.as_view(), name='alert_rule_delete'),
|
|
|
|
# ============================================================================
|
|
# ALERT INSTANCE URLS (APPEND-ONLY - System Generated)
|
|
# ============================================================================
|
|
path('alerts/', views.AlertInstanceListView.as_view(), name='alert_instance_list'),
|
|
path('alerts/<int:pk>/', views.AlertInstanceDetailView.as_view(), name='alert_instance_detail'),
|
|
|
|
# ============================================================================
|
|
# COMMUNICATION CHANNEL URLS (FULL CRUD - Master Data)
|
|
# ============================================================================
|
|
path('channels/', views.CommunicationChannelListView.as_view(), name='communication_channel_list'),
|
|
path('channels/create/', views.CommunicationChannelCreateView.as_view(), name='communication_channel_create'),
|
|
path('channels/<int:pk>/', views.CommunicationChannelDetailView.as_view(), name='communication_channel_detail'),
|
|
path('channels/<int:pk>/update/', views.CommunicationChannelUpdateView.as_view(), name='communication_channel_update'),
|
|
path('channels/<int:pk>/delete/', views.CommunicationChannelDeleteView.as_view(), name='communication_channel_delete'),
|
|
|
|
# ============================================================================
|
|
# DELIVERY LOG URLS (READ-ONLY - System Generated)
|
|
# ============================================================================
|
|
path('delivery-logs/', views.DeliveryLogListView.as_view(), name='delivery_log_list'),
|
|
path('delivery-logs/<int:pk>/', views.DeliveryLogDetailView.as_view(), name='delivery_log_detail'),
|
|
|
|
# ============================================================================
|
|
# HTMX ENDPOINTS FOR REAL-TIME UPDATES
|
|
# ============================================================================
|
|
path('stats/', views.communications_stats, name='communications_stats'),
|
|
path('htmx/message-search/', views.message_search, name='message_search'),
|
|
|
|
# ============================================================================
|
|
# ACTION URLS FOR WORKFLOW OPERATIONS
|
|
# ============================================================================
|
|
path('messages/<int:message_id>/send/', views.send_message, name='send_message'),
|
|
path('channels/<int:channel_id>/test/', views.test_channel, name='test_channel'),
|
|
path('alerts/<int:alert_id>/acknowledge/', views.acknowledge_alert, name='acknowledge_alert'),
|
|
path('alerts/<int:alert_id>/resolve/', views.resolve_alert, name='resolve_alert'),
|
|
|
|
# ============================================================================
|
|
# API ENDPOINTS
|
|
# ============================================================================
|
|
path('api/', include('communications.api.urls')),
|
|
]
|
|
|