<% stylesheet 'foreman_virt_who_configure/config' %> <% javascript 'foreman_virt_who_configure/config_copy_and_paste' %> <% title(_("Virt-who Configuration %s") % @config.name) %> <%= title_actions( display_link_if_authorized(_('Edit'), hash_for_edit_foreman_virt_who_configure_config_path(@config).merge(:permission => 'edit_virt_who_config', :auth_object => @config), :class => 'btn btn-default'), display_delete_if_authorized(hash_for_foreman_virt_who_configure_config_path(@config).merge(:permission => 'destroy_virt_who_config', :auth_object => @config), :class => 'btn btn-default', :data => {:confirm => _("Delete virt-who configuration %s?") % config.name}) ) %> <%= breadcrumbs(:resource_url => foreman_virt_who_configure_api_configs_path, :items => [ { :caption => _('Virt-who Configurations'), :url => foreman_virt_who_configure_configs_path }, { :caption => @config.name } ] ) %>

<%= _('Details') %>

<%= config_attribute :status, config_report_status(@config), _('Status') %> <%= config_attribute :hypervisor_type, _(ForemanVirtWhoConfigure::Config::HYPERVISOR_TYPES[@config.hypervisor_type]) %> <%= config_attribute :hypervisor_server, @config.hypervisor_server %> <%= config_attribute :hypervisor_username, @config.hypervisor_username if @config.hypervisor_type != 'kubevirt' %> <%= config_attribute :interval, _(ForemanVirtWhoConfigure::Config::AVAILABLE_INTERVALS[@config.interval.to_s]) %> <%= config_attribute :satellite_url, @config.satellite_url, _('Foreman server FQDN')%> <%= config_attribute :hypervisor_id, @config.hypervisor_id, _('Hypervisor ID') %> <%= config_attribute :listing_mode, _(ForemanVirtWhoConfigure::Config::FILTERING_MODES[@config.listing_mode.to_s]), _('Filtering') %> <% if @config.listing_mode == ForemanVirtWhoConfigure::Config::WHITELIST %> <%= config_attribute :whitelist, @config.whitelist, _('Filter Hosts') if @config.whitelist.present? %> <%= config_attribute :filter_host_parents, @config.filter_host_parents if @config.filter_host_parents.present? %> <% end %> <% if @config.listing_mode == ForemanVirtWhoConfigure::Config::BLACKLIST %> <%= config_attribute :blacklist, @config.blacklist, _('Exclude Hosts') if @config.blacklist.present? %> <%= config_attribute :exclude_host_parents, @config.exclude_host_parents if @config.exclude_host_parents.present? %> <% end %> <%= config_attribute :debug, checked_icon(@config.debug), _('Enable debugging output?') %> <%= config_attribute :http_proxy_id, @config.http_proxy.full_url, _('HTTP Proxy') if @config.http_proxy.present? %> <%= config_attribute :no_proxy, @config.no_proxy, _('Ignore Proxy') if @config.no_proxy.present? %> <%= config_attribute :kubeconfig_path, @config.kubeconfig_path if @config.hypervisor_type == 'kubevirt' %>
<%= _("Use either hammer command or the script below to deploy this configuration. Both require root privileges. Run one of them on the target host which has access to katello-host-tools repository and will run virt-who reporting, preferably Foreman host:") %>

<%= 'a) ' + _('Hammer command: ') %>

<%= @config.virt_who_config_command %>
<%= link_to _('Copy to clipboard'), nil, :class => 'btn btn-default', :onclick => 'virt_who_copy_configuration_to_clipboard($("#config_command").html()); return false' %>

<%= 'b) ' + _('Configuration script: ') %>

<%= _("On the target virt-who host:") %>
<%= _("1. Copy this configuration script to a safe directory.") %>
<%= _("2. Make the script executable and run it.") %>
<%= _("3. Delete the script.") %>

<%= @config.virt_who_config_script %>
<%= link_to _('Copy to clipboard'), nil, :class => 'btn btn-default', :onclick => 'virt_who_copy_configuration_to_clipboard($("#config_script").html()); return false' %> <%= link_to _('Download the script'), deploy_script_foreman_virt_who_configure_config_path(@config), :class => 'btn btn-default' %>