Prepare to support ruby 3.3.
This commit is contained in:
parent
2d0d00f8ba
commit
b301e04fac
|
@ -9,7 +9,7 @@ class Admin::BoxController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
is_not_open = `fuser #{SocketFile}`.gsub(/\n/, '').empty?
|
is_not_open = `fuser #{SocketFile}`.gsub(/\n/, '').empty?
|
||||||
if !File.exists?(SocketFile) || `ss -elx | grep -w "$(stat -c 'ino:%i dev:0/%d' '#{SocketFile}')"`.blank?
|
if !File.exist?(SocketFile) || `ss -elx | grep -w "$(stat -c 'ino:%i dev:0/%d' '#{SocketFile}')"`.blank?
|
||||||
Thread.new do
|
Thread.new do
|
||||||
`#{Binary} --unixdomain-only #{SocketFile}:$USER:$USER:0666 --disable-ssl --debug --css #{CSSFile}`
|
`#{Binary} --unixdomain-only #{SocketFile}:$USER:$USER:0666 --disable-ssl --debug --css #{CSSFile}`
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,80 +1,82 @@
|
||||||
module ClientManagement
|
module ClientManagement
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
initializer "client_management" do
|
initializer "client_management" do
|
||||||
OrbitApp.registration "client_management", :type => "ModuleApp" do
|
Rails.application.config.to_prepare do
|
||||||
module_label "client_management.client_management"
|
OrbitApp.registration "client_management", :type => "ModuleApp" do
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
module_label "client_management.client_management"
|
||||||
categorizable
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
authorizable
|
categorizable
|
||||||
taggable "SiteServer"
|
authorizable
|
||||||
# frontend_enabled
|
taggable "SiteServer"
|
||||||
# data_count 1..30
|
# frontend_enabled
|
||||||
require File.expand_path('../../../app/models/server_ability', __FILE__)
|
# data_count 1..30
|
||||||
require File.expand_path('../../../app/models/plow_setting', __FILE__)
|
require File.join(ClientManagement::Engine.root, 'app/models/server_ability')
|
||||||
if ServerAbility.count==0
|
require File.join(ClientManagement::Engine.root, 'app/models/plow_setting')
|
||||||
ServerAbility.create()
|
if ServerAbility.count==0
|
||||||
end
|
ServerAbility.create()
|
||||||
if PlowSetting.count==0
|
end
|
||||||
PlowSetting.create()
|
if PlowSetting.count==0
|
||||||
end
|
PlowSetting.create()
|
||||||
set_keyword_contstraints ["/cpanel/"]
|
end
|
||||||
side_bar do
|
set_keyword_contstraints ["/cpanel/"]
|
||||||
head_label_i18n 'client_management.client_management', icon_class: "icons-users"
|
side_bar do
|
||||||
available_for "admin"
|
head_label_i18n 'client_management.client_management', icon_class: "icons-users"
|
||||||
active_for_controllers (['admin/site_panels'])
|
available_for "admin"
|
||||||
head_link_path "admin_site_panel_server_manager_path"
|
active_for_controllers (['admin/site_panels'])
|
||||||
|
head_link_path "admin_site_panel_server_manager_path"
|
||||||
|
|
||||||
context_link 'client_management.new_requests',
|
context_link 'client_management.new_requests',
|
||||||
:link_path=>"admin_client_managements_path" ,
|
:link_path=>"admin_client_managements_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/client_managements'=>"index"},
|
:active_for_action=>{'admin/client_managements'=>"index"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
|
||||||
context_link 'client_management.completed_requests',
|
context_link 'client_management.completed_requests',
|
||||||
:link_path=>"completed_requests_admin_client_managements_path" ,
|
:link_path=>"completed_requests_admin_client_managements_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/client_managements'=>"completed_requests"},
|
:active_for_action=>{'admin/client_managements'=>"completed_requests"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
|
||||||
context_link 'client_management.contracts',
|
context_link 'client_management.contracts',
|
||||||
:link_path=>"contracts_admin_client_managements_path" ,
|
:link_path=>"contracts_admin_client_managements_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/client_managements'=>"contracts"},
|
:active_for_action=>{'admin/client_managements'=>"contracts"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
|
||||||
context_link 'client_management.setting',
|
context_link 'client_management.setting',
|
||||||
:link_path=>"admin_site_panel_setting_path" ,
|
:link_path=>"admin_site_panel_setting_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/site_panel'=>"setting"},
|
:active_for_action=>{'admin/site_panel'=>"setting"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
context_link 'client_management.cert_management',
|
context_link 'client_management.cert_management',
|
||||||
:link_path=>"cert_management_admin_site_panel_index_path" ,
|
:link_path=>"cert_management_admin_site_panel_index_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/site_panel'=>"cert_management"},
|
:active_for_action=>{'admin/site_panel'=>"cert_management"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
context_link 'client_management.create_site',
|
context_link 'client_management.create_site',
|
||||||
:link_path=>"admin_site_panel_path" ,
|
:link_path=>"admin_site_panel_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/site_panel'=>"index"},
|
:active_for_action=>{'admin/site_panel'=>"index"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
|
||||||
context_link 'client_management.sites_list',
|
context_link 'client_management.sites_list',
|
||||||
:link_path=>"admin_site_panel_sites_list_path" ,
|
:link_path=>"admin_site_panel_sites_list_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/site_panel'=>"sites_list"},
|
:active_for_action=>{'admin/site_panel'=>"sites_list"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
|
||||||
context_link 'client_management.server_manager',
|
context_link 'client_management.server_manager',
|
||||||
:link_path=>"admin_site_panel_server_manager_path" ,
|
:link_path=>"admin_site_panel_server_manager_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/site_panel'=>"server_manager"},
|
:active_for_action=>{'admin/site_panel'=>"server_manager"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
|
||||||
context_link 'client_management.stress_test',
|
context_link 'client_management.stress_test',
|
||||||
:link_path=>"admin_plow_setting_path" ,
|
:link_path=>"admin_plow_setting_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/plow'=>"setting"},
|
:active_for_action=>{'admin/plow'=>"setting"},
|
||||||
:available_for => 'admin'
|
:available_for => 'admin'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue