{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9598","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9598/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9598/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9598/events","html_url":"https://github.com/ManageIQ/manageiq/pull/9598","id":163679499,"number":9598,"title":"Convert ExprorerPresenter to JSON","user":{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars.githubusercontent.com/u/51095?v=3","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":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/technical%20debt","name":"technical debt","color":"eb6420"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/ui","name":"ui","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-04T13:41:56Z","updated_at":"2016-07-06T12:14:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9598","html_url":"https://github.com/ManageIQ/manageiq/pull/9598","diff_url":"https://github.com/ManageIQ/manageiq/pull/9598.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/9598.patch"},"body":"Purpose or Intent\r\n-----------------\r\nWe want to get rid of RJS (and javascript eval). This PR converts all the actions that go through ExplorerPresenter to JSON. This is surely not as good as using some nice JSON/REST API or converting the stuff in question to Angular. Implements a more restricted interface and removes the need to call `eval` in many situations.\r\n\r\nSteps for Testing/QA\r\n--------------------\r\nEvery screen that uses explorer (trees on the left) is affected by this change. And some more. I expect bugs. Actually if there would be no bugs found, I would be pretty scared.\r\n\r\nMake sure that `miqBuildCalendar` related stuff works well. Note: Seems to me that there's a lot of unused code around that. Needs a cleanup (in a separate PR)."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/230754498","html_url":"https://github.com/ManageIQ/manageiq/pull/9598#issuecomment-230754498","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9598","id":230754498,"user":{"login":"miq-bot","id":7806257,"avatar_url":"https://avatars.githubusercontent.com/u/7806257?v=3","gravatar_id":"","url":"https://api.github.com/users/miq-bot","html_url":"https://github.com/miq-bot","followers_url":"https://api.github.com/users/miq-bot/followers","following_url":"https://api.github.com/users/miq-bot/following{/other_user}","gists_url":"https://api.github.com/users/miq-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/miq-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miq-bot/subscriptions","organizations_url":"https://api.github.com/users/miq-bot/orgs","repos_url":"https://api.github.com/users/miq-bot/repos","events_url":"https://api.github.com/users/miq-bot/events{/privacy}","received_events_url":"https://api.github.com/users/miq-bot/received_events","type":"User","site_admin":false},"created_at":"2016-07-06T12:14:36Z","updated_at":"2016-07-06T12:14:36Z","body":"<rubocop />Checked commits https://github.com/martinpovolny/manageiq/compare/47483661f2071fd04108cf3bb383d1f1fa24f509~...a7bc86ac6cc1b91650c7ca26d78b2d702c026d10 with ruby 2.2.4, rubocop 0.37.2, and haml-lint 0.16.1\n24 files checked, 14 offenses detected\n\n**app/helpers/application_helper.rb**\n- [ ] :exclamation: - [Line 815](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/helpers/application_helper.rb#L815), Col 5 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n\n**app/presenters/explorer_presenter.rb**\n- [ ] :exclamation: - [Line 151](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L151), Col 22 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :exclamation: - [Line 164](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L164), Col 28 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :exclamation: - [Line 166](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L166), Col 31 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :exclamation: - [Line 170](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L170), Col 81 - [Style/SpaceAroundBlockParameters](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/SpaceAroundBlockParameters) - Space before first block parameter detected.\n- [ ] :exclamation: - [Line 189](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L189), Col 27 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :exclamation: - [Line 190](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L190), Col 28 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :exclamation: - [Line 191](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L191), Col 25 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :exclamation: - [Line 93](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L93), Col 42 - [Style/DoubleNegation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/DoubleNegation) - Avoid the use of double negation (`!!`).\n- [ ] :grey_exclamation: - [Line 130](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L130), Col 3 - [Metrics/AbcSize](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/AbcSize) - Assignment Branch Condition size for to_json is too high. [94.21/15]\n- [ ] :grey_exclamation: - [Line 130](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L130), Col 3 - [Metrics/CyclomaticComplexity](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/CyclomaticComplexity) - Cyclomatic complexity for to_json is too high. [16/6]\n- [ ] :grey_exclamation: - [Line 130](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L130), Col 3 - [Metrics/MethodLength](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/MethodLength) - Method has too many lines. [55/25]\n- [ ] :grey_exclamation: - [Line 130](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/app/presenters/explorer_presenter.rb#L130), Col 3 - [Metrics/PerceivedComplexity](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/PerceivedComplexity) - Perceived complexity for to_json is too high. [16/7]\n\n**spec/presenters/explorer_presenter_spec.rb**\n- [ ] :exclamation: - [Line 48](https://github.com/martinpovolny/manageiq/blob/a7bc86ac6cc1b91650c7ca26d78b2d702c026d10/spec/presenters/explorer_presenter_spec.rb#L48), Col 63 - [Rails/TimeZone](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Rails/TimeZone) - Do not use `Time.now` without zone. Use one of `Time.zone.now`, `Time.current`, `Time.now.in_time_zone`, `Time.now.utc`, `Time.now.getlocal`, `Time.now.iso8601`, `Time.now.jisx0301`, `Time.now.rfc3339`, `Time.now.to_i`, `Time.now.to_f` instead.\n"}}
{"actor":{"display_login":"miq-bot"}}