Skip to content

Commit

Permalink
Container Volumes should honour tag visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
zakiva committed Mar 27, 2017
1 parent af3e861 commit c80cefa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 74 deletions.
39 changes: 6 additions & 33 deletions app/helpers/application_helper/toolbar/persistent_volume_center.rb
Original file line number Diff line number Diff line change
@@ -1,44 +1,17 @@
class ApplicationHelper::Toolbar::PersistentVolumeCenter < ApplicationHelper::Toolbar::Basic
button_group('persistent_volume_vmdb', [
select(
:persistent_volume_vmdb_choice,
nil,
t = N_('Configuration'),
t,
:image => "vmdb",
:items => [
button(
:persistent_volume_edit,
nil,
t = N_('Edit this Volume'),
t,
:image => "edit",
:url => "/edit"),
button(
:persistent_volume_delete,
nil,
t = N_('Remove this Volume'),
t,
:image => "delete",
:url_parms => "&refresh=y",
:confirm => N_("Warning: This Volume and ALL of its components will be permanently removed!")),
]
),
])
button_group('persistent_group_policy', [
button_group('persistent_volume_policy', [
select(
:persistent_volume_policy_choice,
nil,
'fa fa-shield fa-lg',
t = N_('Policy'),
t,
:image => "policy",
:items => [
button(
:persistent_volume_tag,
nil,
N_('Edit Tags for this Volume'),
N_('Edit Tags'),
:image => "tag"),
'pficon pficon-edit fa-lg',
N_('Edit Tags for this Persistent Volume'),
N_('Edit Tags')
),
]
),
])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,18 @@
class ApplicationHelper::Toolbar::PersistentVolumesCenter < ApplicationHelper::Toolbar::Basic
button_group('persistent_volume_vmdb', [
select(
:persistent_volume_vmdb_choice,
nil,
t = N_('Configuration'),
t,
:image => "vmdb",
:items => [
button(
:persistent_volume_new,
nil,
t = N_('Add a New Volume'),
t,
:image => "new",
:url => "/new",
:klass => ApplicationHelper::Button::ButtonNewDiscover),
button(
:persistent_volume_edit,
nil,
N_('Select a single Volume to edit'),
N_('Edit Selected Volume'),
:image => "edit",
:url_parms => "main_div",
:onwhen => "1"),
button(
:persistent_volume_delete,
nil,
N_('Remove selected Volumes'),
N_('Remove Volumes'),
:image => "remove",
:url_parms => "main_div",
:confirm => N_("Warning: The selected Volumes and ALL of their components will be permanently removed!"),
:onwhen => "1+"),
]
),
])
button_group('persistent_volume_policy', [
select(
:persistent_volume_policy_choice,
nil,
'fa fa-shield fa-lg',
t = N_('Policy'),
t,
:image => "policy",
:enabled => false,
:onwhen => "1+",
:items => [
button(
:persistent_volume_tag,
nil,
N_('Edit Tags for this Volumes'),
'pficon pficon-edit fa-lg',
N_('Edit Tags for these Persistent Volumes'),
N_('Edit Tags'),
:image => "tag",
:url_parms => "main_div",
:enabled => false,
:onwhen => "1+"),
Expand Down
1 change: 1 addition & 0 deletions app/helpers/application_helper/toolbar_chooser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ def center_toolbar_filename_classic
container_group
container_node
container_service
persistent_volume
ems_cloud
ems_cluster
ems_container
Expand Down

0 comments on commit c80cefa

Please sign in to comment.