Skip to content

Commit

Permalink
Fixes #36970 - Add missing repo info content counts
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Jan 8, 2024
1 parent 3b5cce2 commit dc9dfa0
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 27 deletions.
42 changes: 28 additions & 14 deletions lib/hammer_cli_katello/capsule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 28 additions & 11 deletions lib/hammer_cli_katello/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/functional/repository/info_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']]
Expand Down Expand Up @@ -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']]
Expand Down

0 comments on commit dc9dfa0

Please sign in to comment.