Uniq Identifier Refered by @host.uuid in script
diff --git a/src/autogen/app/controllers/engine_controller.rb b/src/autogen/app/controllers/engine_controller.rb index 351fc81..097a6b4 100644 --- a/src/autogen/app/controllers/engine_controller.rb +++ b/src/autogen/app/controllers/engine_controller.rb @@ -126,15 +126,18 @@ class EngineController < ApplicationController @host.save! end end - # Only allow a list of trusted parameters through. + # Only allow a list of trusted parameters through. def host_params params.require(:host).permit(:uuid, :hostname, :ip, :status, :mac, :discover, :installed, :interface , :installtemplate, :site , :installtemplate_id, :site_id, :rootaccount_id, :mainaccount_id,:toinstall, :install_ip, :filename, :access_ip, :product, :serial,:p,:s) end def get_uri(site) + result="" if site.api_url.empty? - return "http://#{site.api_ip}:#{site.api_port}" + result="http://#{site.api_ip}:#{site.api_port}" else - return site.api_url + result=site.api_url end + return result end +end diff --git a/src/autogen/app/controllers/hosts_controller.rb b/src/autogen/app/controllers/hosts_controller.rb index 3c87804..5cbae86 100644 --- a/src/autogen/app/controllers/hosts_controller.rb +++ b/src/autogen/app/controllers/hosts_controller.rb @@ -146,6 +146,6 @@ class HostsController < ApplicationController # Only allow a list of trusted parameters through. def host_params - params.require(:host).permit(:uuid, :hostname, :ip, :install_ip,:access_ip,:status, :mac, :discover, :installed, :interface , :installtemplate, :site , :installtemplate_id, :site_id, :rootaccount_id, :mainaccount_id,:toinstall, :lusk_key,:lusk_device, :lusk_encrypt, :host_device) + params.require(:host).permit(:uuid, :hostname, :ip, :install_ip,:access_ip,:status, :mac, :discover, :installed, :interface , :installtemplate, :site , :installtemplate_id, :site_id, :rootaccount_id, :mainaccount_id,:toinstall, :lusk_key,:lusk_device, :lusk_encrypt, :host_device,:lang) end end diff --git a/src/autogen/app/models/host.rb b/src/autogen/app/models/host.rb index 872198b..06453a7 100644 --- a/src/autogen/app/models/host.rb +++ b/src/autogen/app/models/host.rb @@ -20,7 +20,8 @@ class Host field :lastpostinstallgenerated, type: String, default: '' field :lusk_encrypt, type: Mongoid::Boolean, default: false field :lusk_device, type: String, default: '' - field :lusk_key, type: String, default: 'a changer' + field :lusk_key, type: String, default: '' + field :lang , type: String, default: '' belongs_to :installtemplate , class_name: "Installtemplate", inverse_of: :hostreferences belongs_to :site , class_name: "Site", inverse_of: :sitereferences belongs_to :rootaccount , class_name: "Account", inverse_of: :rootref diff --git a/src/autogen/app/views/hosts/_form.html.erb b/src/autogen/app/views/hosts/_form.html.erb index 4fee4a5..414e198 100644 --- a/src/autogen/app/views/hosts/_form.html.erb +++ b/src/autogen/app/views/hosts/_form.html.erb @@ -21,8 +21,9 @@
Uniq Identifier Refered by @host.uuid in script
Bios product info, Refered by @host.product in script
+ @@ -49,6 +52,7 @@Bios serial info, Refered by @host.serial in script
@@ -62,6 +66,8 @@hostname, Refered by @host.hostname in script
+ @@ -76,6 +82,7 @@ip of host, Refered by @host.ip in script
@@ -90,6 +97,7 @@Last detected ip of host, Refered by @host.access_ip in script
@@ -103,6 +111,7 @@Ip during install of host, Refered by @host.install_ip in script
@@ -116,6 +125,7 @@Host status, Refered by @host.status in script
@@ -129,6 +139,7 @@MAc Adress, Refered by @host.mac in script
@@ -141,6 +152,7 @@Default host disk, Refered by @host.host_device in script
@@ -148,14 +160,20 @@Active Lusk encryption, Refered by @host.lusk_encrypt in script
+Partition to encrypt, Refered by @host.lusk_device in script
+Lusk encrypt key, Refered by @host.lusk_key in script
+Host interface name, Refered by @host.interface in script
+ @@ -181,20 +201,27 @@Template to install, Refered by @host.installtemplate in script
-Host location, Refered by @host.site in script
+Install Langage, Refered by @host.lang in script
Root account , Refered by @host.rootaccount in script
Main user account , Refered by @host.mainaccount in script