Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
Adding UI support for pv to pod relationship

adding PersistentVolume to HAS_ASSOCATION

refactor code

adding relationship to navbar

refactoring textual_persistent_volumes

works without the link

fixed listnav

fixing listanv
  • Loading branch information
nimrodshn committed Feb 7, 2018
1 parent 5ef59a5 commit 909739e
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 @@ -235,12 +235,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 909739e

Please sign in to comment.