{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/55035384","id":55035384,"diff_hunk":"@@ -114,20 +116,11 @@ def cb_rates_list\n     end\n     @sortcol = session[:rates_sortcol].nil? ? 0 : session[:rates_sortcol].to_i\n     @sortdir = session[:rates_sortdir].nil? ? \"ASC\" : session[:rates_sortdir]\n-\n-    @view, @pages = get_view(ChargebackRate, :conditions => [\"rate_type=?\", x_node.split('-').last])  # Get the records (into a view) and the paginator\n-\n+    # Get the records (into a view) and the paginator\n+    @view, @pages = get_view(ChargebackRate, :conditions => [\"rate_type=?\", \"Compute\"])","path":"app/controllers/chargeback_controller.rb","position":24,"original_position":24,"commit_id":"2d1f8de81b46e78eaf2439da37a4ed8621e60c29","original_commit_id":"2d1f8de81b46e78eaf2439da37a4ed8621e60c29","user":{"login":"h-kataria","id":3450808,"avatar_url":"https://avatars.githubusercontent.com/u/3450808?v=3","gravatar_id":"","url":"https://api.github.com/users/h-kataria","html_url":"https://github.com/h-kataria","followers_url":"https://api.github.com/users/h-kataria/followers","following_url":"https://api.github.com/users/h-kataria/following{/other_user}","gists_url":"https://api.github.com/users/h-kataria/gists{/gist_id}","starred_url":"https://api.github.com/users/h-kataria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-kataria/subscriptions","organizations_url":"https://api.github.com/users/h-kataria/orgs","repos_url":"https://api.github.com/users/h-kataria/repos","events_url":"https://api.github.com/users/h-kataria/events{/privacy}","received_events_url":"https://api.github.com/users/h-kataria/received_events","type":"User","site_admin":false},"body":"@amaurygonzalez what about Storage rates, above will always get Compute rates only","created_at":"2016-03-04T14:27:59Z","updated_at":"2016-03-04T14:27:59Z","html_url":"https://github.com/ManageIQ/manageiq/pull/6359#discussion_r55035384","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/55035384"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/6359#discussion_r55035384"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359","id":57341093,"html_url":"https://github.com/ManageIQ/manageiq/pull/6359","diff_url":"https://github.com/ManageIQ/manageiq/pull/6359.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/6359.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6359","number":6359,"state":"open","locked":false,"title":"[WIP] - Selectable rate details","user":{"login":"amaurygonzalez","id":14124243,"avatar_url":"https://avatars.githubusercontent.com/u/14124243?v=3","gravatar_id":"","url":"https://api.github.com/users/amaurygonzalez","html_url":"https://github.com/amaurygonzalez","followers_url":"https://api.github.com/users/amaurygonzalez/followers","following_url":"https://api.github.com/users/amaurygonzalez/following{/other_user}","gists_url":"https://api.github.com/users/amaurygonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/amaurygonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaurygonzalez/subscriptions","organizations_url":"https://api.github.com/users/amaurygonzalez/orgs","repos_url":"https://api.github.com/users/amaurygonzalez/repos","events_url":"https://api.github.com/users/amaurygonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/amaurygonzalez/received_events","type":"User","site_admin":false},"body":"# Selectable and dynamic Rates\r\nWith this pull request we aim to make clearer the process of setting up a rate and leave open the possibility of adding more levels of pricing in the future (to charging for Envelope, OpenShift users etc.)\r\n## Compute and Storage Rate joined together in one Rate with his rate details\r\nFirst of all we will change the rate view to show one rate that groups the Compute metrics and the Storage metrics. It is maintained the class models and the actual assignments process. This implies changes in the accordion and the rate views. \r\n\r\n_Compute and Storage Rate joined together in one Rate:_\r\n![](http://res.cloudinary.com/ddtbdqfq7/image/upload/v1452873040/Captura_de_pantalla_de_2016-01-15_16-50-14_wnuxb4.png)\r\n## Selectable metrics for a rate\r\nAt present, the CF rate has a predefined rate metrics in a table way. With this part of the new feature the admin can choose the metrics that he want in the CF rate. Also can delete the metrics that not need in the rate:\r\n\r\n_View of the new functionality:_\r\n![](http://res.cloudinary.com/ddtbdqfq7/image/upload/v1452780299/pull-request-enero_2_yukcyw.png)\r\n\r\n## Selectable columns for a Chargeback report\r\nIn a report based on Chargeback the columns that are shown must be the same that are selected on a rate.  A compute rate is defined with Allocated CPU Metrics and DiskIO metric, this columns are the only that the chargeback report show for to select.","created_at":"2016-01-27T10:36:54Z","updated_at":"2016-03-04T14:27:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9738ceaf918bc20d9c9069be3cc7f7160d2dafb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/6359/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/2d1f8de81b46e78eaf2439da37a4ed8621e60c29","head":{"label":"rhus:Selectable-rates","ref":"Selectable-rates","sha":"2d1f8de81b46e78eaf2439da37a4ed8621e60c29","user":{"login":"rhus","id":14151044,"avatar_url":"https://avatars.githubusercontent.com/u/14151044?v=3","gravatar_id":"","url":"https://api.github.com/users/rhus","html_url":"https://github.com/rhus","followers_url":"https://api.github.com/users/rhus/followers","following_url":"https://api.github.com/users/rhus/following{/other_user}","gists_url":"https://api.github.com/users/rhus/gists{/gist_id}","starred_url":"https://api.github.com/users/rhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhus/subscriptions","organizations_url":"https://api.github.com/users/rhus/orgs","repos_url":"https://api.github.com/users/rhus/repos","events_url":"https://api.github.com/users/rhus/events{/privacy}","received_events_url":"https://api.github.com/users/rhus/received_events","type":"Organization","site_admin":false},"repo":{"id":42049284,"name":"manageiq","full_name":"rhus/manageiq","owner":{"login":"rhus","id":14151044,"avatar_url":"https://avatars.githubusercontent.com/u/14151044?v=3","gravatar_id":"","url":"https://api.github.com/users/rhus","html_url":"https://github.com/rhus","followers_url":"https://api.github.com/users/rhus/followers","following_url":"https://api.github.com/users/rhus/following{/other_user}","gists_url":"https://api.github.com/users/rhus/gists{/gist_id}","starred_url":"https://api.github.com/users/rhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhus/subscriptions","organizations_url":"https://api.github.com/users/rhus/orgs","repos_url":"https://api.github.com/users/rhus/repos","events_url":"https://api.github.com/users/rhus/events{/privacy}","received_events_url":"https://api.github.com/users/rhus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rhus/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/rhus/manageiq","forks_url":"https://api.github.com/repos/rhus/manageiq/forks","keys_url":"https://api.github.com/repos/rhus/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhus/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhus/manageiq/teams","hooks_url":"https://api.github.com/repos/rhus/manageiq/hooks","issue_events_url":"https://api.github.com/repos/rhus/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/rhus/manageiq/events","assignees_url":"https://api.github.com/repos/rhus/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/rhus/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/rhus/manageiq/tags","blobs_url":"https://api.github.com/repos/rhus/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhus/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhus/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhus/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhus/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/rhus/manageiq/languages","stargazers_url":"https://api.github.com/repos/rhus/manageiq/stargazers","contributors_url":"https://api.github.com/repos/rhus/manageiq/contributors","subscribers_url":"https://api.github.com/repos/rhus/manageiq/subscribers","subscription_url":"https://api.github.com/repos/rhus/manageiq/subscription","commits_url":"https://api.github.com/repos/rhus/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhus/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhus/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhus/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhus/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/rhus/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhus/manageiq/merges","archive_url":"https://api.github.com/repos/rhus/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhus/manageiq/downloads","issues_url":"https://api.github.com/repos/rhus/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/rhus/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/rhus/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/rhus/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhus/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/rhus/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/rhus/manageiq/deployments","created_at":"2015-09-07T11:29:14Z","updated_at":"2016-01-29T13:22:09Z","pushed_at":"2016-03-04T13:19:30Z","git_url":"git://github.com/rhus/manageiq.git","ssh_url":"git@github.com:rhus/manageiq.git","clone_url":"https://github.com/rhus/manageiq.git","svn_url":"https://github.com/rhus/manageiq","homepage":"manageiq.org","size":109271,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"1ad8f23ffa454bd5da79733677f44c1cdce5ee91","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}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-03-02T01:20:18Z","pushed_at":"2016-03-04T14:25:35Z","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":145630,"stargazers_count":224,"watchers_count":224,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":252,"mirror_url":null,"open_issues_count":588,"forks":252,"open_issues":588,"watchers":224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/6359"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/6359"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/6359/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/6359/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/2d1f8de81b46e78eaf2439da37a4ed8621e60c29"}}}}