{"action":"created","comment":{"url":"https://api.github.com/repos/ethcore/parity/pulls/comments/80726593","pull_request_review_id":1762442,"id":80726593,"diff_hunk":"@@ -34,27 +47,79 @@ export default class Queries extends Component {\n \n     const queries = contract.functions\n       .filter((fn) => fn.constant)\n-      .sort(this._sortEntries)\n-      .map((fn) => {\n-        return (\n-          <div\n-            key={ fn.signature }\n-            className={ styles.method }>\n-            { fn.name }\n-          </div>\n-        );\n-      });\n+      .sort(this._sortEntries);\n+\n+    const noInputQueries = queries\n+      .slice()\n+      .filter((fn) => fn.inputs.length === 0)\n+      .map((fn) => this.renderQuery(fn));\n+\n+    const withInputQueries = queries\n+      .slice()\n+      .filter((fn) => fn.inputs.length > 0)\n+      .map((fn) => this.renderInputQuery(fn));\n \n     return (\n       <Container>\n         <ContainerTitle title='queries' />\n         <div className={ styles.methods }>\n-          { queries }\n+          { noInputQueries }\n+          { withInputQueries }\n         </div>\n       </Container>\n     );\n   }\n \n+  renderInputQuery (fn) {\n+    const { inputs, outputs } = fn;\n+    const { contract } = this.props;\n+\n+    return (\n+      <div key={ fn.signature }>\n+        <InputQueries\n+          inputs={ inputs }\n+          outputs={ outputs }\n+          name={ fn.name }\n+          contract={ contract }\n+        />\n+      </div>\n+    );\n+  }\n+\n+  renderQuery (fn) {\n+    const { values } = this.props;\n+\n+    return (\n+      <div\n+        key={ fn.signature }>\n+        <Card style={ {","path":"js/src/views/Contract/Queries/queries.js","position":90,"original_position":90,"commit_id":"9fbf92aa66d459e36509f041f6e0de288213a10b","original_commit_id":"9fbf92aa66d459e36509f041f6e0de288213a10b","user":{"login":"jacogr","id":1424473,"avatar_url":"https://avatars.githubusercontent.com/u/1424473?v=3","gravatar_id":"","url":"https://api.github.com/users/jacogr","html_url":"https://github.com/jacogr","followers_url":"https://api.github.com/users/jacogr/followers","following_url":"https://api.github.com/users/jacogr/following{/other_user}","gists_url":"https://api.github.com/users/jacogr/gists{/gist_id}","starred_url":"https://api.github.com/users/jacogr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacogr/subscriptions","organizations_url":"https://api.github.com/users/jacogr/orgs","repos_url":"https://api.github.com/users/jacogr/repos","events_url":"https://api.github.com/users/jacogr/events{/privacy}","received_events_url":"https://api.github.com/users/jacogr/received_events","type":"User","site_admin":false},"body":"Visually needs some work. Probably go with transparency of the background as well. At the same time when displayed in a column, the cards needs to be the same height. Looks a bit jaggerd :( (I know, not easy to do)\r\n\r\nIn addition, CSS in .css, even if it comes with an !important. ","created_at":"2016-09-27T15:51:03Z","updated_at":"2016-09-27T15:51:03Z","html_url":"https://github.com/ethcore/parity/pull/2360#discussion_r80726593","pull_request_url":"https://api.github.com/repos/ethcore/parity/pulls/2360","_links":{"self":{"href":"https://api.github.com/repos/ethcore/parity/pulls/comments/80726593"},"html":{"href":"https://github.com/ethcore/parity/pull/2360#discussion_r80726593"},"pull_request":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2360"}}},"pull_request":{"url":"https://api.github.com/repos/ethcore/parity/pulls/2360","id":86940685,"html_url":"https://github.com/ethcore/parity/pull/2360","diff_url":"https://github.com/ethcore/parity/pull/2360.diff","patch_url":"https://github.com/ethcore/parity/pull/2360.patch","issue_url":"https://api.github.com/repos/ethcore/parity/issues/2360","number":2360,"state":"open","locked":false,"title":"Allow queries of constant functions on contracts","user":{"login":"ngotchac","id":2864519,"avatar_url":"https://avatars.githubusercontent.com/u/2864519?v=3","gravatar_id":"","url":"https://api.github.com/users/ngotchac","html_url":"https://github.com/ngotchac","followers_url":"https://api.github.com/users/ngotchac/followers","following_url":"https://api.github.com/users/ngotchac/following{/other_user}","gists_url":"https://api.github.com/users/ngotchac/gists{/gist_id}","starred_url":"https://api.github.com/users/ngotchac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngotchac/subscriptions","organizations_url":"https://api.github.com/users/ngotchac/orgs","repos_url":"https://api.github.com/users/ngotchac/repos","events_url":"https://api.github.com/users/ngotchac/events{/privacy}","received_events_url":"https://api.github.com/users/ngotchac/received_events","type":"User","site_admin":false},"body":"Allow the query of constant functions for a contract ( #2257 ).\r\n\r\nSee it in action: https://youtu.be/214l-YuVpT4","created_at":"2016-09-27T14:25:35Z","updated_at":"2016-09-27T15:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7636ee43dbfffd1417e30c60431e718922e77b9a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethcore/parity/pulls/2360/commits","review_comments_url":"https://api.github.com/repos/ethcore/parity/pulls/2360/comments","review_comment_url":"https://api.github.com/repos/ethcore/parity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethcore/parity/issues/2360/comments","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/9fbf92aa66d459e36509f041f6e0de288213a10b","head":{"label":"ethcore:js-contracts-queries","ref":"js-contracts-queries","sha":"9fbf92aa66d459e36509f041f6e0de288213a10b","user":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"repo":{"id":46714939,"name":"parity","full_name":"ethcore/parity","owner":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethcore/parity","description":"Fast, light, robust Ethereum implementation","fork":false,"url":"https://api.github.com/repos/ethcore/parity","forks_url":"https://api.github.com/repos/ethcore/parity/forks","keys_url":"https://api.github.com/repos/ethcore/parity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethcore/parity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethcore/parity/teams","hooks_url":"https://api.github.com/repos/ethcore/parity/hooks","issue_events_url":"https://api.github.com/repos/ethcore/parity/issues/events{/number}","events_url":"https://api.github.com/repos/ethcore/parity/events","assignees_url":"https://api.github.com/repos/ethcore/parity/assignees{/user}","branches_url":"https://api.github.com/repos/ethcore/parity/branches{/branch}","tags_url":"https://api.github.com/repos/ethcore/parity/tags","blobs_url":"https://api.github.com/repos/ethcore/parity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethcore/parity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethcore/parity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethcore/parity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethcore/parity/languages","stargazers_url":"https://api.github.com/repos/ethcore/parity/stargazers","contributors_url":"https://api.github.com/repos/ethcore/parity/contributors","subscribers_url":"https://api.github.com/repos/ethcore/parity/subscribers","subscription_url":"https://api.github.com/repos/ethcore/parity/subscription","commits_url":"https://api.github.com/repos/ethcore/parity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethcore/parity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethcore/parity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethcore/parity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethcore/parity/contents/{+path}","compare_url":"https://api.github.com/repos/ethcore/parity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethcore/parity/merges","archive_url":"https://api.github.com/repos/ethcore/parity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethcore/parity/downloads","issues_url":"https://api.github.com/repos/ethcore/parity/issues{/number}","pulls_url":"https://api.github.com/repos/ethcore/parity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethcore/parity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethcore/parity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethcore/parity/labels{/name}","releases_url":"https://api.github.com/repos/ethcore/parity/releases{/id}","deployments_url":"https://api.github.com/repos/ethcore/parity/deployments","created_at":"2015-11-23T11:07:32Z","updated_at":"2016-09-27T01:36:14Z","pushed_at":"2016-09-27T15:47:30Z","git_url":"git://github.com/ethcore/parity.git","ssh_url":"git@github.com:ethcore/parity.git","clone_url":"https://github.com/ethcore/parity.git","svn_url":"https://github.com/ethcore/parity","homepage":"","size":37451,"stargazers_count":555,"watchers_count":555,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":191,"forks":96,"open_issues":191,"watchers":555,"default_branch":"master"}},"base":{"label":"ethcore:js","ref":"js","sha":"976ae5eac8415e00ed3f6d787d5a2adedf23ecf1","user":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"repo":{"id":46714939,"name":"parity","full_name":"ethcore/parity","owner":{"login":"ethcore","id":14176906,"avatar_url":"https://avatars.githubusercontent.com/u/14176906?v=3","gravatar_id":"","url":"https://api.github.com/users/ethcore","html_url":"https://github.com/ethcore","followers_url":"https://api.github.com/users/ethcore/followers","following_url":"https://api.github.com/users/ethcore/following{/other_user}","gists_url":"https://api.github.com/users/ethcore/gists{/gist_id}","starred_url":"https://api.github.com/users/ethcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethcore/subscriptions","organizations_url":"https://api.github.com/users/ethcore/orgs","repos_url":"https://api.github.com/users/ethcore/repos","events_url":"https://api.github.com/users/ethcore/events{/privacy}","received_events_url":"https://api.github.com/users/ethcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethcore/parity","description":"Fast, light, robust Ethereum implementation","fork":false,"url":"https://api.github.com/repos/ethcore/parity","forks_url":"https://api.github.com/repos/ethcore/parity/forks","keys_url":"https://api.github.com/repos/ethcore/parity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethcore/parity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethcore/parity/teams","hooks_url":"https://api.github.com/repos/ethcore/parity/hooks","issue_events_url":"https://api.github.com/repos/ethcore/parity/issues/events{/number}","events_url":"https://api.github.com/repos/ethcore/parity/events","assignees_url":"https://api.github.com/repos/ethcore/parity/assignees{/user}","branches_url":"https://api.github.com/repos/ethcore/parity/branches{/branch}","tags_url":"https://api.github.com/repos/ethcore/parity/tags","blobs_url":"https://api.github.com/repos/ethcore/parity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethcore/parity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethcore/parity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethcore/parity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethcore/parity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethcore/parity/languages","stargazers_url":"https://api.github.com/repos/ethcore/parity/stargazers","contributors_url":"https://api.github.com/repos/ethcore/parity/contributors","subscribers_url":"https://api.github.com/repos/ethcore/parity/subscribers","subscription_url":"https://api.github.com/repos/ethcore/parity/subscription","commits_url":"https://api.github.com/repos/ethcore/parity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethcore/parity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethcore/parity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethcore/parity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethcore/parity/contents/{+path}","compare_url":"https://api.github.com/repos/ethcore/parity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethcore/parity/merges","archive_url":"https://api.github.com/repos/ethcore/parity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethcore/parity/downloads","issues_url":"https://api.github.com/repos/ethcore/parity/issues{/number}","pulls_url":"https://api.github.com/repos/ethcore/parity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethcore/parity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethcore/parity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethcore/parity/labels{/name}","releases_url":"https://api.github.com/repos/ethcore/parity/releases{/id}","deployments_url":"https://api.github.com/repos/ethcore/parity/deployments","created_at":"2015-11-23T11:07:32Z","updated_at":"2016-09-27T01:36:14Z","pushed_at":"2016-09-27T15:47:30Z","git_url":"git://github.com/ethcore/parity.git","ssh_url":"git@github.com:ethcore/parity.git","clone_url":"https://github.com/ethcore/parity.git","svn_url":"https://github.com/ethcore/parity","homepage":"","size":37451,"stargazers_count":555,"watchers_count":555,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":96,"mirror_url":null,"open_issues_count":191,"forks":96,"open_issues":191,"watchers":555,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2360"},"html":{"href":"https://github.com/ethcore/parity/pull/2360"},"issue":{"href":"https://api.github.com/repos/ethcore/parity/issues/2360"},"comments":{"href":"https://api.github.com/repos/ethcore/parity/issues/2360/comments"},"review_comments":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2360/comments"},"review_comment":{"href":"https://api.github.com/repos/ethcore/parity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethcore/parity/pulls/2360/commits"},"statuses":{"href":"https://api.github.com/repos/ethcore/parity/statuses/9fbf92aa66d459e36509f041f6e0de288213a10b"}}}}
{"actor":{"display_login":"jacogr"}}