from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from . import views

app_name = 'mainapp'

urlpatterns = [
    path('', views.SourceListView.as_view(), name='home'),
    path('objitems/', views.ObjItemListView.as_view(), name='objitem_list'),
    path('actions/', views.ActionsPageView.as_view(), name='actions'),
    path('excel-data', views.LoadExcelDataView.as_view(), name='load_excel_data'),
    path('satellites', views.AddSatellitesView.as_view(), name='add_sats'),
    path('api/locations/<int:sat_id>/geojson/', views.GetLocationsView.as_view(), name='locations_by_id'),
    path('transponders', views.AddTranspondersView.as_view(), name='add_trans'),
    path('csv-data', views.LoadCsvDataView.as_view(), name='load_csv_data'),
    path('map-points/', views.ShowMapView.as_view(), name='admin_show_map'),
    path('show-selected-objects-map/', views.ShowSelectedObjectsMapView.as_view(), name='show_selected_objects_map'),
    path('delete-selected-objects/', views.DeleteSelectedObjectsView.as_view(), name='delete_selected_objects'),
    path('cluster/', views.ClusterTestView.as_view(), name='cluster'),
    path('vch-upload/', views.UploadVchLoadView.as_view(), name='vch_load'),
    path('vch-link/', views.LinkVchSigmaView.as_view(), name='link_vch_sigma'),
    path('link-lyngsat/', views.LinkLyngsatSourcesView.as_view(), name='link_lyngsat'),
    path('api/lyngsat/<int:lyngsat_id>/', views.LyngsatDataAPIView.as_view(), name='lyngsat_data_api'),
    path('api/sigma-parameter/<int:parameter_id>/', views.SigmaParameterDataAPIView.as_view(), name='sigma_parameter_data_api'),
    path('api/source/<int:source_id>/objitems/', views.SourceObjItemsAPIView.as_view(), name='source_objitems_api'),
    path('kubsat-excel/', views.ProcessKubsatView.as_view(), name='kubsat_excel'),
    path('object/create/', views.ObjItemCreateView.as_view(), name='objitem_create'),
    path('object/<int:pk>/edit/', views.ObjItemUpdateView.as_view(), name='objitem_update'),
    path('object/<int:pk>/', views.ObjItemDetailView.as_view(), name='objitem_detail'),
    path('object/<int:pk>/delete/', views.ObjItemDeleteView.as_view(), name='objitem_delete'),
    path('fill-lyngsat-data/', views.FillLyngsatDataView.as_view(), name='fill_lyngsat_data'),
    path('lyngsat-task-status/', views.LyngsatTaskStatusView.as_view(), name='lyngsat_task_status'),
    path('lyngsat-task-status/<str:task_id>/', views.LyngsatTaskStatusView.as_view(), name='lyngsat_task_status'),
    path('api/lyngsat-task-status/<str:task_id>/', views.LyngsatTaskStatusAPIView.as_view(), name='lyngsat_task_status_api'),
    path('clear-lyngsat-cache/', views.ClearLyngsatCacheView.as_view(), name='clear_lyngsat_cache'),
]