{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/2758","repository_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/2758/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/2758/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/2758/events","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/2758","id":274850879,"number":2758,"title":"Allow linking to Services adding test coverage for Services Explorer","user":{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars3.githubusercontent.com/u/51095?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpovolny","html_url":"https://github.com/martinpovolny","followers_url":"https://api.github.com/users/martinpovolny/followers","following_url":"https://api.github.com/users/martinpovolny/following{/other_user}","gists_url":"https://api.github.com/users/martinpovolny/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpovolny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpovolny/subscriptions","organizations_url":"https://api.github.com/users/martinpovolny/orgs","repos_url":"https://api.github.com/users/martinpovolny/repos","events_url":"https://api.github.com/users/martinpovolny/events{/privacy}","received_events_url":"https://api.github.com/users/martinpovolny/received_events","type":"User","site_admin":false},"labels":[{"id":505074429,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/bug","name":"bug","color":"fc2929","default":true},{"id":736077187,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/gaprindashvili/yes","name":"gaprindashvili/yes","color":"000000","default":false},{"id":534298512,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/services","name":"services","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"AparnaKarve","id":1538216,"avatar_url":"https://avatars3.githubusercontent.com/u/1538216?v=4","gravatar_id":"","url":"https://api.github.com/users/AparnaKarve","html_url":"https://github.com/AparnaKarve","followers_url":"https://api.github.com/users/AparnaKarve/followers","following_url":"https://api.github.com/users/AparnaKarve/following{/other_user}","gists_url":"https://api.github.com/users/AparnaKarve/gists{/gist_id}","starred_url":"https://api.github.com/users/AparnaKarve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AparnaKarve/subscriptions","organizations_url":"https://api.github.com/users/AparnaKarve/orgs","repos_url":"https://api.github.com/users/AparnaKarve/repos","events_url":"https://api.github.com/users/AparnaKarve/events{/privacy}","received_events_url":"https://api.github.com/users/AparnaKarve/received_events","type":"User","site_admin":false},"assignees":[{"login":"AparnaKarve","id":1538216,"avatar_url":"https://avatars3.githubusercontent.com/u/1538216?v=4","gravatar_id":"","url":"https://api.github.com/users/AparnaKarve","html_url":"https://github.com/AparnaKarve","followers_url":"https://api.github.com/users/AparnaKarve/followers","following_url":"https://api.github.com/users/AparnaKarve/following{/other_user}","gists_url":"https://api.github.com/users/AparnaKarve/gists{/gist_id}","starred_url":"https://api.github.com/users/AparnaKarve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AparnaKarve/subscriptions","organizations_url":"https://api.github.com/users/AparnaKarve/orgs","repos_url":"https://api.github.com/users/AparnaKarve/repos","events_url":"https://api.github.com/users/AparnaKarve/events{/privacy}","received_events_url":"https://api.github.com/users/AparnaKarve/received_events","type":"User","site_admin":false}],"milestone":null,"comments":21,"created_at":"2017-11-17T12:32:28Z","updated_at":"2017-11-21T18:08:22Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/pulls/2758","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/2758","diff_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/2758.diff","patch_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/2758.patch"},"body":"The goal of this PR is to handle links from GO to services. Linking to services seem to have never been working before.\r\n\r\nThe code that handles links to services lives in `show` action. That is similar to other controllers.\r\n\r\nI needed to revert the exceptional behavior introduced in 77124054987a8e740463d4b575cd33034ad84ea1 that produced links in the form:\r\nhttp://localhost:3000/service/explorer/s-10000000000273\r\nback to original:\r\nhttp://localhost:3000/service/show/10000000000273\r\n\r\nCommit \"GTL: do not change `session[:sandboxes]`.\" fixes the root cause of the crashes after that. What happed is that the active tree is Services controller was set to `generic_object_tree`. This causes confusion in the `ServicesController`.\r\n\r\nI needed to understand the `get_node_info` in Services so I removed dead code from there and added some test coverage for that.\r\n\r\nI also needed to see clearly what nodes existed in the tree so I made that more explicit in the `TreeBuilderServices` and added a bit to the test coverage there. More changes originate in fixing of Rubocop and CC issues.\r\n\r\nI fixed anoying \"Duplicate DOM ID\" messages in Service controller popping out everywhere under \"My Services\".\r\n\r\nTo test links from GO to services (well actually to test anything GO) one needs to create GO definitions and instances. Here is a tool to do that:\r\nhttps://gist.github.com/martinpovolny/4d960e550a7838a9b04cb4d8396514b0\r\nIt should:\r\n 1. Create a GO definition\r\n 2. Create a GO (instance)\r\n 3. Create a Service\r\n 4. Assign Service to GO\r\n 5. Add GO to the Service\r\n\r\nThe script can be run multiple times and each time it will add a new set of the entities.\r\n\r\nPinging also @h-kataria, @mzazrivec : please read, review. I think this can use more eyes."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/comments/346112549","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/2758#issuecomment-346112549","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/2758","id":346112549,"user":{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars3.githubusercontent.com/u/51095?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpovolny","html_url":"https://github.com/martinpovolny","followers_url":"https://api.github.com/users/martinpovolny/followers","following_url":"https://api.github.com/users/martinpovolny/following{/other_user}","gists_url":"https://api.github.com/users/martinpovolny/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpovolny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpovolny/subscriptions","organizations_url":"https://api.github.com/users/martinpovolny/orgs","repos_url":"https://api.github.com/users/martinpovolny/repos","events_url":"https://api.github.com/users/martinpovolny/events{/privacy}","received_events_url":"https://api.github.com/users/martinpovolny/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T18:08:22Z","updated_at":"2017-11-21T18:08:22Z","author_association":"COLLABORATOR","body":"@AparnaKarve : I am done here.\r\n\r\nI am removing the Gaprindashvili/yes label from this and I am going back to my work."}}
{"actor":{"display_login":"martinpovolny"}}