Skip to content

Commit

Permalink
Merge pull request #780 from djberg96/label_tag_mapping
Browse files Browse the repository at this point in the history
Fix UI mapping for label tag mapping.
  • Loading branch information
h-kataria authored Mar 27, 2017
2 parents 2204d5e + 27439ab commit 60e0707
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions app/controllers/ops_controller/settings/label_tag_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,19 @@ def label_tag_mapping_edit
end

def entity_ui_name_or_all(entity)
if entity.nil?
_("<All>")
if entity
provider, model = entity.split('::')

case model
when 'Vm'
model = "ManageIQ::Providers::#{provider}::CloudManager::Vm"
when 'Image'
model = "ManageIQ::Providers::#{provider}::CloudManager::Template"
end

ui_lookup(:model => model)
else
ui_lookup(:model => entity)
_("<All>")
end
end

Expand Down

0 comments on commit 60e0707

Please sign in to comment.