Skip to content

Commit

Permalink
Drop append domain names setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dyrkon committed Feb 2, 2023
1 parent 9519609 commit b8d12f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/api/v2/hosts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def index
param :show_hidden_parameters, :bool, :desc => N_("Display hidden parameter values")

def show
@host.name = @host.name.split(".")[0]
@parameters = true
@all_parameters = true
end
Expand Down
5 changes: 5 additions & 0 deletions app/models/host/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def dup
:domain=, :domain_id=, :domain_name=, :to => :primary_interface

attr_writer :updated_virtuals

def updated_virtuals
@updated_virtuals ||= []
end
Expand Down Expand Up @@ -351,6 +352,10 @@ def render_template(template:, **params)
template.render(host: self, **params)
end

def to_s
name.to_s.split('.')[0]
end

private

def parse_ip_address(address, ignore_link_local: true)
Expand Down

0 comments on commit b8d12f7

Please sign in to comment.