{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9540","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9540/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9540/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9540/events","html_url":"https://github.com/ManageIQ/manageiq/pull/9540","id":163131072,"number":9540,"title":"[WIP] Toolbar buttons for VMs moved to separate classes","user":{"login":"romanblanco","id":1187051,"avatar_url":"https://avatars.githubusercontent.com/u/1187051?v=3","gravatar_id":"","url":"https://api.github.com/users/romanblanco","html_url":"https://github.com/romanblanco","followers_url":"https://api.github.com/users/romanblanco/followers","following_url":"https://api.github.com/users/romanblanco/following{/other_user}","gists_url":"https://api.github.com/users/romanblanco/gists{/gist_id}","starred_url":"https://api.github.com/users/romanblanco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romanblanco/subscriptions","organizations_url":"https://api.github.com/users/romanblanco/orgs","repos_url":"https://api.github.com/users/romanblanco/repos","events_url":"https://api.github.com/users/romanblanco/events{/privacy}","received_events_url":"https://api.github.com/users/romanblanco/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"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/wip","name":"wip","color":"eeeeee"}],"state":"open","locked":false,"assignee":{"login":"dclarizio","id":3433754,"avatar_url":"https://avatars.githubusercontent.com/u/3433754?v=3","gravatar_id":"","url":"https://api.github.com/users/dclarizio","html_url":"https://github.com/dclarizio","followers_url":"https://api.github.com/users/dclarizio/followers","following_url":"https://api.github.com/users/dclarizio/following{/other_user}","gists_url":"https://api.github.com/users/dclarizio/gists{/gist_id}","starred_url":"https://api.github.com/users/dclarizio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclarizio/subscriptions","organizations_url":"https://api.github.com/users/dclarizio/orgs","repos_url":"https://api.github.com/users/dclarizio/repos","events_url":"https://api.github.com/users/dclarizio/events{/privacy}","received_events_url":"https://api.github.com/users/dclarizio/received_events","type":"User","site_admin":false},"assignees":[{"login":"dclarizio","id":3433754,"avatar_url":"https://avatars.githubusercontent.com/u/3433754?v=3","gravatar_id":"","url":"https://api.github.com/users/dclarizio","html_url":"https://github.com/dclarizio","followers_url":"https://api.github.com/users/dclarizio/followers","following_url":"https://api.github.com/users/dclarizio/following{/other_user}","gists_url":"https://api.github.com/users/dclarizio/gists{/gist_id}","starred_url":"https://api.github.com/users/dclarizio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclarizio/subscriptions","organizations_url":"https://api.github.com/users/dclarizio/orgs","repos_url":"https://api.github.com/users/dclarizio/repos","events_url":"https://api.github.com/users/dclarizio/events{/privacy}","received_events_url":"https://api.github.com/users/dclarizio/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-06-30T10:19:14Z","updated_at":"2016-07-13T17:26:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9540","html_url":"https://github.com/ManageIQ/manageiq/pull/9540","diff_url":"https://github.com/ManageIQ/manageiq/pull/9540.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/9540.patch"},"body":"Purpose or Intent\r\n-----------------\r\nPurpose is to move toolbar buttons from helper (`app/helpers/application_helper/toolbar_builder.rb`) to separate classes.\r\n\r\n*In this PR is converted just a first part of buttons for VMs. I'll continue with other buttons in another PR.*\r\n\r\n**Classes for multiple buttons with same logic**:\r\n- class `BasicImage` contains logic for buttons `vm_clone` and `vm_publish` in list of VM and instances\r\n- class `VmInstanceScan` contains logic for `vm_scan` button in VM summary page and for `instance_scan` in \\_\\_[WIP]\\_\\_\r\n\r\n**Classes for one button**\r\n- class `VmRefresh` contains logic for `vm_refresh` button in VM summary page\r\n- class `VmClone` contains logic for `vm_clone` button in VM summary page\r\n- class `VmPublish` contains logic for `vm_publish` button in VM summary page\r\n- class `VmStop` contains logic for `vm_stop` button in VM summary page\r\n\r\n**Toolbar screenshots**\r\n\r\n- vm_infras_center.rb\r\n![screencapture-localhost-3000-ems_infra-10000000000011-1467726752436](https://cloud.githubusercontent.com/assets/1187051/16586951/a1b17468-42c8-11e6-8d7b-8db7cae1e036.png)\r\n\r\n- x_vm_center.rb\r\n![screencapture-localhost-3000-vm_infra-explorer-1467726910903](https://cloud.githubusercontent.com/assets/1187051/16587012/e45f60a4-42c8-11e6-8a73-246b3728bd52.png)\r\n\r\n- openstack_vm_cloud_center.rb\r\n![screencapture-localhost-3000-vm_cloud-explorer-1467741804303](https://cloud.githubusercontent.com/assets/1187051/16594641/9c4a923e-42eb-11e6-9767-ba82a6c2cc4a.png)\r\n\r\n- ~~vm_center.rb~~\r\n  ~~https://github.com/ManageIQ/manageiq/pull/9520#issuecomment-229410419~~\r\n->  #9682\r\n\r\n- vm_clouds_center.rb\r\n![screencapture-localhost-3000-ems_cloud-10000000000003-1467741679682](https://cloud.githubusercontent.com/assets/1187051/16594566/55440988-42eb-11e6-8b55-94890275e7c5.png)\r\n\r\n- vm_infras_center.rb *(Infrastructure -> Virtual Machines)*\r\n![screencapture-localhost-3000-vm_infra-explorer-1467963145970](https://cloud.githubusercontent.com/assets/1187051/16680493/1be36de0-44ef-11e6-85dd-4e4c7fed8e38.png)\r\n\r\n\r\n- x_vm_cloud_center.rb *(Cloud -> Instances -> instance, other than openstack)*\r\n![screencapture-localhost-3000-vm_cloud-explorer-1467965840563](https://cloud.githubusercontent.com/assets/1187051/16681479/43ca95da-44f5-11e6-9213-a1741cbd2c0b.png)\r\n\r\n\r\n\r\nLinks\r\n-----\r\nParent issue: #6259\r\nRelated issue: #6554"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/232426861","html_url":"https://github.com/ManageIQ/manageiq/pull/9540#issuecomment-232426861","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9540","id":232426861,"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-13T17:26:13Z","updated_at":"2016-07-13T17:26:13Z","body":"<rubocop />Checked commits https://github.com/romanblanco/manageiq/compare/deaf2aaa7ea1ce421756ccab71f4f4c0bd34daf0~...0613b307ca812b9f84dfab71ac1aedd421405c4e with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1\n21 files checked, 11 offenses detected\n\n**app/helpers/application_helper/button/basic.rb**\n- [ ] :exclamation: - [Line 42](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/app/helpers/application_helper/button/basic.rb#L42), Col 1 - [Style/EmptyLines](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/EmptyLines) - Extra blank line detected.\n\n**app/helpers/application_helper/button/vm_instance_scan.rb**\n- [ ] :exclamation: - [Line 7](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/app/helpers/application_helper/button/vm_instance_scan.rb#L7), Col 5 - [Style/MultilineOperationIndentation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/MultilineOperationIndentation) - Use 2 (not 0) spaces for indenting an expression spanning multiple lines.\n\n**app/helpers/application_helper/button/vm_refresh.rb**\n- [ ] :exclamation: - [Line 6](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/app/helpers/application_helper/button/vm_refresh.rb#L6), Col 5 - [Style/MultilineOperationIndentation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/MultilineOperationIndentation) - Use 2 (not 0) spaces for indenting an expression spanning multiple lines.\n\n**spec/helpers/application_helper/buttons/vm_clone_spec.rb**\n- [ ] :exclamation: - [Line 11](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/helpers/application_helper/buttons/vm_clone_spec.rb#L11), Col 38 - [Style/AlignHash](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/AlignHash) - Align the elements of a hash literal if they span more than one line.\n- [ ] :exclamation: - [Line 13](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/helpers/application_helper/buttons/vm_clone_spec.rb#L13), Col 38 - [Style/AlignHash](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/AlignHash) - Align the elements of a hash literal if they span more than one line.\n- [ ] :exclamation: - [Line 22](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/helpers/application_helper/buttons/vm_clone_spec.rb#L22), Col 38 - [Style/AlignHash](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/AlignHash) - Align the elements of a hash literal if they span more than one line.\n- [ ] :exclamation: - [Line 24](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/helpers/application_helper/buttons/vm_clone_spec.rb#L24), Col 38 - [Style/AlignHash](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/AlignHash) - Align the elements of a hash literal if they span more than one line.\n\n**spec/helpers/application_helper/buttons/vm_refresh_spec.rb**\n- [ ] :grey_exclamation: - [Line 8](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/helpers/application_helper/buttons/vm_refresh_spec.rb#L8), Col 121 - [Metrics/LineLength](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/LineLength) - Line is too long. [122/120]\n\n**spec/helpers/application_helper/toolbar_builder_spec.rb**\n- [ ] :exclamation: - [Line 579](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/helpers/application_helper/toolbar_builder_spec.rb#L579), Col 5 - [Style/WordArray](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/WordArray) - Use `%w` or `%W` for an array of words.\n\n**spec/support/examples_group/shared_examples_for_application_helper.rb**\n- [ ] :exclamation: - [Line 40](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/support/examples_group/shared_examples_for_application_helper.rb#L40), Col 6 - [Style/UnneededInterpolation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/UnneededInterpolation) - Prefer `to_s` over string interpolation.\n- [ ] :exclamation: - [Line 48](https://github.com/romanblanco/manageiq/blob/0613b307ca812b9f84dfab71ac1aedd421405c4e/spec/support/examples_group/shared_examples_for_application_helper.rb#L48), Col 6 - [Style/UnneededInterpolation](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Style/UnneededInterpolation) - Prefer `to_s` over string interpolation.\n"}}
{"actor":{"display_login":"miq-bot"}}