2017-03-07 09:37:28 +00:00
|
|
|
Rails.application.routes.draw do
|
|
|
|
|
|
|
|
locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales
|
2021-12-09 09:59:15 +00:00
|
|
|
scope "(:locale)", locale: ::Regexp.new(locales.join("|")) do
|
2017-03-07 09:37:28 +00:00
|
|
|
namespace :admin do
|
2017-09-19 08:33:08 +00:00
|
|
|
# get "client_managements/completed_requests", to: 'client_managements#completed_requests'
|
|
|
|
# get "client_managements/contracts", to: 'client_managements#contracts'
|
2023-07-01 02:28:18 +00:00
|
|
|
match 'box' => 'box#index', via: [:get, :post, :put, :patch, :delete]
|
|
|
|
match 'box/*path' => 'box#show', via: [:get, :post, :put, :patch, :delete]
|
2023-04-20 16:11:21 +00:00
|
|
|
match 'plow' => 'plow#index', via: [:get, :post, :put, :patch, :delete]
|
2023-04-21 16:09:36 +00:00
|
|
|
get 'plow/setting' => 'plow#setting'
|
|
|
|
patch 'plow/save_setting' => 'plow#save_setting'
|
2023-04-20 16:11:21 +00:00
|
|
|
match 'plow/*path' => 'plow#show', via: [:get, :post, :put, :patch, :delete]
|
2017-03-08 06:10:32 +00:00
|
|
|
resources :client_managements do
|
|
|
|
member do
|
|
|
|
get "make_contract"
|
|
|
|
post "create_contract"
|
2017-03-08 07:06:40 +00:00
|
|
|
get "edit_contract"
|
2017-03-10 06:53:25 +00:00
|
|
|
get "see_contract"
|
|
|
|
patch "update_contract"
|
|
|
|
get "confirm_contract"
|
2017-10-09 09:44:59 +00:00
|
|
|
get "make_timeline"
|
|
|
|
get "edit_timeline"
|
|
|
|
post "create_timeline"
|
|
|
|
post "update_timeline"
|
2017-03-10 06:53:25 +00:00
|
|
|
get "make_purchase"
|
|
|
|
patch "add_sites"
|
|
|
|
get "complete_request"
|
2017-03-29 07:09:14 +00:00
|
|
|
get "receipts"
|
|
|
|
get "add_receipt"
|
|
|
|
get "edit_receipt"
|
|
|
|
post "create_receipt"
|
|
|
|
patch "update_receipt"
|
2017-10-09 09:44:59 +00:00
|
|
|
get "project_dashboard"
|
|
|
|
patch "update_site_request"
|
2017-11-28 11:47:23 +00:00
|
|
|
post "create_project_post"
|
|
|
|
post "timeline_update"
|
2017-03-08 06:10:32 +00:00
|
|
|
end
|
2017-09-19 08:33:08 +00:00
|
|
|
collection do
|
|
|
|
get "completed_requests"
|
|
|
|
get "contracts"
|
|
|
|
end
|
2017-03-08 06:10:32 +00:00
|
|
|
end
|
2022-04-10 09:14:13 +00:00
|
|
|
get "site_panel/setting" => "site_panel#setting"
|
|
|
|
patch "site_panel/update_setting" => "site_panel#update_setting"
|
2021-01-19 04:48:03 +00:00
|
|
|
get "site_panel/edit_site" => "site_panel#edit_site"
|
2020-04-28 13:26:49 +00:00
|
|
|
post "site_panel/edit_site" => "site_panel#edit_site"
|
2020-04-24 14:38:28 +00:00
|
|
|
get "site_panel/site_infos" => "site_panel#site_infos"
|
|
|
|
post "site_panel/site_infos" => "site_panel#site_infos"
|
|
|
|
post "site_panel/create_site" => "site_panel#create_site"
|
2021-01-19 04:48:03 +00:00
|
|
|
post "site_panel/create" => "site_panel#create"
|
|
|
|
patch "site_panel/create" => "site_panel#create"
|
2017-11-30 09:00:26 +00:00
|
|
|
get "site_panel" => "site_panel#index"
|
2020-04-24 14:38:28 +00:00
|
|
|
get "site_panel/sites_list" => "site_panel#sites_list"
|
|
|
|
get "site_panel/server_manager" => "site_panel#server_manager"
|
|
|
|
get "site_panel/edit_server_info" => "site_panel#edit_server_info"
|
|
|
|
post "site_panel/edit_server_info" => "site_panel#edit_server_info"
|
2021-08-11 08:16:14 +00:00
|
|
|
get "site_panel/install_certbot" => "site_panel#install_certbot"
|
|
|
|
post "site_panel/install_certbot" => "site_panel#install_certbot"
|
|
|
|
|
2021-02-25 07:09:28 +00:00
|
|
|
post "site_panel/update_cert_setting" => "site_panel#update_cert_setting"
|
2021-10-08 12:04:38 +00:00
|
|
|
post "site_panel/update_nginx_settings" => "site_panel#update_nginx_settings"
|
2021-04-19 01:29:53 +00:00
|
|
|
resources :site_panel do
|
|
|
|
delete 'destroy_cert'
|
|
|
|
get 'edit_cert'
|
|
|
|
post 'update_cert'
|
|
|
|
patch 'update_cert'
|
|
|
|
collection do
|
|
|
|
get 'cert_management'
|
|
|
|
get 'upload_cert'
|
|
|
|
get 'get_certs_for_site'
|
|
|
|
post 'create_cert'
|
|
|
|
patch 'create_cert'
|
|
|
|
end
|
2022-11-14 04:56:29 +00:00
|
|
|
member do
|
2022-12-02 05:12:54 +00:00
|
|
|
get 'backup_setting'
|
|
|
|
post 'update_backup_setting'
|
|
|
|
patch 'update_backup_setting'
|
2022-11-14 04:56:29 +00:00
|
|
|
get "super_manager_management"
|
|
|
|
patch "update_super_manager_management"
|
|
|
|
get "super_manager_management_for_site"
|
|
|
|
patch "update_super_manager_management_for_site"
|
|
|
|
end
|
2021-04-19 01:29:53 +00:00
|
|
|
end
|
2017-11-30 09:00:26 +00:00
|
|
|
|
2017-03-07 09:37:28 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
scope :cpanel do
|
|
|
|
get "sites" => "client_managements#index"
|
|
|
|
get "site/:site_uid" => "client_managements#show", as: "cpanel_site_show"
|
|
|
|
get "site/:site_uid/tickets" => "client_managements#site_tickets"
|
|
|
|
get "dofirstrun" => "client_managements#dofirstrun"
|
|
|
|
get "user_sites" => "client_managements#user_sites"
|
|
|
|
get "addsite" => "client_managements#addsite", as: "cpanel_add_site"
|
|
|
|
post "addsitestouser" => "client_managements#addsitestouser"
|
|
|
|
get "addnewsite" => "client_managements#addnewsite", as: "cpanel_add_new_site"
|
|
|
|
post "requestsite" => "client_managements#requestsite"
|
|
|
|
|
|
|
|
# profile
|
|
|
|
get "myprofile" => "client_managements#myprofile", as: "cpanel_myprofile"
|
|
|
|
patch "update_member_profile" => "client_managements#update_member_profile"
|
|
|
|
get "myprofilepassword" => "client_managements#myprofilepassword", as: "cpanel_myprofilepassword"
|
|
|
|
patch "update_member_profile_password" => "client_managements#update_member_profile_password"
|
|
|
|
|
2017-03-16 07:13:53 +00:00
|
|
|
# history
|
|
|
|
get "history" => "client_managements#history", as: "cpanel_myhistory"
|
2017-03-21 12:58:11 +00:00
|
|
|
get "contracts" => "client_managements#contracts", as: "cpanel_mycontracts"
|
2017-04-10 08:16:47 +00:00
|
|
|
get "purchases" => "client_managements#purchases", as: "cpanel_mypurchases"
|
2017-03-16 07:13:53 +00:00
|
|
|
get "request/:request_uid" => "client_managements#see_request"
|
2017-03-21 12:58:11 +00:00
|
|
|
get "contract/:contract_uid" => "client_managements#see_contract", as: "cpanel_contract_show"
|
|
|
|
patch "contract/:contract_uid/update_contract" => "client_managements#update_contract"
|
|
|
|
get "request/:request_uid/cancel" => "client_managements#cancel_request", as: "cpanel_cancel_request"
|
|
|
|
get "contract/:contract_uid/confirm" => "client_managements#confirm_contract"
|
2017-03-16 07:13:53 +00:00
|
|
|
|
2017-03-07 09:37:28 +00:00
|
|
|
# ticket
|
|
|
|
get "site/:site_uid/new_ticket" => "client_managements#new_ticket"
|
|
|
|
post "site/:site_uid/create_ticket" => "client_managements#create_ticket"
|
|
|
|
get "ticket/:ticket_id/close" => "client_managements#close_ticket"
|
|
|
|
get "ticket/:ticket_id/reopen" => "client_managements#reopen_ticket"
|
|
|
|
delete "ticket/:ticket_id/delete" => "client_managements#delete_ticket"
|
|
|
|
get "ticket/:ticket_id" => "client_managements#show_ticket", as: "cpanel_show_ticket"
|
|
|
|
post "ticket/:ticket_id/create_ticket_query" => "client_managements#create_ticket_query"
|
|
|
|
|
|
|
|
get "signup" => "c_panel_sessions#signup", as: "cpanel_signup"
|
|
|
|
post "create_user" => "c_panel_sessions#create_user"
|
|
|
|
get "login" => "c_panel_sessions#login", as: "cpanel_login"
|
|
|
|
get "logout" => "c_panel_sessions#logout", as: "cpanel_logout"
|
|
|
|
get "requestpassword" => "c_panel_sessions#requestpassword", as: "requestpassword"
|
|
|
|
post "instructions" => "c_panel_sessions#instructions"
|
|
|
|
get "reset_password" => "c_panel_sessions#reset_password", as: "cpanel_reset_password"
|
|
|
|
get "confirm_email" => "c_panel_sessions#confirm_email", as: "cpanel_confirm_email"
|
|
|
|
post "update_password" => "c_panel_sessions#update_cpanel_user_password"
|
|
|
|
post "loguserin" => "c_panel_sessions#loguserin"
|
|
|
|
|
|
|
|
end
|
2017-11-30 09:00:26 +00:00
|
|
|
|
|
|
|
get "/xhr/site_panel_api/get_list" => "site_panel_api#index"
|
|
|
|
get "/xhr/site_panel_api/constructed/:site_id" => "site_panel_api#constructed"
|
|
|
|
|
2017-03-07 09:37:28 +00:00
|
|
|
end
|
|
|
|
end
|