This commit is contained in:
Iliyan Angelov
2025-09-19 11:58:53 +03:00
parent 306b20e24a
commit 6b247e5b9f
11423 changed files with 1500615 additions and 778 deletions

View File

@@ -0,0 +1,50 @@
"""
URL configuration for analytics_predictive_insights app
"""
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views.analytics import (
KPIMetricViewSet, KPIMeasurementViewSet, IncidentRecurrenceAnalysisViewSet,
PredictiveModelViewSet, AnomalyDetectionViewSet, CostImpactAnalysisViewSet,
DashboardConfigurationViewSet, HeatmapDataViewSet, PredictiveInsightViewSet
)
# Create router and register viewsets
router = DefaultRouter()
router.register(r'kpi-metrics', KPIMetricViewSet)
router.register(r'kpi-measurements', KPIMeasurementViewSet)
router.register(r'recurrence-analyses', IncidentRecurrenceAnalysisViewSet)
router.register(r'predictive-models', PredictiveModelViewSet)
router.register(r'anomaly-detections', AnomalyDetectionViewSet)
router.register(r'cost-analyses', CostImpactAnalysisViewSet)
router.register(r'dashboard-configurations', DashboardConfigurationViewSet)
router.register(r'heatmap-data', HeatmapDataViewSet)
router.register(r'predictive-insights', PredictiveInsightViewSet)
app_name = 'analytics_predictive_insights'
urlpatterns = [
# Include router URLs
path('', include(router.urls)),
# Additional custom endpoints
path('dashboard/<uuid:dashboard_id>/data/',
DashboardConfigurationViewSet.as_view({'get': 'data'}),
name='dashboard-data'),
path('kpi-metrics/summary/',
KPIMetricViewSet.as_view({'get': 'summary'}),
name='kpi-summary'),
path('anomaly-detections/summary/',
AnomalyDetectionViewSet.as_view({'get': 'summary'}),
name='anomaly-summary'),
path('cost-analyses/summary/',
CostImpactAnalysisViewSet.as_view({'get': 'summary'}),
name='cost-summary'),
path('predictive-insights/summary/',
PredictiveInsightViewSet.as_view({'get': 'summary'}),
name='insight-summary'),
]