ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
1 hr
Test Coverage
A
100%
class ApplicationHelper::Toolbar::FloatingIpCenter < ApplicationHelper::Toolbar::Basic
  button_group(
    'floating_ip_vmdb',
    [
      select(
        :floating_ip_vmdb_choice,
        nil,
        t = N_('Configuration'),
        t,
        :items => [
          button(
            :floating_ip_edit,
            'pficon pficon-edit fa-lg',
            t = N_('Manage the port association of this Floating'),
            t,
            :url_parms    => 'main_div',
            :send_checked => true,
            :klass        => ApplicationHelper::Button::GenericFeatureButtonWithDisable,
            :options      => {:feature => :update}
          ),
          button(
            :floating_ip_delete,
            'pficon pficon-delete fa-lg',
            t = N_('Delete this Floating IP'),
            t,
            :url_parms    => 'main_div',
            :send_checked => true,
            :confirm      => N_('Warning: This Floating IP and ALL of its components will be removed!'),
            :klass        => ApplicationHelper::Button::GenericFeatureButtonWithDisable,
            :options      => {:feature => :delete}
          )
        ]
      )
    ]
  )
  button_group(
    'floating_ip_policy',
    [
      select(
        :floating_ip_policy_choice,
        nil,
        t = N_('Policy'),
        t,
        :items => [
          button(
            :floating_ip_tag,
            'pficon pficon-edit fa-lg',
            N_('Edit Tags for this Floating IP'),
            N_('Edit Tags')
          )
        ]
      )
    ]
  )
end