Skip to content

Commit

Permalink
Merge pull request #3299 from nimrodshn/support_pv_to_pod_relationship
Browse files Browse the repository at this point in the history
Adding UI support for Pod to PersistentVolume relationship.
  • Loading branch information
himdel authored Feb 8, 2018
2 parents 7a41058 + 909739e commit 2341a39
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
13 changes: 7 additions & 6 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,13 @@ def controller_to_model
}.freeze

HAS_ASSOCATION = {
"groups" => "groups",
"users" => "users",
"event_logs" => "event_logs",
"OsProcess" => "processes",
"scan_histories" => "scan_histories",
"based_volumes" => "based_volumes"
"groups" => "groups",
"users" => "users",
"event_logs" => "event_logs",
"OsProcess" => "processes",
"scan_histories" => "scan_histories",
"based_volumes" => "based_volumes",
"PersistentVolume" => "persistent_volumes"
}.freeze

def model_to_report_data
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/container_group_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def textual_group_relationships
_("Relationships"),
%i(
ems container_project container_services container_replicator containers container_node
lives_on container_images
lives_on container_images persistent_volumes
)
)
end
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/container_summary_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def textual_persistent_volume
end

def textual_persistent_volumes
textual_link(@record.persistent_volumes)
textual_link(@record.persistent_volumes, :as => PersistentVolume)
end

def textual_parent
Expand Down
2 changes: 1 addition & 1 deletion app/views/container_group/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- if %w(containers container_services container_images).include?(@display)
- if %w(containers container_services container_images persistent_volumes).include?(@display)
= render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@record.id}"}
- else
- case @showtype
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/listnav/_container_group.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@
= multiple_relationship_link(@record, :container)
= multiple_relationship_link(@record, :container_image)
= single_relationship_link(@record, :container_node)
= multiple_relationship_link(@record, :persistent_volume)

0 comments on commit 2341a39

Please sign in to comment.