{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/44321823","id":44321823,"diff_hunk":"@@ -24,6 +24,42 @@ def miq_accordion_panel(title, condition, id, &block)\n     end\n   end\n \n+  def single_relationship_link(record, table_name, property_name = nil)\n+    out = ''\n+    property_name ||= table_name\n+    ent = record.send(property_name)\n+    name = ui_lookup(:table => table_name.to_s)\n+    if role_allows(:feature => \"#{table_name}_show\") && !ent.nil?\n+      out = content_tag(:li) do\n+        link_to(\"#{name}: #{ent.name}\",\n+                {:controller => table_name, :action => 'show', :id => ent.id.to_s},\n+                :title => _(\"Show this #{record.class.name.demodulize.titleize}'s parent #{name}\"))\n+      end\n+    end\n+    out\n+  end\n+\n+  def multiple_relationship_link(record, table_name)\n+    out = ''\n+    if role_allows(:feature => \"#{table_name}_show_list\") &&\n+       (table_name != 'container_route' || record.respond_to?(:container_routes))\n+      plural = ui_lookup(:tables => table_name.to_s)\n+      count = record.number_of(table_name.to_s.pluralize)\n+      if count == 0\n+        out = content_tag(:li, :class => \"disabled\") do\n+          link_to(\"#{plural} (0)\", \"#\")\n+        end\n+      else\n+        out = content_tag(:li) do\n+          link_to(\"#{plural} (#{count})\",\n+                  {:action  => 'show', :id => @record, :display => table_name.to_s.pluralize},\n+                  :title => _(\"Show #{plural}\"))\n+        end\n+      end\n+    end\n+    out\n+  end\n+","path":"app/helpers/application_helper.rb","position":20,"original_position":39,"commit_id":"35949cd59972aa325d75907c2312162218c25686","original_commit_id":"2c48d29d53f1018f9ac66338e077310276395ef8","user":{"login":"blomquisg","id":14183,"avatar_url":"https://avatars.githubusercontent.com/u/14183?v=3","gravatar_id":"","url":"https://api.github.com/users/blomquisg","html_url":"https://github.com/blomquisg","followers_url":"https://api.github.com/users/blomquisg/followers","following_url":"https://api.github.com/users/blomquisg/following{/other_user}","gists_url":"https://api.github.com/users/blomquisg/gists{/gist_id}","starred_url":"https://api.github.com/users/blomquisg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blomquisg/subscriptions","organizations_url":"https://api.github.com/users/blomquisg/orgs","repos_url":"https://api.github.com/users/blomquisg/repos","events_url":"https://api.github.com/users/blomquisg/events{/privacy}","received_events_url":"https://api.github.com/users/blomquisg/received_events","type":"User","site_admin":false},"body":"I'm a bit confused by this.\r\n\r\nI can't tell if this was wrong to begin with, or what...  It's possible it was.  But, the [`miq_product_features.yml`](https://github.com/moolitayer/manageiq/blob/35949cd59972aa325d75907c2312162218c25686/db/fixtures/miq_product_features.yml#L3164-L3167) contained the `container_node_show` feature even though the original code (shown in my [comment above](https://github.com/ManageIQ/manageiq/pull/5029/files#r43759738)) called the feature `container_node`.\r\n\r\nI don't know enough about our RBAC to know which one is right.\r\n\r\nBut, as you pointed out, your screenshot shows the right thing.  So, ¯\\_(ツ)_/¯\r\n\r\n@dclarizio, @h-kataria ... either of you have insight into this?  Should I just bury my head again?","created_at":"2015-11-09T19:51:28Z","updated_at":"2015-11-09T19:51:28Z","html_url":"https://github.com/ManageIQ/manageiq/pull/5029#discussion_r44321823","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/44321823"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/5029#discussion_r44321823"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029","id":48358492,"html_url":"https://github.com/ManageIQ/manageiq/pull/5029","diff_url":"https://github.com/ManageIQ/manageiq/pull/5029.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/5029.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5029","number":5029,"state":"open","locked":false,"title":"container relationships view changes","user":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"body":"After this change the following must hold for all container entity screens:\r\n- both the relationships table and the navbar on the left must maintain the following order:\r\n provider, project, route, service, replicator, pod, container, node[1]\r\n- ui tabs must maintain the same order\r\n- navbar relationships must include all entities in table relationships\r\n- all entities in relationships must be clickable\r\n- if an entity has a relationship with a single parent (a pod belongs to one project), the navbar will show:\r\nsingular entity name: name\r\n- if an entity has a one to many relationship (a node can have many pods), the navbar will show:\r\nplural entity name: (#count)\r\n- names of nav bar entities should be acquired using ui_lookup() and should not be translatable\r\n- titles of the above should be translatable, and should always begins with 'show' and not 'view'\r\n\r\nIn addition:\r\n- Use loops where possible in navbar code\r\n- Simplify list view code where possible \r\n- Fixes #4893\r\n- Fixes #4950\r\n\r\n[1] This list does not include images and image registries;\r\nat the images screen, image registry is listed second after provider\r\nat the images registry screen, images are listed second after provider\r\nat the provider screen, registries and then images are listed at the bottom","created_at":"2015-10-21T16:55:38Z","updated_at":"2015-11-09T19:51:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83c2d902fcb3fa20ee3370083ada96a5a26348c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5029/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/35949cd59972aa325d75907c2312162218c25686","head":{"label":"moolitayer:container_entity_view_changes","ref":"container_entity_view_changes","sha":"35949cd59972aa325d75907c2312162218c25686","user":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"repo":{"id":35763260,"name":"manageiq","full_name":"moolitayer/manageiq","owner":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars.githubusercontent.com/u/3010449?v=3","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moolitayer/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/moolitayer/manageiq","forks_url":"https://api.github.com/repos/moolitayer/manageiq/forks","keys_url":"https://api.github.com/repos/moolitayer/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moolitayer/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moolitayer/manageiq/teams","hooks_url":"https://api.github.com/repos/moolitayer/manageiq/hooks","issue_events_url":"https://api.github.com/repos/moolitayer/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/moolitayer/manageiq/events","assignees_url":"https://api.github.com/repos/moolitayer/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/moolitayer/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/moolitayer/manageiq/tags","blobs_url":"https://api.github.com/repos/moolitayer/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moolitayer/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moolitayer/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/moolitayer/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moolitayer/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/moolitayer/manageiq/languages","stargazers_url":"https://api.github.com/repos/moolitayer/manageiq/stargazers","contributors_url":"https://api.github.com/repos/moolitayer/manageiq/contributors","subscribers_url":"https://api.github.com/repos/moolitayer/manageiq/subscribers","subscription_url":"https://api.github.com/repos/moolitayer/manageiq/subscription","commits_url":"https://api.github.com/repos/moolitayer/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/moolitayer/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/moolitayer/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/moolitayer/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/moolitayer/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/moolitayer/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moolitayer/manageiq/merges","archive_url":"https://api.github.com/repos/moolitayer/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moolitayer/manageiq/downloads","issues_url":"https://api.github.com/repos/moolitayer/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/moolitayer/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/moolitayer/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/moolitayer/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moolitayer/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/moolitayer/manageiq/releases{/id}","created_at":"2015-05-17T11:18:34Z","updated_at":"2015-05-17T11:18:51Z","pushed_at":"2015-11-08T10:53:15Z","git_url":"git://github.com/moolitayer/manageiq.git","ssh_url":"git@github.com:moolitayer/manageiq.git","clone_url":"https://github.com/moolitayer/manageiq.git","svn_url":"https://github.com/moolitayer/manageiq","homepage":"manageiq.org","size":94825,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"d6c1058e9f8a3ac19ff4452b3df2f446ff5dde84","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Cloud Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","created_at":"2014-06-13T02:31:26Z","updated_at":"2015-11-07T00:19:32Z","pushed_at":"2015-11-09T19:16:41Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":182845,"stargazers_count":165,"watchers_count":165,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":443,"forks":177,"open_issues":443,"watchers":165,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/5029"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/5029"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/5029/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5029/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/35949cd59972aa325d75907c2312162218c25686"}}}}