{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9753","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9753/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9753/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9753/events","html_url":"https://github.com/ManageIQ/manageiq/pull/9753","id":165102772,"number":9753,"title":"[WIP] Replace ruby generated toolbar with angular's","user":{"login":"karelhala","id":3439771,"avatar_url":"https://avatars.githubusercontent.com/u/3439771?v=3","gravatar_id":"","url":"https://api.github.com/users/karelhala","html_url":"https://github.com/karelhala","followers_url":"https://api.github.com/users/karelhala/followers","following_url":"https://api.github.com/users/karelhala/following{/other_user}","gists_url":"https://api.github.com/users/karelhala/gists{/gist_id}","starred_url":"https://api.github.com/users/karelhala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelhala/subscriptions","organizations_url":"https://api.github.com/users/karelhala/orgs","repos_url":"https://api.github.com/users/karelhala/repos","events_url":"https://api.github.com/users/karelhala/events{/privacy}","received_events_url":"https://api.github.com/users/karelhala/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/enhancement","name":"enhancement","color":"84b6eb"},{"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":"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},"assignees":[{"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},{"login":"himdel","id":289743,"avatar_url":"https://avatars.githubusercontent.com/u/289743?v=3","gravatar_id":"","url":"https://api.github.com/users/himdel","html_url":"https://github.com/himdel","followers_url":"https://api.github.com/users/himdel/followers","following_url":"https://api.github.com/users/himdel/following{/other_user}","gists_url":"https://api.github.com/users/himdel/gists{/gist_id}","starred_url":"https://api.github.com/users/himdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himdel/subscriptions","organizations_url":"https://api.github.com/users/himdel/orgs","repos_url":"https://api.github.com/users/himdel/repos","events_url":"https://api.github.com/users/himdel/events{/privacy}","received_events_url":"https://api.github.com/users/himdel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2016-07-12T15:01:51Z","updated_at":"2016-07-26T16:12:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9753","html_url":"https://github.com/ManageIQ/manageiq/pull/9753","diff_url":"https://github.com/ManageIQ/manageiq/pull/9753.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/9753.patch"},"body":"As we were talking @martinpovolny here is approach of angular's toolbar.\r\n\r\nTo include in view, you'll have to add these lines in controller:\r\n```ruby\r\nclass SomeController < ApplicationController\r\n...\r\n  include ProvidersSettings\r\n...\r\n  before_action :set_angular_app\r\n...\r\n  private\r\n  def set_angular_app\r\n    @angular_toolbar_name = \"ManageIQ.toolbar\"\r\n  end\r\n...\r\nend\r\n```\r\n\r\nAnd add to `routes.rb` settings endpoints:\r\n```ruby\r\n:some_action            => {\r\n  :get  => %w(\r\n    ...\r\n  ) +\r\n      providers_settings,\r\n  :post => %w(\r\n    ...\r\n  )\r\n...\r\n```\r\n\r\nSelecting row and enabling/disabling is working, but clicking on button will either throw error or won't work.\r\n\r\n![selection_036](https://cloud.githubusercontent.com/assets/3439771/16771847/4aa70db0-4852-11e6-9aa9-e61b63f15f61.png)\r\n\r\n\r\n- [ ] add tests\r\n- [ ] providers settings is probable wrongly placed and too big (due to copy + paste from #7623)\r\n- [x] make a way of how to bind js function to buttons"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/235319506","html_url":"https://github.com/ManageIQ/manageiq/pull/9753#issuecomment-235319506","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9753","id":235319506,"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-26T16:12:09Z","updated_at":"2016-07-26T16:12:09Z","body":"<rubocop />Checked commits https://github.com/karelhala/manageiq/compare/62404676276bcb942476743d922a418009a00ef7~...63d97032b9e883af4d53a1b5806b9cecc60cd3f8 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1\n6 files checked, 1 offense detected\n\n**app/views/layouts/angular/_toolbar.html.haml**\n- [ ] :warning: - [Line 1](https://github.com/karelhala/manageiq/blob/63d97032b9e883af4d53a1b5806b9cecc60cd3f8/app/views/layouts/angular/_toolbar.html.haml#L1) - `%div#miq-toolbar-menu` can be written as `#miq-toolbar-menu` since `%div` is implicit\n"}}
{"actor":{"display_login":"miq-bot"}}