ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/toolbar/container_images_center.rb

Summary

Maintainability
A
1 hr
Test Coverage
A
100%
class ApplicationHelper::Toolbar::ContainerImagesCenter < ApplicationHelper::Toolbar::Basic
  button_group('container_image_vmdb', [
    select(
      :container_image_vmdb_choice,
      nil,
      t = N_('Configuration'),
      t,
      :items => [
        button(
          :container_image_scan,
          'fa fa-search fa-lg',
          N_('Perform SmartState Analysis on the selected items'),
          N_('Perform SmartState Analysis'),
          :url_parms    => "main_div",
          :send_checked => true,
          :confirm      => N_("Perform SmartState Analysis on the selected items?"),
          :klass        => ApplicationHelper::Button::SmartStateScan,
          :enabled      => false,
          :onwhen       => "1+"),
      ]
    ),
  ])
  button_group('container_image_policy', [
    select(
      :container_image_policy_choice,
      nil,
      t = N_('Policy'),
      t,
      :enabled => false,
      :onwhen  => "1+",
      :items   => [
        button(
          :container_image_tag,
          'pficon pficon-edit fa-lg',
          N_('Edit Tags for the selected items'),
          N_('Edit Tags'),
          :url_parms    => "main_div",
          :send_checked => true,
          :enabled      => false,
          :onwhen       => "1+"),
        button(
          :container_image_protect,
          'pficon pficon-edit fa-lg',
          N_('Manage Policies for this Container Image'),
          N_('Manage Policies'),
          :url_parms    => "main_div",
          :send_checked => true,
          :enabled      => "false",
          :onwhen       => "1+"),
        button(
          :container_image_check_compliance,
          'fa fa-search fa-lg',
          N_('Check Compliance of the last known configuration for the selected items'),
          N_('Check Compliance of Last Known Configuration'),
          :url_parms    => "main_div",
          :send_checked => true,
          :confirm      => N_("Initiate Check Compliance of the last known configuration for the selected items?"),
          :enabled      => "false",
          :onwhen       => "1+")
      ]
    ),
  ])
end