From 0756b9d86e52dbf5a7a000551d2b4c893f456c17 Mon Sep 17 00:00:00 2001 From: ianballou Date: Thu, 7 Dec 2023 18:18:37 +0000 Subject: [PATCH] Fixes #36970 - Add missing repo info content counts --- lib/hammer_cli_katello/capsule.rb | 42 ++++++++++++++++--------- lib/hammer_cli_katello/repository.rb | 39 ++++++++++++++++------- test/functional/repository/info_test.rb | 4 +-- 3 files changed, 58 insertions(+), 27 deletions(-) diff --git a/lib/hammer_cli_katello/capsule.rb b/lib/hammer_cli_katello/capsule.rb index 28657973..6f620f50 100644 --- a/lib/hammer_cli_katello/capsule.rb +++ b/lib/hammer_cli_katello/capsule.rb @@ -191,20 +191,34 @@ class InfoCommand < HammerCLIKatello::InfoCommand field :name, _("Repository Name") label _('Content Counts') do from :_content_counts do - field :warning, _('Warning') - field :rpm, _('Packages') - field :srpm, _('SRPMs') - field :module_stream, _('Module Streams') - field :package_group, _('Package Groups') - field :erratum, _('Errata') - field :deb, _('Debian Packages') - field :docker_tag, _('Container Tags') - field :docker_manifest, _('Container Manifests') - field :docker_manifest_list, _('Container Manifest Lists') - field :file, _('Files') - field :ansible_collection, _('Ansible Collections') - field :ostree_ref, _('OSTree Refs') - field :python_package, _('Python Packages') + field :warning, _('Warning'), Fields::Field, + :hide_blank => true + field :rpm, _('Packages'), Fields::Field, + :hide_blank => true + field :srpm, _('SRPMs'), Fields::Field, + :hide_blank => true + field :module_stream, _('Module Streams'), Fields::Field, + :hide_blank => true + field :package_group, _('Package Groups'), Fields::Field, + :hide_blank => true + field :erratum, _('Errata'), Fields::Field, + :hide_blank => true + field :deb, _('Debian Packages'), Fields::Field, + :hide_blank => true + field :docker_tag, _('Container Tags'), Fields::Field, + :hide_blank => true + field :docker_manifest, _('Container Manifests'), Fields::Field, + :hide_blank => true + field :docker_manifest_list, _('Container Manifest Lists'), Fields::Field, + :hide_blank => true + field :file, _('Files'), Fields::Field, + :hide_blank => true + field :ansible_collection, _('Ansible Collections'), Fields::Field, + :hide_blank => true + field :ostree_ref, _('OSTree Refs'), Fields::Field, + :hide_blank => true + field :python_package, _('Python Packages'), Fields::Field, + :hide_blank => true end end end diff --git a/lib/hammer_cli_katello/repository.rb b/lib/hammer_cli_katello/repository.rb index d70302d9..e21adb32 100644 --- a/lib/hammer_cli_katello/repository.rb +++ b/lib/hammer_cli_katello/repository.rb @@ -116,17 +116,34 @@ class InfoCommand < HammerCLIKatello::InfoCommand field :updated_at, _("Updated"), Fields::Date label _("Content Counts") do - field :package_total, _("Packages"), Fields::Field, :hide_blank => true - field :srpm_total, _("Source RPMS"), Fields::Field, :hide_blank => true - field :package_group_total, _("Package Groups"), Fields::Field, :hide_blank => true - field :errata_total, _("Errata"), Fields::Field, :hide_blank => true - field :docker_manifest_list_total, _("Container Image Manifest Lists"), - Fields::Field, :hide_blank => true - field :docker_manifest_total, _("Container Image Manifests"), Fields::Field, - :hide_blank => true - field :docker_tag_total, _("Container Image Tags"), Fields::Field, :hide_blank => true - field :file_total, _("Files"), Fields::Field, :hide_blank => true - field :module_stream_total, _("Module Streams"), Fields::Field, :hide_blank => true + from :content_counts do + field :rpm, _('Packages'), Fields::Field, + :hide_blank => true + field :srpm, _('SRPMs'), Fields::Field, + :hide_blank => true + field :module_stream, _('Module Streams'), Fields::Field, + :hide_blank => true + field :package_group, _('Package Groups'), Fields::Field, + :hide_blank => true + field :erratum, _('Errata'), Fields::Field, + :hide_blank => true + field :deb, _('Debian Packages'), Fields::Field, + :hide_blank => true + field :docker_tag, _('Container Tags'), Fields::Field, + :hide_blank => true + field :docker_manifest, _('Container Manifests'), Fields::Field, + :hide_blank => true + field :docker_manifest_list, _('Container Manifest Lists'), Fields::Field, + :hide_blank => true + field :file, _('Files'), Fields::Field, + :hide_blank => true + field :ansible_collection, _('Ansible Collections'), Fields::Field, + :hide_blank => true + field :ostree_ref, _('OSTree Refs'), Fields::Field, + :hide_blank => true + field :python_package, _('Python Packages'), Fields::Field, + :hide_blank => true + end end end diff --git a/test/functional/repository/info_test.rb b/test/functional/repository/info_test.rb index a38f7479..38110929 100644 --- a/test/functional/repository/info_test.rb +++ b/test/functional/repository/info_test.rb @@ -69,7 +69,7 @@ ['Updated', '2020/08/05 15:35:36'], ['Content Counts', ''], ['Packages', '1'], - ['Source RPMS', '0'], + ['SRPMs', '0'], ['Package Groups', '0'], ['Errata', '1'], ['Module Streams', '0']] @@ -145,7 +145,7 @@ ['Updated', '2020/08/05 15:35:36'], ['Content Counts', ''], ['Packages', '1'], - ['Source RPMS', '0'], + ['SRPMs', '0'], ['Package Groups', '0'], ['Errata', '1'], ['Module Streams', '0']]