diff --git a/app/controllers/ops_controller/settings/label_tag_mapping.rb b/app/controllers/ops_controller/settings/label_tag_mapping.rb index 608d3f356d0..7fefc31d9b1 100644 --- a/app/controllers/ops_controller/settings/label_tag_mapping.rb +++ b/app/controllers/ops_controller/settings/label_tag_mapping.rb @@ -51,10 +51,19 @@ def label_tag_mapping_edit end def entity_ui_name_or_all(entity) - if entity.nil? - _("") + 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) + _("") end end