Files
hostpanel/ssh_manager/urls.py
ilkeral 342f1314c7 yeni
2025-07-21 13:49:36 +03:00

80 lines
5.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.urls import path
from . import views
from django.apps import apps
from django.core.management import call_command
# İlk yüklemede SSH kontrolü yap
if apps.apps_ready:
try:
call_command('check_ssh')
except:
pass
# app_name = 'ssh_manager' # namespace'i kaldır
urlpatterns = [
path('', views.dashboard, name='project_list'), # Ana sayfa dashboard olsun
path('dashboard/', views.dashboard, name='dashboard'),
path('projeler/', views.project_list, name='projeler'),
path('host-yonetimi/', views.host_yonetimi, name='host_yonetimi'),
path('yedeklemeler/', views.yedeklemeler, name='yedeklemeler'),
path('islem-gecmisi/', views.islem_gecmisi, name='islem_gecmisi'),
path('ayarlar/', views.ayarlar, name='ayarlar'),
path('musteriler/', views.musteriler, name='musteriler'),
path('musteri/create/', views.create_customer, name='create_customer'),
path('musteri/<int:customer_id>/edit/', views.edit_customer, name='edit_customer'),
path('musteri/<int:customer_id>/delete/', views.delete_customer, name='delete_customer'),
path('get-customer-details/<int:customer_id>/', views.get_customer_details, name='get_customer_details'),
path('update-customer/<int:customer_id>/', views.update_customer, name='update_customer'),
path('get_host/<int:host_id>/', views.get_host, name='get_host'),
path('update_host/<int:host_id>/', views.update_host, name='update_host'),
path('delete_host/<int:host_id>/', views.delete_host, name='delete_host'),
path('update-hosts-status/', views.update_hosts_status, name='update_hosts_status'),
path('project/create/', views.create_project, name='create_project'),
path('project/<int:project_id>/upload/', views.upload_project_zip, name='upload_project_zip'),
path('delete_project/<int:project_id>/', views.delete_project, name='delete_project'),
path('project/<int:project_id>/setup-venv/', views.setup_venv, name='setup_venv'),
path('project/<int:project_id>/check-requirements/', views.check_requirements, name='check_requirements'),
path('project/<int:project_id>/update-requirements/', views.update_requirements, name='update_requirements'),
path('project/<int:project_id>/delete-requirement-line/', views.delete_requirement_line, name='delete_requirement_line'),
path('project/<int:project_id>/download-req/', views.download_req_file, name='download_req_file'),
path('logs/<int:ssh_credential_id>/', views.view_logs, name='credential_logs'),
path('logs/clear/', views.clear_logs, name='clear_logs'),
path('logs/all/', views.get_all_logs, name='get_all_logs'),
path('logs/test/', views.get_all_logs, name='get_all_logs_test'), # Test için
path('logs/', views.view_logs, name='system_logs'),
path('project/<int:project_id>/check-venv/', views.check_venv, name='check_venv'),
path('project/<int:project_id>/install-requirements/', views.install_requirements, name='install_requirements'),
path('project/<int:project_id>/check-folder/', views.check_folder_empty, name='check_folder_empty'),
path('project/<int:project_id>/list-files/', views.list_project_files, name='list_project_files'),
path('project/upload/', views.upload_project_files, name='upload_project_files'),
path('get-latest-logs/', views.get_latest_logs, name='get_latest_logs'),
path('project/<int:project_id>/restart-supervisor/', views.restart_supervisor, name='restart_supervisor'),
path('project/<int:project_id>/refresh/', views.refresh_project, name='refresh_project'),
# path('backup/', views.backup_projects, name='backup_projects'),
path('backup-project/<int:project_id>/', views.backup_project, name='backup_project'),
path('project/<int:project_id>/backup-logs/', views.project_backup_logs, name='project_backup_logs'),
path('project/<int:project_id>/clear-logs/', views.clear_project_logs, name='clear_project_logs'),
path('project/<int:project_id>/check-site/', views.check_site_status_view, name='check_site_status'),
path('project/<int:project_id>/meta-key/', views.get_project_meta_key, name='get_project_meta_key'),
path('check-all-sites/', views.check_all_sites_view, name='check_all_sites'),
path('get-project-details/<int:project_id>/', views.get_project_details, name='get_project_details'),
path('update-project/<int:project_id>/', views.update_project, name='update_project'),
# Host yönetimi URL'leri
path('test-host-connection/<int:host_id>/', views.test_host_connection, name='test_host_connection'),
path('refresh-all-hosts/', views.refresh_all_hosts, name='refresh_all_hosts'),
path('create-host/', views.create_host, name='create_host'),
path('update-host/<int:host_id>/', views.update_host, name='update_host'),
path('get-host-details/<int:host_id>/', views.get_host_details, name='get_host_details'),
path('delete-host/<int:host_id>/', views.delete_host, name='delete_host'),
path('test-host-connection-form/', views.test_host_connection_form, name='test_host_connection_form'),
# Yedekleme endpoints
path('start-backup/', views.start_backup, name='start_backup'),
path('backup-all-projects/', views.backup_all_projects, name='backup_all_projects'),
path('retry-backup/', views.retry_backup, name='retry_backup'),
# path('upload-to-drive/<int:project_id>/', views.upload_to_drive, name='upload_to_drive').
]