diff --git a/lib/hammer_cli_katello/activation_key.rb b/lib/hammer_cli_katello/activation_key.rb index 2888ba6db..4b2ad3312 100644 --- a/lib/hammer_cli_katello/activation_key.rb +++ b/lib/hammer_cli_katello/activation_key.rb @@ -55,7 +55,7 @@ def request_params field :format_consumed, _("Host Limit") field :multi_content_view_environment, _("Multi Content View Environment"), Fields::Boolean field :release_version, _("Release Version"), Fields::Field, :hide_blank => true - field :content_view_environment_labels, _("Content View Environments"), Fields::Field + field :content_view_environment_labels, _("Content View Environment Labels"), Fields::Field collection :organization, _("Organization") do field :id, _("Id"), Fields::Field, :hide_blank => true diff --git a/lib/hammer_cli_katello/host_extensions.rb b/lib/hammer_cli_katello/host_extensions.rb index b7c58ac3d..d0837c2e4 100644 --- a/lib/hammer_cli_katello/host_extensions.rb +++ b/lib/hammer_cli_katello/host_extensions.rb @@ -26,12 +26,10 @@ module HostExtensions ::HammerCLIForeman::Host::ListCommand.instance_eval do output do from :content_facet_attributes do - from :content_view do - field :name, _('Content View'), Fields::List - end - from :lifecycle_environment do - field :name, _('Lifecycle environment'), Fields::List - end + field :content_view_environment_labels, _("Content View Environments"), + Fields::List, :max_width => 300 + field :multi_content_view_environment, + _("Multi Content View Environment"), Fields::Boolean from :errata_counts do field :security, _("Security"), nil, :sets => ['ALL'] field :bugfix, _("Bugfix"), nil, :sets => ['ALL'] @@ -46,7 +44,9 @@ module HostExtensions output do label _('Content Information') do from :content_facet_attributes do - collection :content_view_environments, _('Content view environments') do + field :content_view_environment_labels, + _("Content View Environment Labels"), Fields::Field + collection :content_view_environments, _('Content View Environments') do from :content_view do label _("Content view") do field :id, _("Id") @@ -60,6 +60,7 @@ module HostExtensions field :name, _("Name") end end + field :label, _("Label") end label _("Content Source") do diff --git a/test/functional/host/extensions/data/host_list.json b/test/functional/host/extensions/data/host_list.json index 6ee2bb78a..29e0588f8 100644 --- a/test/functional/host/extensions/data/host_list.json +++ b/test/functional/host/extensions/data/host_list.json @@ -95,6 +95,27 @@ "id":1, "name":"Library" }, + "content_view_environment_labels": "Library", + "multi_content_view_environment": false, + "content_view_environments": [ + { + "content_view": { + "id": 1, + "name": "Default Organization View", + "composite": false, + "content_view_version": "1.0", + "content_view_version_id": 1, + "content_view_version_latest": true, + "content_view_default": true + }, + "lifecycle_environment": { + "id": 1, + "name": "Library", + "lifecycle_environment_library": true + }, + "label": "Library" + } + ], "errata_counts":{ "security":0, "bugfix":0, diff --git a/test/functional/host/extensions/list_test.rb b/test/functional/host/extensions/list_test.rb index 75e3e92fe..51062b94f 100644 --- a/test/functional/host/extensions/list_test.rb +++ b/test/functional/host/extensions/list_test.rb @@ -13,8 +13,8 @@ result = run_cmd(@cmd) - fields = ['CONTENT VIEW', 'LIFECYCLE ENVIRONMENT', 'TRACE STATUS'] - values = ['Default Organization View', 'Library', 'updated'] + fields = ['CONTENT VIEW ENVIRONMENTS', 'MULTI CONTENT VIEW ENVIRONMENT', 'TRACE STATUS'] + values = ['Library', 'no', 'updated'] expected_result = success_result(IndexMatcher.new([fields, values])) assert_cmd(expected_result, result) end