Skip to content

Commit

Permalink
Add Ownership info to Textual summary
Browse files Browse the repository at this point in the history
  • Loading branch information
PanSpagetka committed Aug 13, 2019
1 parent 5b6f8e7 commit 5accb14
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/auth_key_pair_cloud_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def process_deletions(key_pairs)
private

def textual_group_list
[%i[properties relationships], %i[tags]]
[%i[properties relationships lifecycle], %i[tags]]
end
helper_method :textual_group_list

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ApplicationHelper::Toolbar::AuthKeyPairCloudsCenter < ApplicationHelper::T
:klass => ApplicationHelper::Button::AuthKeyPairCloudCreate),
separator,
button(
:key_pair_ownership,
:auth_key_pair_ownership,
'pficon pficon-user fa-lg',
N_('Set Ownership for the selected items'),
N_('Set Ownership'),
Expand Down
15 changes: 15 additions & 0 deletions app/helpers/auth_key_pair_cloud_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,19 @@ def textual_vms
end
h
end

def textual_group_lifecycle
TextualGroup.new(
_("Lifecycle"),
%i[owner group]
)
end

def textual_owner
@record.evm_owner.try(:name)
end

def textual_group
{:label => _("Group"), :value => @record.miq_group.try(:description)}
end
end

0 comments on commit 5accb14

Please sign in to comment.