Class: HammerCLIKatello::ContentViewComponent::ListCommand

Inherits:
ListCommand
  • Object
show all
Includes:
HammerCLIKatello::CompositeContentViewNameResolvable, OrganizationOptions
Defined in:
lib/hammer_cli_katello/content_view_component.rb

Instance Method Summary collapse

Methods included from HammerCLIKatello::CompositeContentViewNameResolvable

#composite_content_view_resolve_options, included, #options

Methods included from OrganizationOptions

included, #org_options

Methods inherited from ListCommand

build_options

Methods included from ResolverCommons

included

Instance Method Details

#extend_data(mod) ⇒ Object



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/hammer_cli_katello/content_view_component.rb', line 95

def extend_data(mod)
  if mod['latest']
    mod['version'] = _("Latest")
    if mod['content_view_version']
      mod['current_version'] = mod['content_view_version']['version']
      mod['version_id'] = "#{mod['content_view_version']['id']} (#{_('Latest')})"
    else
      mod['current_version'] = _("No Published Version")
    end
  else
    mod['version'] = mod['content_view_version']['version']
    mod['version_id'] = mod['content_view_version']['id']
  end
  mod['content_view_name'] = mod["content_view"]["name"]
  mod['content_view_id'] = mod["content_view"]["id"]
  mod
end